From 3632fe17148f353f390144989145b673f6e7f17a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 19:50:16 +0000 Subject: [PATCH] fix: Set the transport of grafeas back to grpc only (#498) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 457789598 Source-Link: https://github.com/googleapis/googleapis/commit/220f5d8021abe21ffe99393cf84c2d382ed87dca Source-Link: https://github.com/googleapis/googleapis-gen/commit/54c8e63125700c2f1da4e325b4a87a951c19dacb Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTRjOGU2MzEyNTcwMGMyZjFkYTRlMzI1YjRhODdhOTUxYzE5ZGFjYiJ9 feat: Enable REST transport for most of Java and Go clients PiperOrigin-RevId: 456641589 Source-Link: https://github.com/googleapis/googleapis/commit/8a251f5225b789b2383207ffd978f6aa3d77fcf7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/4ca52a529cf01308d9714950edffbea3560cfbdb Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGNhNTJhNTI5Y2YwMTMwOGQ5NzE0OTUwZWRmZmJlYTM1NjBjZmJkYiJ9 chore: Integrate new gapic-generator-java and rules_gapic PiperOrigin-RevId: 454027580 Source-Link: https://github.com/googleapis/googleapis/commit/1b222777baa702e7135610355706570ed2b56318 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e04cea20d0d12eb5c3bdb360a9e72b654edcb638 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTA0Y2VhMjBkMGQxMmViNWMzYmRiMzYwYTllNzJiNjU0ZWRjYjYzOCJ9 feat:Import of Grafeas from Github PiperOrigin-RevId: 453542250 Source-Link: https://github.com/googleapis/googleapis/commit/ac9c39309aae2e9d0663904ae6a124685bcf5010 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d1e2f1ab3de6b5a36186d69165412aa686aefb26 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZDFlMmYxYWIzZGU2YjVhMzYxODZkNjkxNjU0MTJhYTY4NmFlZmIyNiJ9 chore(deps): upgrade gapic-generator-java to 2.8.0 and update gax-java to 2.18.1 PiperOrigin-RevId: 450543911 Source-Link: https://github.com/googleapis/googleapis/commit/55283447ab72f10b6c2571d770af0498b593e84f Source-Link: https://github.com/googleapis/googleapis-gen/commit/9f6775cab1958982b88967a43e5e806af0f135db Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOWY2Nzc1Y2FiMTk1ODk4MmI4ODk2N2E0M2U1ZTgwNmFmMGYxMzVkYiJ9 --- .../src/main/java/io/grafeas/v1/CVSS.java | 22 +- .../v1/{CvssProto.java => CVSSProto.java} | 6 +- .../src/main/java/io/grafeas/v1/CVSSv3.java | 10 +- .../src/main/java/io/grafeas/v1/Common.java | 52 +- .../main/java/io/grafeas/v1/Compliance.java | 21 +- .../java/io/grafeas/v1/ComplianceVersion.java | 186 + .../v1/ComplianceVersionOrBuilder.java | 27 + .../src/main/java/io/grafeas/v1/Digest.java | 721 ++ .../java/io/grafeas/v1/DigestOrBuilder.java | 64 + .../main/java/io/grafeas/v1/Distribution.java | 28 +- .../io/grafeas/v1/DistributionOrBuilder.java | 8 +- .../main/java/io/grafeas/v1/FileLocation.java | 634 ++ .../io/grafeas/v1/FileLocationOrBuilder.java | 53 + .../java/io/grafeas/v1/GrafeasClient.java | 10 +- .../java/io/grafeas/v1/InTotoStatement.java | 219 + .../grafeas/v1/InTotoStatementOrBuilder.java | 15 + .../io/grafeas/v1/InTotoStatementProto.java | 43 +- .../src/main/java/io/grafeas/v1/License.java | 834 ++ .../java/io/grafeas/v1/LicenseOrBuilder.java | 84 + .../src/main/java/io/grafeas/v1/Location.java | 40 +- .../java/io/grafeas/v1/LocationOrBuilder.java | 11 +- .../src/main/java/io/grafeas/v1/Package.java | 82 +- .../main/java/io/grafeas/v1/PackageNote.java | 3009 ++++++- .../io/grafeas/v1/PackageNoteOrBuilder.java | 301 +- .../java/io/grafeas/v1/PackageOccurrence.java | 1151 ++- .../v1/PackageOccurrenceOrBuilder.java | 177 +- .../java/io/grafeas/v1/SlsaProvenance.java | 65 +- ...terClass.java => SlsaProvenanceProto.java} | 10 +- .../io/grafeas/v1/SlsaProvenanceZeroTwo.java | 7149 +++++++++++++++++ .../v1/SlsaProvenanceZeroTwoOrBuilder.java | 111 + .../v1/SlsaProvenanceZeroTwoProto.java | 206 + .../java/io/grafeas/v1/Vulnerability.java | 17 +- .../grafeas/v1/VulnerabilityOccurrence.java | 546 +- .../grafeas/v1/stub/GrafeasStubSettings.java | 1 - .../src/main/proto/grafeas/v1/common.proto | 29 + .../main/proto/grafeas/v1/compliance.proto | 3 + .../src/main/proto/grafeas/v1/cvss.proto | 8 +- .../proto/grafeas/v1/dsse_attestation.proto | 2 +- .../proto/grafeas/v1/intoto_statement.proto | 2 + .../src/main/proto/grafeas/v1/package.proto | 84 +- .../proto/grafeas/v1/slsa_provenance.proto | 3 +- .../grafeas/v1/slsa_provenance_zero_two.proto | 82 + .../main/proto/grafeas/v1/vulnerability.proto | 3 + 43 files changed, 15445 insertions(+), 684 deletions(-) rename java-grafeas/src/main/java/io/grafeas/v1/{CvssProto.java => CVSSProto.java} (98%) create mode 100644 java-grafeas/src/main/java/io/grafeas/v1/Digest.java create mode 100644 java-grafeas/src/main/java/io/grafeas/v1/DigestOrBuilder.java create mode 100644 java-grafeas/src/main/java/io/grafeas/v1/FileLocation.java create mode 100644 java-grafeas/src/main/java/io/grafeas/v1/FileLocationOrBuilder.java create mode 100644 java-grafeas/src/main/java/io/grafeas/v1/License.java create mode 100644 java-grafeas/src/main/java/io/grafeas/v1/LicenseOrBuilder.java rename java-grafeas/src/main/java/io/grafeas/v1/{SlsaProvenanceOuterClass.java => SlsaProvenanceProto.java} (97%) create mode 100644 java-grafeas/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwo.java create mode 100644 java-grafeas/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoOrBuilder.java create mode 100644 java-grafeas/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoProto.java create mode 100644 java-grafeas/src/main/proto/grafeas/v1/slsa_provenance_zero_two.proto diff --git a/java-grafeas/src/main/java/io/grafeas/v1/CVSS.java b/java-grafeas/src/main/java/io/grafeas/v1/CVSS.java index f9dc47bb8980..8f7c429e5481 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/CVSS.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/CVSS.java @@ -25,10 +25,8 @@ *
  * 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 multiple versions of
- * CVSS. The intention is that as new versions of CVSS scores get added, we
- * will be able to modify this message rather than adding new protos for each
- * new version of the score.
+ * 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} @@ -184,13 +182,13 @@ private CVSS( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.grafeas.v1.CvssProto.internal_static_grafeas_v1_CVSS_descriptor; + 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 + return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSS_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grafeas.v1.CVSS.class, io.grafeas.v1.CVSS.Builder.class); } @@ -1480,10 +1478,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
    * 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 multiple versions of
-   * CVSS. The intention is that as new versions of CVSS scores get added, we
-   * will be able to modify this message rather than adding new protos for each
-   * new version of the score.
+   * 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} @@ -1493,13 +1489,13 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@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; + 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 + return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSS_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grafeas.v1.CVSS.class, io.grafeas.v1.CVSS.Builder.class); } @@ -1550,7 +1546,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.grafeas.v1.CvssProto.internal_static_grafeas_v1_CVSS_descriptor; + return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSS_descriptor; } @java.lang.Override diff --git a/java-grafeas/src/main/java/io/grafeas/v1/CvssProto.java b/java-grafeas/src/main/java/io/grafeas/v1/CVSSProto.java similarity index 98% rename from java-grafeas/src/main/java/io/grafeas/v1/CvssProto.java rename to java-grafeas/src/main/java/io/grafeas/v1/CVSSProto.java index f0fdc192a99a..541ecadef397 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/CvssProto.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/CVSSProto.java @@ -19,8 +19,8 @@ package io.grafeas.v1; -public final class CvssProto { - private CvssProto() {} +public final class CVSSProto { + private CVSSProto() {} public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} @@ -111,7 +111,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "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\003B\\\n\rio.grafeas.v1B\tCvssPro" + + "\013IMPACT_NONE\020\003B\\\n\rio.grafeas.v1B\tCVSSPro" + "toP\001Z8google.golang.org/genproto/googlea" + "pis/grafeas/v1;grafeas\242\002\003GRAb\006proto3" }; diff --git a/java-grafeas/src/main/java/io/grafeas/v1/CVSSv3.java b/java-grafeas/src/main/java/io/grafeas/v1/CVSSv3.java index c026f561f036..06f008ca3a3d 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/CVSSv3.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/CVSSv3.java @@ -172,13 +172,13 @@ private CVSSv3( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.grafeas.v1.CvssProto.internal_static_grafeas_v1_CVSSv3_descriptor; + 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 + return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSSv3_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grafeas.v1.CVSSv3.class, io.grafeas.v1.CVSSv3.Builder.class); } @@ -1338,13 +1338,13 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@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; + 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 + return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSSv3_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grafeas.v1.CVSSv3.class, io.grafeas.v1.CVSSv3.Builder.class); } @@ -1393,7 +1393,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.grafeas.v1.CvssProto.internal_static_grafeas_v1_CVSSv3_descriptor; + return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSSv3_descriptor; } @java.lang.Override 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 cdb3ebb18e65..f7c01d6e2d84 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/Common.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/Common.java @@ -44,6 +44,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r 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; @@ -60,14 +72,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\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*\276\001\n\010NoteKind\022\031\n\025NOTE_KIND_UNSPECIF" - + "IED\020\000\022\021\n\rVULNERABILITY\020\001\022\t\n\005BUILD\020\002\022\t\n\005I" - + "MAGE\020\003\022\013\n\007PACKAGE\020\004\022\016\n\nDEPLOYMENT\020\005\022\r\n\tD" - + "ISCOVERY\020\006\022\017\n\013ATTESTATION\020\007\022\013\n\007UPGRADE\020\010" - + "\022\016\n\nCOMPLIANCE\020\t\022\024\n\020DSSE_ATTESTATION\020\nBQ" - + "\n\rio.grafeas.v1P\001Z8google.golang.org/gen" - + "proto/googleapis/grafeas/v1;grafeas\242\002\003GR" - + "Ab\006proto3" + + "\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( @@ -101,6 +116,27 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { 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/java-grafeas/src/main/java/io/grafeas/v1/Compliance.java b/java-grafeas/src/main/java/io/grafeas/v1/Compliance.java index 70494d593f16..0d0fe5d73fd5 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/Compliance.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/Compliance.java @@ -67,15 +67,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\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\"5\n\021ComplianceVersion\022\017\n\007cpe_uri\030\001 \001(\t" - + "\022\017\n\007version\030\002 \001(\t\"p\n\024ComplianceOccurrenc" - + "e\0229\n\023non_compliant_files\030\002 \003(\0132\034.grafeas" - + ".v1.NonCompliantFile\022\035\n\025non_compliance_r" - + "eason\030\003 \001(\t\"I\n\020NonCompliantFile\022\014\n\004path\030" - + "\001 \001(\t\022\027\n\017display_command\030\002 \001(\t\022\016\n\006reason" - + "\030\003 \001(\tBQ\n\rio.grafeas.v1P\001Z8google.golang" - + ".org/genproto/googleapis/grafeas/v1;graf" - + "eas\242\002\003GRAb\006proto3" + + "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( @@ -111,7 +112,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_grafeas_v1_ComplianceVersion_descriptor, new java.lang.String[] { - "CpeUri", "Version", + "CpeUri", "BenchmarkDocument", "Version", }); internal_static_grafeas_v1_ComplianceOccurrence_descriptor = getDescriptor().getMessageTypes().get(2); diff --git a/java-grafeas/src/main/java/io/grafeas/v1/ComplianceVersion.java b/java-grafeas/src/main/java/io/grafeas/v1/ComplianceVersion.java index be2de0861500..5c3e27b2503e 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/ComplianceVersion.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/ComplianceVersion.java @@ -41,6 +41,7 @@ private ComplianceVersion(com.google.protobuf.GeneratedMessageV3.Builder buil private ComplianceVersion() { cpeUri_ = ""; + benchmarkDocument_ = ""; version_ = ""; } @@ -87,6 +88,13 @@ private ComplianceVersion( version_ = s; break; } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + benchmarkDocument_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -171,6 +179,57 @@ public com.google.protobuf.ByteString getCpeUriBytes() { } } + public static final int BENCHMARK_DOCUMENT_FIELD_NUMBER = 3; + 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; private volatile java.lang.Object version_; /** @@ -242,6 +301,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io 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_); + } unknownFields.writeTo(output); } @@ -257,6 +319,9 @@ public int getSerializedSize() { 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 += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -273,6 +338,7 @@ public boolean equals(final java.lang.Object 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 (!unknownFields.equals(other.unknownFields)) return false; return true; @@ -287,6 +353,8 @@ public int hashCode() { 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) + unknownFields.hashCode(); @@ -434,6 +502,8 @@ public Builder clear() { super.clear(); cpeUri_ = ""; + benchmarkDocument_ = ""; + version_ = ""; return this; @@ -462,6 +532,7 @@ public io.grafeas.v1.ComplianceVersion build() { public io.grafeas.v1.ComplianceVersion buildPartial() { io.grafeas.v1.ComplianceVersion result = new io.grafeas.v1.ComplianceVersion(this); result.cpeUri_ = cpeUri_; + result.benchmarkDocument_ = benchmarkDocument_; result.version_ = version_; onBuilt(); return result; @@ -516,6 +587,10 @@ public Builder mergeFrom(io.grafeas.v1.ComplianceVersion other) { cpeUri_ = other.cpeUri_; onChanged(); } + if (!other.getBenchmarkDocument().isEmpty()) { + benchmarkDocument_ = other.benchmarkDocument_; + onChanged(); + } if (!other.getVersion().isEmpty()) { version_ = other.version_; onChanged(); @@ -660,6 +735,117 @@ public Builder setCpeUriBytes(com.google.protobuf.ByteString value) { 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; + 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(); + 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; + onChanged(); + return this; + } + private java.lang.Object version_ = ""; /** * diff --git a/java-grafeas/src/main/java/io/grafeas/v1/ComplianceVersionOrBuilder.java b/java-grafeas/src/main/java/io/grafeas/v1/ComplianceVersionOrBuilder.java index ddc678759cf2..70c05247dd15 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/ComplianceVersionOrBuilder.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/ComplianceVersionOrBuilder.java @@ -51,6 +51,33 @@ public interface ComplianceVersionOrBuilder */ 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(); + /** * * diff --git a/java-grafeas/src/main/java/io/grafeas/v1/Digest.java b/java-grafeas/src/main/java/io/grafeas/v1/Digest.java new file mode 100644 index 000000000000..be8e4a948452 --- /dev/null +++ b/java-grafeas/src/main/java/io/grafeas/v1/Digest.java @@ -0,0 +1,721 @@ +/* + * 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/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; + } + + private Digest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + 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(); + + algo_ = s; + break; + } + case 18: + { + digestBytes_ = input.readBytes(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + 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; + 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_; + /** + * + * + *
+   * 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_); + } + unknownFields.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 += unknownFields.getSerializedSize(); + memoizedSize = size; + 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 (!unknownFields.equals(other.unknownFields)) return false; + 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) + unknownFields.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() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + 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); + result.algo_ = algo_; + result.digestBytes_ = digestBytes_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.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_; + onChanged(); + } + if (other.getDigestBytes() != com.google.protobuf.ByteString.EMPTY) { + setDigestBytes(other.getDigestBytes()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + io.grafeas.v1.Digest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grafeas.v1.Digest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + 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; + onChanged(); + return this; + } + /** + * + * + *
+     * `SHA1`, `SHA512` etc.
+     * 
+ * + * string algo = 1; + * + * @return This builder for chaining. + */ + public Builder clearAlgo() { + + algo_ = getDefaultInstance().getAlgo(); + 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; + 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Value of the digest.
+     * 
+ * + * bytes digest_bytes = 2; + * + * @return This builder for chaining. + */ + public Builder clearDigestBytes() { + + 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 { + return new Digest(input, extensionRegistry); + } + }; + + public static com.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/java-grafeas/src/main/java/io/grafeas/v1/DigestOrBuilder.java b/java-grafeas/src/main/java/io/grafeas/v1/DigestOrBuilder.java new file mode 100644 index 000000000000..477c033274a8 --- /dev/null +++ b/java-grafeas/src/main/java/io/grafeas/v1/DigestOrBuilder.java @@ -0,0 +1,64 @@ +/* + * 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/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/java-grafeas/src/main/java/io/grafeas/v1/Distribution.java b/java-grafeas/src/main/java/io/grafeas/v1/Distribution.java index e5cbae5bae1b..ada0f267ae42 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/Distribution.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/Distribution.java @@ -164,11 +164,11 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
    * denoting the package manager version distributing a package.
    * 
* - * string cpe_uri = 1; + * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The cpeUri. */ @@ -188,11 +188,11 @@ public java.lang.String getCpeUri() { * * *
-   * Required. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
    * denoting the package manager version distributing a package.
    * 
* - * string cpe_uri = 1; + * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for cpeUri. */ @@ -845,11 +845,11 @@ public Builder mergeFrom( * * *
-     * Required. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
      * denoting the package manager version distributing a package.
      * 
* - * string cpe_uri = 1; + * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The cpeUri. */ @@ -868,11 +868,11 @@ public java.lang.String getCpeUri() { * * *
-     * Required. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
      * denoting the package manager version distributing a package.
      * 
* - * string cpe_uri = 1; + * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for cpeUri. */ @@ -891,11 +891,11 @@ public com.google.protobuf.ByteString getCpeUriBytes() { * * *
-     * Required. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
      * denoting the package manager version distributing a package.
      * 
* - * string cpe_uri = 1; + * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; * * @param value The cpeUri to set. * @return This builder for chaining. @@ -913,11 +913,11 @@ public Builder setCpeUri(java.lang.String value) { * * *
-     * Required. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
      * denoting the package manager version distributing a package.
      * 
* - * string cpe_uri = 1; + * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ @@ -931,11 +931,11 @@ public Builder clearCpeUri() { * * *
-     * Required. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+     * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
      * denoting the package manager version distributing a package.
      * 
* - * string cpe_uri = 1; + * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; * * @param value The bytes for cpeUri to set. * @return This builder for chaining. diff --git a/java-grafeas/src/main/java/io/grafeas/v1/DistributionOrBuilder.java b/java-grafeas/src/main/java/io/grafeas/v1/DistributionOrBuilder.java index ce00347017ef..54ddb6187c71 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/DistributionOrBuilder.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/DistributionOrBuilder.java @@ -28,11 +28,11 @@ public interface DistributionOrBuilder * * *
-   * Required. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
    * denoting the package manager version distributing a package.
    * 
* - * string cpe_uri = 1; + * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The cpeUri. */ @@ -41,11 +41,11 @@ public interface DistributionOrBuilder * * *
-   * Required. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
+   * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
    * denoting the package manager version distributing a package.
    * 
* - * string cpe_uri = 1; + * string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for cpeUri. */ diff --git a/java-grafeas/src/main/java/io/grafeas/v1/FileLocation.java b/java-grafeas/src/main/java/io/grafeas/v1/FileLocation.java new file mode 100644 index 000000000000..62f3e0b0fce6 --- /dev/null +++ b/java-grafeas/src/main/java/io/grafeas/v1/FileLocation.java @@ -0,0 +1,634 @@ +/* + * 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/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; + } + + private FileLocation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + 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(); + + filePath_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + 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; + 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_); + } + unknownFields.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 += unknownFields.getSerializedSize(); + memoizedSize = size; + 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 (!unknownFields.equals(other.unknownFields)) return false; + 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) + unknownFields.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() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + 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); + result.filePath_ = filePath_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.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_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + io.grafeas.v1.FileLocation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grafeas.v1.FileLocation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + 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; + 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(); + 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; + 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 { + return new FileLocation(input, extensionRegistry); + } + }; + + public static com.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/java-grafeas/src/main/java/io/grafeas/v1/FileLocationOrBuilder.java b/java-grafeas/src/main/java/io/grafeas/v1/FileLocationOrBuilder.java new file mode 100644 index 000000000000..4a9125ca7fb7 --- /dev/null +++ b/java-grafeas/src/main/java/io/grafeas/v1/FileLocationOrBuilder.java @@ -0,0 +1,53 @@ +/* + * 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/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/java-grafeas/src/main/java/io/grafeas/v1/GrafeasClient.java b/java-grafeas/src/main/java/io/grafeas/v1/GrafeasClient.java index d282ac561f60..e3a275ca7689 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/GrafeasClient.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/GrafeasClient.java @@ -18,7 +18,6 @@ import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; -import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.paging.AbstractFixedSizeCollection; import com.google.api.gax.paging.AbstractPage; @@ -134,7 +133,6 @@ public static final GrafeasClient create(GrafeasSettings settings) throws IOExce * Constructs an instance of GrafeasClient, using the given stub for making calls. This is for * advanced usage - prefer using create(GrafeasSettings). */ - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public static final GrafeasClient create(GrafeasStub stub) { return new GrafeasClient(stub); } @@ -148,7 +146,6 @@ protected GrafeasClient(GrafeasSettings settings) throws IOException { this.stub = ((GrafeasStubSettings) settings.getStubSettings()).createStub(); } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected GrafeasClient(GrafeasStub stub) { this.settings = null; this.stub = stub; @@ -158,7 +155,6 @@ public final GrafeasSettings getSettings() { return settings; } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public GrafeasStub getStub() { return stub; } @@ -402,7 +398,7 @@ public final ListOccurrencesPagedResponse listOccurrences(ListOccurrencesRequest * .build(); * while (true) { * ListOccurrencesResponse response = grafeasClient.listOccurrencesCallable().call(request); - * for (Occurrence element : response.getResponsesList()) { + * for (Occurrence element : response.getOccurrencesList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -1206,7 +1202,7 @@ public final UnaryCallable listNotesPa * .build(); * while (true) { * ListNotesResponse response = grafeasClient.listNotesCallable().call(request); - * for (Note element : response.getResponsesList()) { + * for (Note element : response.getNotesList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -1810,7 +1806,7 @@ public final ListNoteOccurrencesPagedResponse listNoteOccurrences( * while (true) { * ListNoteOccurrencesResponse response = * grafeasClient.listNoteOccurrencesCallable().call(request); - * for (Occurrence element : response.getResponsesList()) { + * for (Occurrence element : response.getOccurrencesList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); diff --git a/java-grafeas/src/main/java/io/grafeas/v1/InTotoStatement.java b/java-grafeas/src/main/java/io/grafeas/v1/InTotoStatement.java index 0f4638eebcfe..c19cf79074df 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/InTotoStatement.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/InTotoStatement.java @@ -130,6 +130,22 @@ private InTotoStatement( predicateCase_ = 5; break; } + case 50: + { + io.grafeas.v1.SlsaProvenanceZeroTwo.Builder subBuilder = null; + if (predicateCase_ == 6) { + subBuilder = ((io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_).toBuilder(); + } + predicate_ = + input.readMessage( + io.grafeas.v1.SlsaProvenanceZeroTwo.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_); + predicate_ = subBuilder.buildPartial(); + } + predicateCase_ = 6; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -176,6 +192,7 @@ public enum PredicateCase com.google.protobuf.AbstractMessage.InternalOneOfEnum { PROVENANCE(4), SLSA_PROVENANCE(5), + SLSA_PROVENANCE_ZERO_TWO(6), PREDICATE_NOT_SET(0); private final int value; @@ -198,6 +215,8 @@ public static PredicateCase forNumber(int value) { return PROVENANCE; case 5: return SLSA_PROVENANCE; + case 6: + return SLSA_PROVENANCE_ZERO_TWO; case 0: return PREDICATE_NOT_SET; default: @@ -402,6 +421,37 @@ public io.grafeas.v1.SlsaProvenanceOrBuilder getSlsaProvenanceOrBuilder() { 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 @@ -431,6 +481,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (predicateCase_ == 5) { output.writeMessage(5, (io.grafeas.v1.SlsaProvenance) predicate_); } + if (predicateCase_ == 6) { + output.writeMessage(6, (io.grafeas.v1.SlsaProvenanceZeroTwo) predicate_); + } unknownFields.writeTo(output); } @@ -459,6 +512,11 @@ public int getSerializedSize() { 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 += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -485,6 +543,9 @@ public boolean equals(final java.lang.Object obj) { case 5: if (!getSlsaProvenance().equals(other.getSlsaProvenance())) return false; break; + case 6: + if (!getSlsaProvenanceZeroTwo().equals(other.getSlsaProvenanceZeroTwo())) return false; + break; case 0: default: } @@ -516,6 +577,10 @@ public int hashCode() { 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: } @@ -731,6 +796,13 @@ public io.grafeas.v1.InTotoStatement buildPartial() { result.predicate_ = slsaProvenanceBuilder_.build(); } } + if (predicateCase_ == 6) { + if (slsaProvenanceZeroTwoBuilder_ == null) { + result.predicate_ = predicate_; + } else { + result.predicate_ = slsaProvenanceZeroTwoBuilder_.build(); + } + } result.predicateCase_ = predicateCase_; onBuilt(); return result; @@ -827,6 +899,11 @@ public Builder mergeFrom(io.grafeas.v1.InTotoStatement other) { mergeSlsaProvenance(other.getSlsaProvenance()); break; } + case SLSA_PROVENANCE_ZERO_TWO: + { + mergeSlsaProvenanceZeroTwo(other.getSlsaProvenanceZeroTwo()); + break; + } case PREDICATE_NOT_SET: { break; @@ -1558,6 +1635,148 @@ public io.grafeas.v1.SlsaProvenanceOrBuilder getSlsaProvenanceOrBuilder() { 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); diff --git a/java-grafeas/src/main/java/io/grafeas/v1/InTotoStatementOrBuilder.java b/java-grafeas/src/main/java/io/grafeas/v1/InTotoStatementOrBuilder.java index 0d45b3147d39..d413efa307d3 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/InTotoStatementOrBuilder.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/InTotoStatementOrBuilder.java @@ -115,5 +115,20 @@ public interface InTotoStatementOrBuilder /** .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/java-grafeas/src/main/java/io/grafeas/v1/InTotoStatementProto.java b/java-grafeas/src/main/java/io/grafeas/v1/InTotoStatementProto.java index ac9172303b79..9047c861ca50 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/InTotoStatementProto.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/InTotoStatementProto.java @@ -51,26 +51,30 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { 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\"\334\001" - + "\n\017InTotoStatement\022\023\n\004type\030\001 \001(\tR\005_type\022$" - + "\n\007subject\030\002 \003(\0132\023.grafeas.v1.Subject\022\026\n\016" - + "predicate_type\030\003 \001(\t\0222\n\nprovenance\030\004 \001(\013" - + "2\034.grafeas.v1.InTotoProvenanceH\000\0225\n\017slsa" - + "_provenance\030\005 \001(\0132\032.grafeas.v1.SlsaProve" - + "nanceH\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.Subje" - + "ct.DigestEntry\032-\n\013DigestEntry\022\013\n\003key\030\001 \001" - + "(\t\022\r\n\005value\030\002 \001(\t:\0028\001Bg\n\rio.grafeas.v1B\024" - + "InTotoStatementProtoP\001Z8google.golang.or" - + "g/genproto/googleapis/grafeas/v1;grafeas" - + "\242\002\003GRAb\006proto3" + + "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.SlsaProvenanceOuterClass.getDescriptor(), + io.grafeas.v1.SlsaProvenanceProto.getDescriptor(), + io.grafeas.v1.SlsaProvenanceZeroTwoProto.getDescriptor(), }); internal_static_grafeas_v1_InTotoStatement_descriptor = getDescriptor().getMessageTypes().get(0); @@ -78,7 +82,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_grafeas_v1_InTotoStatement_descriptor, new java.lang.String[] { - "Type", "Subject", "PredicateType", "Provenance", "SlsaProvenance", "Predicate", + "Type", + "Subject", + "PredicateType", + "Provenance", + "SlsaProvenance", + "SlsaProvenanceZeroTwo", + "Predicate", }); internal_static_grafeas_v1_Subject_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_grafeas_v1_Subject_fieldAccessorTable = @@ -96,7 +106,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); io.grafeas.v1.InTotoProvenanceProto.getDescriptor(); - io.grafeas.v1.SlsaProvenanceOuterClass.getDescriptor(); + io.grafeas.v1.SlsaProvenanceProto.getDescriptor(); + io.grafeas.v1.SlsaProvenanceZeroTwoProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/java-grafeas/src/main/java/io/grafeas/v1/License.java b/java-grafeas/src/main/java/io/grafeas/v1/License.java new file mode 100644 index 000000000000..e77a418b6980 --- /dev/null +++ b/java-grafeas/src/main/java/io/grafeas/v1/License.java @@ -0,0 +1,834 @@ +/* + * 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/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; + } + + private License( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + 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(); + + expression_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + comments_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + 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; + 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; + 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_); + } + unknownFields.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 += unknownFields.getSerializedSize(); + memoizedSize = size; + 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 (!unknownFields.equals(other.unknownFields)) return false; + 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) + unknownFields.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() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + 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); + result.expression_ = expression_; + result.comments_ = comments_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.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_; + onChanged(); + } + if (!other.getComments().isEmpty()) { + comments_ = other.comments_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + io.grafeas.v1.License parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grafeas.v1.License) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + 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; + 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(); + 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; + 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Comments
+     * 
+ * + * string comments = 2; + * + * @return This builder for chaining. + */ + public Builder clearComments() { + + comments_ = getDefaultInstance().getComments(); + 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; + 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 { + return new License(input, extensionRegistry); + } + }; + + public static com.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/java-grafeas/src/main/java/io/grafeas/v1/LicenseOrBuilder.java b/java-grafeas/src/main/java/io/grafeas/v1/LicenseOrBuilder.java new file mode 100644 index 000000000000..4311d244030a --- /dev/null +++ b/java-grafeas/src/main/java/io/grafeas/v1/LicenseOrBuilder.java @@ -0,0 +1,84 @@ +/* + * 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/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/java-grafeas/src/main/java/io/grafeas/v1/Location.java b/java-grafeas/src/main/java/io/grafeas/v1/Location.java index 25d39c25f782..adb49a4fdff8 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/Location.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/Location.java @@ -140,8 +140,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
-   * denoting the package manager version distributing a package.
+   * Deprecated.
+   * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
    * 
* * string cpe_uri = 1; @@ -164,8 +164,8 @@ public java.lang.String getCpeUri() { * * *
-   * Required. The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
-   * denoting the package manager version distributing a package.
+   * Deprecated.
+   * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
    * 
* * string cpe_uri = 1; @@ -191,6 +191,7 @@ public com.google.protobuf.ByteString getCpeUriBytes() { * * *
+   * Deprecated.
    * The version installed at this location.
    * 
* @@ -206,6 +207,7 @@ public boolean hasVersion() { * * *
+   * Deprecated.
    * The version installed at this location.
    * 
* @@ -221,6 +223,7 @@ public io.grafeas.v1.Version getVersion() { * * *
+   * Deprecated.
    * The version installed at this location.
    * 
* @@ -639,8 +642,8 @@ public Builder mergeFrom( * * *
-     * Required. The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
+     * Deprecated.
+     * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
      * 
* * string cpe_uri = 1; @@ -662,8 +665,8 @@ public java.lang.String getCpeUri() { * * *
-     * Required. The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
+     * Deprecated.
+     * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
      * 
* * string cpe_uri = 1; @@ -685,8 +688,8 @@ public com.google.protobuf.ByteString getCpeUriBytes() { * * *
-     * Required. The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
+     * Deprecated.
+     * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
      * 
* * string cpe_uri = 1; @@ -707,8 +710,8 @@ public Builder setCpeUri(java.lang.String value) { * * *
-     * Required. The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
+     * Deprecated.
+     * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
      * 
* * string cpe_uri = 1; @@ -725,8 +728,8 @@ public Builder clearCpeUri() { * * *
-     * Required. The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
-     * denoting the package manager version distributing a package.
+     * Deprecated.
+     * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
      * 
* * string cpe_uri = 1; @@ -753,6 +756,7 @@ public Builder setCpeUriBytes(com.google.protobuf.ByteString value) { * * *
+     * Deprecated.
      * The version installed at this location.
      * 
* @@ -767,6 +771,7 @@ public boolean hasVersion() { * * *
+     * Deprecated.
      * The version installed at this location.
      * 
* @@ -785,6 +790,7 @@ public io.grafeas.v1.Version getVersion() { * * *
+     * Deprecated.
      * The version installed at this location.
      * 
* @@ -807,6 +813,7 @@ public Builder setVersion(io.grafeas.v1.Version value) { * * *
+     * Deprecated.
      * The version installed at this location.
      * 
* @@ -826,6 +833,7 @@ public Builder setVersion(io.grafeas.v1.Version.Builder builderForValue) { * * *
+     * Deprecated.
      * The version installed at this location.
      * 
* @@ -849,6 +857,7 @@ public Builder mergeVersion(io.grafeas.v1.Version value) { * * *
+     * Deprecated.
      * The version installed at this location.
      * 
* @@ -869,6 +878,7 @@ public Builder clearVersion() { * * *
+     * Deprecated.
      * The version installed at this location.
      * 
* @@ -883,6 +893,7 @@ public io.grafeas.v1.Version.Builder getVersionBuilder() { * * *
+     * Deprecated.
      * The version installed at this location.
      * 
* @@ -899,6 +910,7 @@ public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { * * *
+     * Deprecated.
      * The version installed at this location.
      * 
* diff --git a/java-grafeas/src/main/java/io/grafeas/v1/LocationOrBuilder.java b/java-grafeas/src/main/java/io/grafeas/v1/LocationOrBuilder.java index 14710b179bbe..a9d083066964 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/LocationOrBuilder.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/LocationOrBuilder.java @@ -28,8 +28,8 @@ public interface LocationOrBuilder * * *
-   * Required. The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
-   * denoting the package manager version distributing a package.
+   * Deprecated.
+   * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
    * 
* * string cpe_uri = 1; @@ -41,8 +41,8 @@ public interface LocationOrBuilder * * *
-   * Required. The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
-   * denoting the package manager version distributing a package.
+   * Deprecated.
+   * The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
    * 
* * string cpe_uri = 1; @@ -55,6 +55,7 @@ public interface LocationOrBuilder * * *
+   * Deprecated.
    * The version installed at this location.
    * 
* @@ -67,6 +68,7 @@ public interface LocationOrBuilder * * *
+   * Deprecated.
    * The version installed at this location.
    * 
* @@ -79,6 +81,7 @@ public interface LocationOrBuilder * * *
+   * Deprecated.
    * The version installed at this location.
    * 
* diff --git a/java-grafeas/src/main/java/io/grafeas/v1/Package.java b/java-grafeas/src/main/java/io/grafeas/v1/Package.java index b8a628a4ba46..0ccea9a3d6f9 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/Package.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/Package.java @@ -57,31 +57,48 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { - "\n\030grafeas/v1/package.proto\022\ngrafeas.v1\"\262" - + "\001\n\014Distribution\022\017\n\007cpe_uri\030\001 \001(\t\022.\n\014arch" - + "itecture\030\002 \001(\0162\030.grafeas.v1.Architecture" - + "\022+\n\016latest_version\030\003 \001(\0132\023.grafeas.v1.Ve" - + "rsion\022\022\n\nmaintainer\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_u" - + "ri\030\001 \001(\t\022$\n\007version\030\002 \001(\0132\023.grafeas.v1.V" - + "ersion\022\014\n\004path\030\003 \001(\t\"K\n\013PackageNote\022\014\n\004n" - + "ame\030\001 \001(\t\022.\n\014distribution\030\n \003(\0132\030.grafea" - + "s.v1.Distribution\"I\n\021PackageOccurrence\022\014" - + "\n\004name\030\001 \001(\t\022&\n\010location\030\002 \003(\0132\024.grafeas" - + ".v1.Location\"\340\001\n\007Version\022\r\n\005epoch\030\001 \001(\005\022" - + "\014\n\004name\030\002 \001(\t\022\020\n\010revision\030\003 \001(\t\022\021\n\tinclu" - + "sive\030\006 \001(\010\022-\n\004kind\030\004 \001(\0162\037.grafeas.v1.Ve" - + "rsion.VersionKind\022\021\n\tfull_name\030\005 \001(\t\"Q\n\013" - + "VersionKind\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\014Architecture\022\034\n\030ARCHITECTURE_UNSPECIF" - + "IED\020\000\022\007\n\003X86\020\001\022\007\n\003X64\020\002BQ\n\rio.grafeas.v1" - + "P\001Z8google.golang.org/genproto/googleapi" - + "s/grafeas/v1;grafeas\242\002\003GRAb\006proto3" + "\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[] {}); + 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( @@ -101,7 +118,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_grafeas_v1_PackageNote_descriptor, new java.lang.String[] { - "Name", "Distribution", + "Name", + "Distribution", + "PackageType", + "CpeUri", + "Architecture", + "Version", + "Maintainer", + "Url", + "Description", + "License", + "Digest", }); internal_static_grafeas_v1_PackageOccurrence_descriptor = getDescriptor().getMessageTypes().get(3); @@ -109,7 +136,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_grafeas_v1_PackageOccurrence_descriptor, new java.lang.String[] { - "Name", "Location", + "Name", "Location", "PackageType", "CpeUri", "Architecture", "License", "Version", }); internal_static_grafeas_v1_Version_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_grafeas_v1_Version_fieldAccessorTable = @@ -118,6 +145,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { 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/java-grafeas/src/main/java/io/grafeas/v1/PackageNote.java b/java-grafeas/src/main/java/io/grafeas/v1/PackageNote.java index ef9eca09c1a7..a20da0c0c146 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/PackageNote.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/PackageNote.java @@ -23,9 +23,7 @@ * * *
- * This represents a particular package that is distributed over various
- * channels. E.g., glibc (aka libc6) is distributed by many, at various
- * versions.
+ * PackageNote represents a particular package version.
  * 
* * Protobuf type {@code grafeas.v1.PackageNote} @@ -43,6 +41,13 @@ private PackageNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { private PackageNote() { name_ = ""; distribution_ = java.util.Collections.emptyList(); + packageType_ = ""; + cpeUri_ = ""; + architecture_ = 0; + maintainer_ = ""; + url_ = ""; + description_ = ""; + digest_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -92,6 +97,85 @@ private PackageNote( input.readMessage(io.grafeas.v1.Distribution.parser(), extensionRegistry)); break; } + case 90: + { + java.lang.String s = input.readStringRequireUtf8(); + + packageType_ = s; + break; + } + case 98: + { + java.lang.String s = input.readStringRequireUtf8(); + + cpeUri_ = s; + break; + } + case 104: + { + int rawValue = input.readEnum(); + + architecture_ = rawValue; + break; + } + case 114: + { + io.grafeas.v1.Version.Builder subBuilder = null; + if (version_ != null) { + subBuilder = version_.toBuilder(); + } + version_ = input.readMessage(io.grafeas.v1.Version.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(version_); + version_ = subBuilder.buildPartial(); + } + + break; + } + case 122: + { + java.lang.String s = input.readStringRequireUtf8(); + + maintainer_ = s; + break; + } + case 130: + { + java.lang.String s = input.readStringRequireUtf8(); + + url_ = s; + break; + } + case 138: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 146: + { + io.grafeas.v1.License.Builder subBuilder = null; + if (license_ != null) { + subBuilder = license_.toBuilder(); + } + license_ = input.readMessage(io.grafeas.v1.License.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(license_); + license_ = subBuilder.buildPartial(); + } + + break; + } + case 154: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + digest_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + digest_.add(input.readMessage(io.grafeas.v1.Digest.parser(), extensionRegistry)); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -111,6 +195,9 @@ private PackageNote( if (((mutable_bitField0_ & 0x00000001) != 0)) { distribution_ = java.util.Collections.unmodifiableList(distribution_); } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + digest_ = java.util.Collections.unmodifiableList(digest_); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -134,10 +221,12 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. Immutable. The name of the package.
+   * The name of the package.
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * * * @return The name. */ @@ -157,10 +246,12 @@ public java.lang.String getName() { * * *
-   * Required. Immutable. The name of the package.
+   * The name of the package.
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * * * @return The bytes for name. */ @@ -183,6 +274,7 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
+   * Deprecated.
    * The various channels by which a package is distributed.
    * 
* @@ -196,6 +288,7 @@ public java.util.List getDistributionList() { * * *
+   * Deprecated.
    * The various channels by which a package is distributed.
    * 
* @@ -210,6 +303,7 @@ public java.util.List getDistributionList() { * * *
+   * Deprecated.
    * The various channels by which a package is distributed.
    * 
* @@ -223,6 +317,7 @@ public int getDistributionCount() { * * *
+   * Deprecated.
    * The various channels by which a package is distributed.
    * 
* @@ -236,6 +331,7 @@ public io.grafeas.v1.Distribution getDistribution(int index) { * * *
+   * Deprecated.
    * The various channels by which a package is distributed.
    * 
* @@ -246,253 +342,828 @@ public io.grafeas.v1.DistributionOrBuilder getDistributionOrBuilder(int index) { return distribution_.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; - } - + public static final int PACKAGE_TYPE_FIELD_NUMBER = 11; + 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 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)); + 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; } - unknownFields.writeTo(output); } - + /** + * + * + *
+   * 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 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)); + 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; } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; } + public static final int CPE_URI_FIELD_NUMBER = 12; + 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 boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.grafeas.v1.PackageNote)) { - return super.equals(obj); + 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; } - 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 (!unknownFields.equals(other.unknownFields)) return false; - return true; } - + /** + * + * + *
+   * 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 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(); + 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; } - hash = (29 * hash) + unknownFields.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 final int ARCHITECTURE_FIELD_NUMBER = 13; + private int 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 enum numeric value on the wire for architecture. + */ + @java.lang.Override + public int getArchitectureValue() { + return architecture_; } - - public static io.grafeas.v1.PackageNote parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + /** + * + * + *
+   * 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() { + @SuppressWarnings("deprecation") + io.grafeas.v1.Architecture result = io.grafeas.v1.Architecture.valueOf(architecture_); + return result == null ? io.grafeas.v1.Architecture.UNRECOGNIZED : result; } - 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 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; } - - public static io.grafeas.v1.PackageNote parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + /** + * + * + *
+   * 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_; } - - public static io.grafeas.v1.PackageNote parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + /** + * + * + *
+   * The version of the package.
+   * 
+ * + * .grafeas.v1.Version version = 14; + */ + @java.lang.Override + public io.grafeas.v1.VersionOrBuilder getVersionOrBuilder() { + return getVersion(); } - 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 final int MAINTAINER_FIELD_NUMBER = 15; + 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; + } } - - 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); + /** + * + * + *
+   * 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 io.grafeas.v1.PackageNote parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static final int URL_FIELD_NUMBER = 16; + 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; + } } - - 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); + /** + * + * + *
+   * 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 io.grafeas.v1.PackageNote parseFrom(com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + public static final int DESCRIPTION_FIELD_NUMBER = 17; + 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; + } } - - 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); + /** + * + * + *
+   * 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 Builder newBuilderForType() { - return newBuilder(); + public boolean hasLicense() { + return license_ != null; } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + /** + * + * + *
+   * 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_; } - - public static Builder newBuilder(io.grafeas.v1.PackageNote prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + /** + * + * + *
+   * 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 getLicense(); } + public static final int DIGEST_FIELD_NUMBER = 19; + 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 Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + 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 - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + public java.util.List getDigestOrBuilderList() { + return digest_; } /** * * *
-   * This represents a particular package that is distributed over various
-   * channels. E.g., glibc (aka libc6) is distributed by many, at various
-   * versions.
+   * Hash value, typically a file digest, that allows unique
+   * identification a specific package.
    * 
* - * Protobuf type {@code grafeas.v1.PackageNote} + * repeated .grafeas.v1.Digest digest = 19; */ - 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 + 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); + } - @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); - } + private byte memoizedIsInitialized = -1; - // Construct using io.grafeas.v1.PackageNote.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } + memoizedIsInitialized = 1; + return true; + } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getDistributionFieldBuilder(); - } + @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_); } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - if (distributionBuilder_ == null) { - distribution_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - distributionBuilder_.clear(); - } - return this; + for (int i = 0; i < distribution_.size(); i++) { + output.writeMessage(10, distribution_.get(i)); } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.grafeas.v1.Package.internal_static_grafeas_v1_PackageNote_descriptor; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(packageType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, packageType_); } - - @java.lang.Override - public io.grafeas.v1.PackageNote getDefaultInstanceForType() { - return io.grafeas.v1.PackageNote.getDefaultInstance(); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpeUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, cpeUri_); } - - @java.lang.Override - public io.grafeas.v1.PackageNote build() { - io.grafeas.v1.PackageNote result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; + 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)); + } + unknownFields.writeTo(output); + } - @java.lang.Override - public io.grafeas.v1.PackageNote buildPartial() { - io.grafeas.v1.PackageNote result = new io.grafeas.v1.PackageNote(this); + @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 += unknownFields.getSerializedSize(); + memoizedSize = size; + 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 (!unknownFields.equals(other.unknownFields)) return false; + 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) + unknownFields.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() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDistributionFieldBuilder(); + getDigestFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (distributionBuilder_ == null) { + distribution_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + distributionBuilder_.clear(); + } + packageType_ = ""; + + cpeUri_ = ""; + + architecture_ = 0; + + if (versionBuilder_ == null) { + version_ = null; + } else { + version_ = null; + versionBuilder_ = null; + } + maintainer_ = ""; + + url_ = ""; + + description_ = ""; + + if (licenseBuilder_ == null) { + license_ = null; + } else { + license_ = null; + licenseBuilder_ = null; + } + if (digestBuilder_ == null) { + digest_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + digestBuilder_.clear(); + } + 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); int from_bitField0_ = bitField0_; result.name_ = name_; if (distributionBuilder_ == null) { @@ -502,137 +1173,1405 @@ public io.grafeas.v1.PackageNote buildPartial() { } result.distribution_ = distribution_; } else { - result.distribution_ = distributionBuilder_.build(); + result.distribution_ = distributionBuilder_.build(); + } + result.packageType_ = packageType_; + result.cpeUri_ = cpeUri_; + result.architecture_ = architecture_; + if (versionBuilder_ == null) { + result.version_ = version_; + } else { + result.version_ = versionBuilder_.build(); + } + result.maintainer_ = maintainer_; + result.url_ = url_; + result.description_ = description_; + if (licenseBuilder_ == null) { + result.license_ = license_; + } else { + result.license_ = licenseBuilder_.build(); + } + if (digestBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + digest_ = java.util.Collections.unmodifiableList(digest_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.digest_ = digest_; + } else { + result.digest_ = digestBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.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_; + onChanged(); + } + if (distributionBuilder_ == null) { + if (!other.distribution_.isEmpty()) { + if (distribution_.isEmpty()) { + distribution_ = other.distribution_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDistributionIsMutable(); + distribution_.addAll(other.distribution_); + } + onChanged(); + } + } else { + if (!other.distribution_.isEmpty()) { + if (distributionBuilder_.isEmpty()) { + distributionBuilder_.dispose(); + distributionBuilder_ = null; + distribution_ = other.distribution_; + bitField0_ = (bitField0_ & ~0x00000001); + distributionBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDistributionFieldBuilder() + : null; + } else { + distributionBuilder_.addAllMessages(other.distribution_); + } + } + } + if (!other.getPackageType().isEmpty()) { + packageType_ = other.packageType_; + onChanged(); + } + if (!other.getCpeUri().isEmpty()) { + cpeUri_ = other.cpeUri_; + onChanged(); + } + if (other.architecture_ != 0) { + setArchitectureValue(other.getArchitectureValue()); + } + if (other.hasVersion()) { + mergeVersion(other.getVersion()); + } + if (!other.getMaintainer().isEmpty()) { + maintainer_ = other.maintainer_; + onChanged(); + } + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.hasLicense()) { + mergeLicense(other.getLicense()); + } + if (digestBuilder_ == null) { + if (!other.digest_.isEmpty()) { + if (digest_.isEmpty()) { + digest_ = other.digest_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureDigestIsMutable(); + digest_.addAll(other.digest_); + } + onChanged(); + } + } else { + if (!other.digest_.isEmpty()) { + if (digestBuilder_.isEmpty()) { + digestBuilder_.dispose(); + digestBuilder_ = null; + digest_ = other.digest_; + bitField0_ = (bitField0_ & ~0x00000002); + digestBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDigestFieldBuilder() + : null; + } else { + digestBuilder_.addAllMessages(other.digest_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + io.grafeas.v1.PackageNote parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grafeas.v1.PackageNote) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + 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; + 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(); + 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; + onChanged(); + return this; + } + + private java.util.List distribution_ = + java.util.Collections.emptyList(); + + private void ensureDistributionIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + distribution_ = new java.util.ArrayList(distribution_); + bitField0_ |= 0x00000001; + } + } + + 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_ & ~0x00000001); + 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_ & 0x00000001) != 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; + 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(); + 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; + 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; + 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(); + 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; + 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; + 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() { + @SuppressWarnings("deprecation") + io.grafeas.v1.Architecture result = io.grafeas.v1.Architecture.valueOf(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(); + } + + 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() { + + 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 versionBuilder_ != null || version_ != null; + } + /** + * + * + *
+     * 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; + onChanged(); + } else { + versionBuilder_.setMessage(value); + } + + 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(); + onChanged(); + } else { + versionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 14; + */ + public Builder mergeVersion(io.grafeas.v1.Version value) { + if (versionBuilder_ == null) { + if (version_ != null) { + version_ = io.grafeas.v1.Version.newBuilder(version_).mergeFrom(value).buildPartial(); + } else { + version_ = value; + } + onChanged(); + } else { + versionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 14; + */ + public Builder clearVersion() { + if (versionBuilder_ == null) { + version_ = null; + onChanged(); + } else { + version_ = null; + versionBuilder_ = null; } - onBuilt(); - return result; - } - @java.lang.Override - public Builder clone() { - return super.clone(); + return this; } + /** + * + * + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 14; + */ + public io.grafeas.v1.Version.Builder getVersionBuilder() { - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); + 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_; } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); + 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(); + } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); + maintainer_ = value; + onChanged(); + return this; } + /** + * + * + *
+     * A freeform text denoting the maintainer of this package.
+     * 
+ * + * string maintainer = 15; + * + * @return This builder for chaining. + */ + public Builder clearMaintainer() { - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); + maintainer_ = getDefaultInstance().getMaintainer(); + 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); - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + maintainer_ = value; + onChanged(); + return this; } - @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); + 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 { - super.mergeFrom(other); - return this; + return (java.lang.String) ref; } } - - public Builder mergeFrom(io.grafeas.v1.PackageNote other) { - if (other == io.grafeas.v1.PackageNote.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (distributionBuilder_ == null) { - if (!other.distribution_.isEmpty()) { - if (distribution_.isEmpty()) { - distribution_ = other.distribution_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDistributionIsMutable(); - distribution_.addAll(other.distribution_); - } - onChanged(); - } + /** + * + * + *
+     * 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 { - if (!other.distribution_.isEmpty()) { - if (distributionBuilder_.isEmpty()) { - distributionBuilder_.dispose(); - distributionBuilder_ = null; - distribution_ = other.distribution_; - bitField0_ = (bitField0_ & ~0x00000001); - distributionBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getDistributionFieldBuilder() - : null; - } else { - distributionBuilder_.addAllMessages(other.distribution_); - } - } + return (com.google.protobuf.ByteString) ref; } - this.mergeUnknownFields(other.unknownFields); + } + /** + * + * + *
+     * 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; onChanged(); return this; } + /** + * + * + *
+     * The homepage for this package.
+     * 
+ * + * string url = 16; + * + * @return This builder for chaining. + */ + public Builder clearUrl() { - @java.lang.Override - public final boolean isInitialized() { - return true; + url_ = getDefaultInstance().getUrl(); + onChanged(); + return this; } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - io.grafeas.v1.PackageNote parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.grafeas.v1.PackageNote) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + /** + * + * + *
+     * 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; + onChanged(); return this; } - private int bitField0_; - - private java.lang.Object name_ = ""; + private java.lang.Object description_ = ""; /** * * *
-     * Required. Immutable. The name of the package.
+     * The description of this package.
      * 
* - * string name = 1; + * string description = 17; * - * @return The name. + * @return The description. */ - public java.lang.String getName() { - java.lang.Object ref = name_; + 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(); - name_ = s; + description_ = s; return s; } else { return (java.lang.String) ref; @@ -642,19 +2581,19 @@ public java.lang.String getName() { * * *
-     * Required. Immutable. The name of the package.
+     * The description of this package.
      * 
* - * string name = 1; + * string description = 17; * - * @return The bytes for name. + * @return The bytes for description. */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; + 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); - name_ = b; + description_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -664,20 +2603,20 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Required. Immutable. The name of the package.
+     * The description of this package.
      * 
* - * string name = 1; + * string description = 17; * - * @param value The name to set. + * @param value The description to set. * @return This builder for chaining. */ - public Builder setName(java.lang.String value) { + public Builder setDescription(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - name_ = value; + description_ = value; onChanged(); return this; } @@ -685,16 +2624,16 @@ public Builder setName(java.lang.String value) { * * *
-     * Required. Immutable. The name of the package.
+     * The description of this package.
      * 
* - * string name = 1; + * string description = 17; * * @return This builder for chaining. */ - public Builder clearName() { + public Builder clearDescription() { - name_ = getDefaultInstance().getName(); + description_ = getDefaultInstance().getDescription(); onChanged(); return this; } @@ -702,108 +2641,282 @@ public Builder clearName() { * * *
-     * Required. Immutable. The name of the package.
+     * The description of this package.
      * 
* - * string name = 1; + * string description = 17; * - * @param value The bytes for name to set. + * @param value The bytes for description to set. * @return This builder for chaining. */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - name_ = value; + description_ = value; onChanged(); return this; } - private java.util.List distribution_ = - java.util.Collections.emptyList(); + 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 licenseBuilder_ != null || license_ != null; + } + /** + * + * + *
+     * 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; + onChanged(); + } else { + licenseBuilder_.setMessage(value); + } - private void ensureDistributionIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - distribution_ = new java.util.ArrayList(distribution_); - bitField0_ |= 0x00000001; + 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(); + onChanged(); + } else { + licenseBuilder_.setMessage(builderForValue.build()); + } + + 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 (license_ != null) { + license_ = io.grafeas.v1.License.newBuilder(license_).mergeFrom(value).buildPartial(); + } else { + license_ = value; + } + onChanged(); + } else { + licenseBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 18; + */ + public Builder clearLicense() { + if (licenseBuilder_ == null) { + license_ = null; + onChanged(); + } else { + license_ = null; + licenseBuilder_ = null; + } + + 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() { + + 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_ & 0x00000002) != 0)) { + digest_ = new java.util.ArrayList(digest_); + bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Distribution, - io.grafeas.v1.Distribution.Builder, - io.grafeas.v1.DistributionOrBuilder> - distributionBuilder_; + io.grafeas.v1.Digest, io.grafeas.v1.Digest.Builder, io.grafeas.v1.DigestOrBuilder> + digestBuilder_; /** * * *
-     * The various channels by which a package is distributed.
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
      * 
* - * repeated .grafeas.v1.Distribution distribution = 10; + * repeated .grafeas.v1.Digest digest = 19; */ - public java.util.List getDistributionList() { - if (distributionBuilder_ == null) { - return java.util.Collections.unmodifiableList(distribution_); + public java.util.List getDigestList() { + if (digestBuilder_ == null) { + return java.util.Collections.unmodifiableList(digest_); } else { - return distributionBuilder_.getMessageList(); + return digestBuilder_.getMessageList(); } } /** * * *
-     * The various channels by which a package is distributed.
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
      * 
* - * repeated .grafeas.v1.Distribution distribution = 10; + * repeated .grafeas.v1.Digest digest = 19; */ - public int getDistributionCount() { - if (distributionBuilder_ == null) { - return distribution_.size(); + public int getDigestCount() { + if (digestBuilder_ == null) { + return digest_.size(); } else { - return distributionBuilder_.getCount(); + return digestBuilder_.getCount(); } } /** * * *
-     * The various channels by which a package is distributed.
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
      * 
* - * repeated .grafeas.v1.Distribution distribution = 10; + * repeated .grafeas.v1.Digest digest = 19; */ - public io.grafeas.v1.Distribution getDistribution(int index) { - if (distributionBuilder_ == null) { - return distribution_.get(index); + public io.grafeas.v1.Digest getDigest(int index) { + if (digestBuilder_ == null) { + return digest_.get(index); } else { - return distributionBuilder_.getMessage(index); + return digestBuilder_.getMessage(index); } } /** * * *
-     * The various channels by which a package is distributed.
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
      * 
* - * repeated .grafeas.v1.Distribution distribution = 10; + * repeated .grafeas.v1.Digest digest = 19; */ - public Builder setDistribution(int index, io.grafeas.v1.Distribution value) { - if (distributionBuilder_ == null) { + public Builder setDigest(int index, io.grafeas.v1.Digest value) { + if (digestBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureDistributionIsMutable(); - distribution_.set(index, value); + ensureDigestIsMutable(); + digest_.set(index, value); onChanged(); } else { - distributionBuilder_.setMessage(index, value); + digestBuilder_.setMessage(index, value); } return this; } @@ -811,18 +2924,19 @@ public Builder setDistribution(int index, io.grafeas.v1.Distribution value) { * * *
-     * The various channels by which a package is distributed.
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
      * 
* - * repeated .grafeas.v1.Distribution distribution = 10; + * repeated .grafeas.v1.Digest digest = 19; */ - public Builder setDistribution(int index, io.grafeas.v1.Distribution.Builder builderForValue) { - if (distributionBuilder_ == null) { - ensureDistributionIsMutable(); - distribution_.set(index, builderForValue.build()); + public Builder setDigest(int index, io.grafeas.v1.Digest.Builder builderForValue) { + if (digestBuilder_ == null) { + ensureDigestIsMutable(); + digest_.set(index, builderForValue.build()); onChanged(); } else { - distributionBuilder_.setMessage(index, builderForValue.build()); + digestBuilder_.setMessage(index, builderForValue.build()); } return this; } @@ -830,21 +2944,22 @@ public Builder setDistribution(int index, io.grafeas.v1.Distribution.Builder bui * * *
-     * The various channels by which a package is distributed.
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
      * 
* - * repeated .grafeas.v1.Distribution distribution = 10; + * repeated .grafeas.v1.Digest digest = 19; */ - public Builder addDistribution(io.grafeas.v1.Distribution value) { - if (distributionBuilder_ == null) { + public Builder addDigest(io.grafeas.v1.Digest value) { + if (digestBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureDistributionIsMutable(); - distribution_.add(value); + ensureDigestIsMutable(); + digest_.add(value); onChanged(); } else { - distributionBuilder_.addMessage(value); + digestBuilder_.addMessage(value); } return this; } @@ -852,21 +2967,22 @@ public Builder addDistribution(io.grafeas.v1.Distribution value) { * * *
-     * The various channels by which a package is distributed.
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
      * 
* - * repeated .grafeas.v1.Distribution distribution = 10; + * repeated .grafeas.v1.Digest digest = 19; */ - public Builder addDistribution(int index, io.grafeas.v1.Distribution value) { - if (distributionBuilder_ == null) { + public Builder addDigest(int index, io.grafeas.v1.Digest value) { + if (digestBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureDistributionIsMutable(); - distribution_.add(index, value); + ensureDigestIsMutable(); + digest_.add(index, value); onChanged(); } else { - distributionBuilder_.addMessage(index, value); + digestBuilder_.addMessage(index, value); } return this; } @@ -874,18 +2990,19 @@ public Builder addDistribution(int index, io.grafeas.v1.Distribution value) { * * *
-     * The various channels by which a package is distributed.
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
      * 
* - * repeated .grafeas.v1.Distribution distribution = 10; + * repeated .grafeas.v1.Digest digest = 19; */ - public Builder addDistribution(io.grafeas.v1.Distribution.Builder builderForValue) { - if (distributionBuilder_ == null) { - ensureDistributionIsMutable(); - distribution_.add(builderForValue.build()); + public Builder addDigest(io.grafeas.v1.Digest.Builder builderForValue) { + if (digestBuilder_ == null) { + ensureDigestIsMutable(); + digest_.add(builderForValue.build()); onChanged(); } else { - distributionBuilder_.addMessage(builderForValue.build()); + digestBuilder_.addMessage(builderForValue.build()); } return this; } @@ -893,18 +3010,19 @@ public Builder addDistribution(io.grafeas.v1.Distribution.Builder builderForValu * * *
-     * The various channels by which a package is distributed.
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
      * 
* - * repeated .grafeas.v1.Distribution distribution = 10; + * repeated .grafeas.v1.Digest digest = 19; */ - public Builder addDistribution(int index, io.grafeas.v1.Distribution.Builder builderForValue) { - if (distributionBuilder_ == null) { - ensureDistributionIsMutable(); - distribution_.add(index, builderForValue.build()); + public Builder addDigest(int index, io.grafeas.v1.Digest.Builder builderForValue) { + if (digestBuilder_ == null) { + ensureDigestIsMutable(); + digest_.add(index, builderForValue.build()); onChanged(); } else { - distributionBuilder_.addMessage(index, builderForValue.build()); + digestBuilder_.addMessage(index, builderForValue.build()); } return this; } @@ -912,19 +3030,19 @@ public Builder addDistribution(int index, io.grafeas.v1.Distribution.Builder bui * * *
-     * The various channels by which a package is distributed.
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
      * 
* - * repeated .grafeas.v1.Distribution distribution = 10; + * repeated .grafeas.v1.Digest digest = 19; */ - public Builder addAllDistribution( - java.lang.Iterable values) { - if (distributionBuilder_ == null) { - ensureDistributionIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, distribution_); + public Builder addAllDigest(java.lang.Iterable values) { + if (digestBuilder_ == null) { + ensureDigestIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, digest_); onChanged(); } else { - distributionBuilder_.addAllMessages(values); + digestBuilder_.addAllMessages(values); } return this; } @@ -932,18 +3050,19 @@ public Builder addAllDistribution( * * *
-     * The various channels by which a package is distributed.
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
      * 
* - * repeated .grafeas.v1.Distribution distribution = 10; + * repeated .grafeas.v1.Digest digest = 19; */ - public Builder clearDistribution() { - if (distributionBuilder_ == null) { - distribution_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + public Builder clearDigest() { + if (digestBuilder_ == null) { + digest_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { - distributionBuilder_.clear(); + digestBuilder_.clear(); } return this; } @@ -951,18 +3070,19 @@ public Builder clearDistribution() { * * *
-     * The various channels by which a package is distributed.
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
      * 
* - * repeated .grafeas.v1.Distribution distribution = 10; + * repeated .grafeas.v1.Digest digest = 19; */ - public Builder removeDistribution(int index) { - if (distributionBuilder_ == null) { - ensureDistributionIsMutable(); - distribution_.remove(index); + public Builder removeDigest(int index) { + if (digestBuilder_ == null) { + ensureDigestIsMutable(); + digest_.remove(index); onChanged(); } else { - distributionBuilder_.remove(index); + digestBuilder_.remove(index); } return this; } @@ -970,101 +3090,100 @@ public Builder removeDistribution(int index) { * * *
-     * The various channels by which a package is distributed.
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
      * 
* - * repeated .grafeas.v1.Distribution distribution = 10; + * repeated .grafeas.v1.Digest digest = 19; */ - public io.grafeas.v1.Distribution.Builder getDistributionBuilder(int index) { - return getDistributionFieldBuilder().getBuilder(index); + public io.grafeas.v1.Digest.Builder getDigestBuilder(int index) { + return getDigestFieldBuilder().getBuilder(index); } /** * * *
-     * The various channels by which a package is distributed.
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
      * 
* - * repeated .grafeas.v1.Distribution distribution = 10; + * repeated .grafeas.v1.Digest digest = 19; */ - public io.grafeas.v1.DistributionOrBuilder getDistributionOrBuilder(int index) { - if (distributionBuilder_ == null) { - return distribution_.get(index); + public io.grafeas.v1.DigestOrBuilder getDigestOrBuilder(int index) { + if (digestBuilder_ == null) { + return digest_.get(index); } else { - return distributionBuilder_.getMessageOrBuilder(index); + return digestBuilder_.getMessageOrBuilder(index); } } /** * * *
-     * The various channels by which a package is distributed.
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
      * 
* - * repeated .grafeas.v1.Distribution distribution = 10; + * repeated .grafeas.v1.Digest digest = 19; */ - public java.util.List - getDistributionOrBuilderList() { - if (distributionBuilder_ != null) { - return distributionBuilder_.getMessageOrBuilderList(); + public java.util.List getDigestOrBuilderList() { + if (digestBuilder_ != null) { + return digestBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(distribution_); + return java.util.Collections.unmodifiableList(digest_); } } /** * * *
-     * The various channels by which a package is distributed.
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
      * 
* - * repeated .grafeas.v1.Distribution distribution = 10; + * repeated .grafeas.v1.Digest digest = 19; */ - public io.grafeas.v1.Distribution.Builder addDistributionBuilder() { - return getDistributionFieldBuilder() - .addBuilder(io.grafeas.v1.Distribution.getDefaultInstance()); + public io.grafeas.v1.Digest.Builder addDigestBuilder() { + return getDigestFieldBuilder().addBuilder(io.grafeas.v1.Digest.getDefaultInstance()); } /** * * *
-     * The various channels by which a package is distributed.
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
      * 
* - * repeated .grafeas.v1.Distribution distribution = 10; + * repeated .grafeas.v1.Digest digest = 19; */ - public io.grafeas.v1.Distribution.Builder addDistributionBuilder(int index) { - return getDistributionFieldBuilder() - .addBuilder(index, io.grafeas.v1.Distribution.getDefaultInstance()); + public io.grafeas.v1.Digest.Builder addDigestBuilder(int index) { + return getDigestFieldBuilder().addBuilder(index, io.grafeas.v1.Digest.getDefaultInstance()); } /** * * *
-     * The various channels by which a package is distributed.
+     * Hash value, typically a file digest, that allows unique
+     * identification a specific package.
      * 
* - * repeated .grafeas.v1.Distribution distribution = 10; + * repeated .grafeas.v1.Digest digest = 19; */ - public java.util.List getDistributionBuilderList() { - return getDistributionFieldBuilder().getBuilderList(); + public java.util.List getDigestBuilderList() { + return getDigestFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< - io.grafeas.v1.Distribution, - io.grafeas.v1.Distribution.Builder, - io.grafeas.v1.DistributionOrBuilder> - getDistributionFieldBuilder() { - if (distributionBuilder_ == null) { - distributionBuilder_ = + 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.Distribution, - io.grafeas.v1.Distribution.Builder, - io.grafeas.v1.DistributionOrBuilder>( - distribution_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - distribution_ = null; + io.grafeas.v1.Digest, io.grafeas.v1.Digest.Builder, io.grafeas.v1.DigestOrBuilder>( + digest_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + digest_ = null; } - return distributionBuilder_; + return digestBuilder_; } @java.lang.Override diff --git a/java-grafeas/src/main/java/io/grafeas/v1/PackageNoteOrBuilder.java b/java-grafeas/src/main/java/io/grafeas/v1/PackageNoteOrBuilder.java index d6cf19d8b069..1c6a953e28eb 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/PackageNoteOrBuilder.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/PackageNoteOrBuilder.java @@ -28,10 +28,12 @@ public interface PackageNoteOrBuilder * * *
-   * Required. Immutable. The name of the package.
+   * The name of the package.
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * * * @return The name. */ @@ -40,10 +42,12 @@ public interface PackageNoteOrBuilder * * *
-   * Required. Immutable. The name of the package.
+   * The name of the package.
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * * * @return The bytes for name. */ @@ -53,6 +57,7 @@ public interface PackageNoteOrBuilder * * *
+   * Deprecated.
    * The various channels by which a package is distributed.
    * 
* @@ -63,6 +68,7 @@ public interface PackageNoteOrBuilder * * *
+   * Deprecated.
    * The various channels by which a package is distributed.
    * 
* @@ -73,6 +79,7 @@ public interface PackageNoteOrBuilder * * *
+   * Deprecated.
    * The various channels by which a package is distributed.
    * 
* @@ -83,6 +90,7 @@ public interface PackageNoteOrBuilder * * *
+   * Deprecated.
    * The various channels by which a package is distributed.
    * 
* @@ -93,10 +101,295 @@ public interface PackageNoteOrBuilder * * *
+   * 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/java-grafeas/src/main/java/io/grafeas/v1/PackageOccurrence.java b/java-grafeas/src/main/java/io/grafeas/v1/PackageOccurrence.java index e565e5eac6f7..f67989e438a8 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/PackageOccurrence.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/PackageOccurrence.java @@ -41,6 +41,9 @@ private PackageOccurrence(com.google.protobuf.GeneratedMessageV3.Builder buil private PackageOccurrence() { name_ = ""; location_ = java.util.Collections.emptyList(); + packageType_ = ""; + cpeUri_ = ""; + architecture_ = 0; } @java.lang.Override @@ -87,6 +90,55 @@ private PackageOccurrence( mutable_bitField0_ |= 0x00000001; } location_.add(input.readMessage(io.grafeas.v1.Location.parser(), extensionRegistry)); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + packageType_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + cpeUri_ = s; + break; + } + case 40: + { + int rawValue = input.readEnum(); + + architecture_ = rawValue; + break; + } + case 50: + { + io.grafeas.v1.License.Builder subBuilder = null; + if (license_ != null) { + subBuilder = license_.toBuilder(); + } + license_ = input.readMessage(io.grafeas.v1.License.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(license_); + license_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + io.grafeas.v1.Version.Builder subBuilder = null; + if (version_ != null) { + subBuilder = version_.toBuilder(); + } + version_ = input.readMessage(io.grafeas.v1.Version.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(version_); + version_ = subBuilder.buildPartial(); + } + break; } default: @@ -131,10 +183,12 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Output only. The name of the installed package.
+   * The name of the installed package.
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The name. */ @@ -154,10 +208,12 @@ public java.lang.String getName() { * * *
-   * Output only. The name of the installed package.
+   * The name of the installed package.
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The bytes for name. */ @@ -180,7 +236,7 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-   * Required. All of the places within the filesystem versions of this package
+   * All of the places within the filesystem versions of this package
    * have been found.
    * 
* @@ -194,7 +250,7 @@ public java.util.List getLocationList() { * * *
-   * Required. All of the places within the filesystem versions of this package
+   * All of the places within the filesystem versions of this package
    * have been found.
    * 
* @@ -208,7 +264,7 @@ public java.util.List getLocationOrBu * * *
-   * Required. All of the places within the filesystem versions of this package
+   * All of the places within the filesystem versions of this package
    * have been found.
    * 
* @@ -222,7 +278,7 @@ public int getLocationCount() { * * *
-   * Required. All of the places within the filesystem versions of this package
+   * All of the places within the filesystem versions of this package
    * have been found.
    * 
* @@ -236,7 +292,7 @@ public io.grafeas.v1.Location getLocation(int index) { * * *
-   * Required. All of the places within the filesystem versions of this package
+   * All of the places within the filesystem versions of this package
    * have been found.
    * 
* @@ -247,6 +303,241 @@ public io.grafeas.v1.LocationOrBuilder getLocationOrBuilder(int index) { return location_.get(index); } + public static final int PACKAGE_TYPE_FIELD_NUMBER = 3; + 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; + 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_; + /** + * + * + *
+   * 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() { + @SuppressWarnings("deprecation") + io.grafeas.v1.Architecture result = io.grafeas.v1.Architecture.valueOf(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 getLicense(); + } + + 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 getVersion(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -267,6 +558,21 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io 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()); + } unknownFields.writeTo(output); } @@ -282,6 +588,21 @@ public int getSerializedSize() { 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 += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -299,6 +620,17 @@ public boolean equals(final java.lang.Object 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 (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -316,6 +648,20 @@ public int hashCode() { 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) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -467,6 +813,24 @@ public Builder clear() { } else { locationBuilder_.clear(); } + packageType_ = ""; + + cpeUri_ = ""; + + architecture_ = 0; + + if (licenseBuilder_ == null) { + license_ = null; + } else { + license_ = null; + licenseBuilder_ = null; + } + if (versionBuilder_ == null) { + version_ = null; + } else { + version_ = null; + versionBuilder_ = null; + } return this; } @@ -503,6 +867,19 @@ public io.grafeas.v1.PackageOccurrence buildPartial() { } else { result.location_ = locationBuilder_.build(); } + result.packageType_ = packageType_; + result.cpeUri_ = cpeUri_; + result.architecture_ = architecture_; + if (licenseBuilder_ == null) { + result.license_ = license_; + } else { + result.license_ = licenseBuilder_.build(); + } + if (versionBuilder_ == null) { + result.version_ = version_; + } else { + result.version_ = versionBuilder_.build(); + } onBuilt(); return result; } @@ -583,6 +960,23 @@ public Builder mergeFrom(io.grafeas.v1.PackageOccurrence other) { } } } + if (!other.getPackageType().isEmpty()) { + packageType_ = other.packageType_; + onChanged(); + } + if (!other.getCpeUri().isEmpty()) { + cpeUri_ = other.cpeUri_; + onChanged(); + } + if (other.architecture_ != 0) { + setArchitectureValue(other.getArchitectureValue()); + } + if (other.hasLicense()) { + mergeLicense(other.getLicense()); + } + if (other.hasVersion()) { + mergeVersion(other.getVersion()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -619,10 +1013,12 @@ public Builder mergeFrom( * * *
-     * Output only. The name of the installed package.
+     * The name of the installed package.
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The name. */ @@ -641,10 +1037,12 @@ public java.lang.String getName() { * * *
-     * Output only. The name of the installed package.
+     * The name of the installed package.
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The bytes for name. */ @@ -663,10 +1061,12 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Output only. The name of the installed package.
+     * The name of the installed package.
      * 
* - * string name = 1; + * + * 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. @@ -684,10 +1084,12 @@ public Builder setName(java.lang.String value) { * * *
-     * Output only. The name of the installed package.
+     * The name of the installed package.
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return This builder for chaining. */ @@ -701,10 +1103,12 @@ public Builder clearName() { * * *
-     * Output only. The name of the installed package.
+     * The name of the installed package.
      * 
* - * string name = 1; + * + * 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. @@ -737,7 +1141,7 @@ private void ensureLocationIsMutable() { * * *
-     * Required. All of the places within the filesystem versions of this package
+     * All of the places within the filesystem versions of this package
      * have been found.
      * 
* @@ -754,7 +1158,7 @@ public java.util.List getLocationList() { * * *
-     * Required. All of the places within the filesystem versions of this package
+     * All of the places within the filesystem versions of this package
      * have been found.
      * 
* @@ -771,7 +1175,7 @@ public int getLocationCount() { * * *
-     * Required. All of the places within the filesystem versions of this package
+     * All of the places within the filesystem versions of this package
      * have been found.
      * 
* @@ -788,7 +1192,7 @@ public io.grafeas.v1.Location getLocation(int index) { * * *
-     * Required. All of the places within the filesystem versions of this package
+     * All of the places within the filesystem versions of this package
      * have been found.
      * 
* @@ -811,7 +1215,7 @@ public Builder setLocation(int index, io.grafeas.v1.Location value) { * * *
-     * Required. All of the places within the filesystem versions of this package
+     * All of the places within the filesystem versions of this package
      * have been found.
      * 
* @@ -831,7 +1235,7 @@ public Builder setLocation(int index, io.grafeas.v1.Location.Builder builderForV * * *
-     * Required. All of the places within the filesystem versions of this package
+     * All of the places within the filesystem versions of this package
      * have been found.
      * 
* @@ -854,7 +1258,7 @@ public Builder addLocation(io.grafeas.v1.Location value) { * * *
-     * Required. All of the places within the filesystem versions of this package
+     * All of the places within the filesystem versions of this package
      * have been found.
      * 
* @@ -877,7 +1281,7 @@ public Builder addLocation(int index, io.grafeas.v1.Location value) { * * *
-     * Required. All of the places within the filesystem versions of this package
+     * All of the places within the filesystem versions of this package
      * have been found.
      * 
* @@ -897,7 +1301,7 @@ public Builder addLocation(io.grafeas.v1.Location.Builder builderForValue) { * * *
-     * Required. All of the places within the filesystem versions of this package
+     * All of the places within the filesystem versions of this package
      * have been found.
      * 
* @@ -917,7 +1321,7 @@ public Builder addLocation(int index, io.grafeas.v1.Location.Builder builderForV * * *
-     * Required. All of the places within the filesystem versions of this package
+     * All of the places within the filesystem versions of this package
      * have been found.
      * 
* @@ -937,7 +1341,7 @@ public Builder addAllLocation(java.lang.Iterable - * Required. All of the places within the filesystem versions of this package + * All of the places within the filesystem versions of this package * have been found. * * @@ -957,7 +1361,7 @@ public Builder clearLocation() { * * *
-     * Required. All of the places within the filesystem versions of this package
+     * All of the places within the filesystem versions of this package
      * have been found.
      * 
* @@ -977,7 +1381,7 @@ public Builder removeLocation(int index) { * * *
-     * Required. All of the places within the filesystem versions of this package
+     * All of the places within the filesystem versions of this package
      * have been found.
      * 
* @@ -990,7 +1394,7 @@ public io.grafeas.v1.Location.Builder getLocationBuilder(int index) { * * *
-     * Required. All of the places within the filesystem versions of this package
+     * All of the places within the filesystem versions of this package
      * have been found.
      * 
* @@ -1007,7 +1411,7 @@ public io.grafeas.v1.LocationOrBuilder getLocationOrBuilder(int index) { * * *
-     * Required. All of the places within the filesystem versions of this package
+     * All of the places within the filesystem versions of this package
      * have been found.
      * 
* @@ -1024,7 +1428,7 @@ public java.util.List getLocationOrBu * * *
-     * Required. All of the places within the filesystem versions of this package
+     * All of the places within the filesystem versions of this package
      * have been found.
      * 
* @@ -1037,7 +1441,7 @@ public io.grafeas.v1.Location.Builder addLocationBuilder() { * * *
-     * Required. All of the places within the filesystem versions of this package
+     * All of the places within the filesystem versions of this package
      * have been found.
      * 
* @@ -1051,7 +1455,7 @@ public io.grafeas.v1.Location.Builder addLocationBuilder(int index) { * * *
-     * Required. All of the places within the filesystem versions of this package
+     * All of the places within the filesystem versions of this package
      * have been found.
      * 
* @@ -1076,6 +1480,679 @@ public java.util.List getLocationBuilderList() { 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; + 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(); + 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; + 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; + 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(); + 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; + 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; + 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() { + @SuppressWarnings("deprecation") + io.grafeas.v1.Architecture result = io.grafeas.v1.Architecture.valueOf(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(); + } + + 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() { + + 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 licenseBuilder_ != null || license_ != null; + } + /** + * + * + *
+     * 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; + onChanged(); + } else { + licenseBuilder_.setMessage(value); + } + + 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(); + onChanged(); + } else { + licenseBuilder_.setMessage(builderForValue.build()); + } + + 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 (license_ != null) { + license_ = io.grafeas.v1.License.newBuilder(license_).mergeFrom(value).buildPartial(); + } else { + license_ = value; + } + onChanged(); + } else { + licenseBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Licenses that have been declared by the authors of the package.
+     * 
+ * + * .grafeas.v1.License license = 6; + */ + public Builder clearLicense() { + if (licenseBuilder_ == null) { + license_ = null; + onChanged(); + } else { + license_ = null; + licenseBuilder_ = null; + } + + 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() { + + 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 versionBuilder_ != null || version_ != null; + } + /** + * + * + *
+     * 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; + onChanged(); + } else { + versionBuilder_.setMessage(value); + } + + 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(); + onChanged(); + } else { + versionBuilder_.setMessage(builderForValue.build()); + } + + 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 (version_ != null) { + version_ = io.grafeas.v1.Version.newBuilder(version_).mergeFrom(value).buildPartial(); + } else { + version_ = value; + } + onChanged(); + } else { + versionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The version of the package.
+     * 
+ * + * .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearVersion() { + if (versionBuilder_ == null) { + version_ = null; + onChanged(); + } else { + version_ = null; + versionBuilder_ = null; + } + + 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() { + + 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); diff --git a/java-grafeas/src/main/java/io/grafeas/v1/PackageOccurrenceOrBuilder.java b/java-grafeas/src/main/java/io/grafeas/v1/PackageOccurrenceOrBuilder.java index 56bdd3a469b6..238b1dcee770 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/PackageOccurrenceOrBuilder.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/PackageOccurrenceOrBuilder.java @@ -28,10 +28,12 @@ public interface PackageOccurrenceOrBuilder * * *
-   * Output only. The name of the installed package.
+   * The name of the installed package.
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The name. */ @@ -40,10 +42,12 @@ public interface PackageOccurrenceOrBuilder * * *
-   * Output only. The name of the installed package.
+   * The name of the installed package.
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The bytes for name. */ @@ -53,7 +57,7 @@ public interface PackageOccurrenceOrBuilder * * *
-   * Required. All of the places within the filesystem versions of this package
+   * All of the places within the filesystem versions of this package
    * have been found.
    * 
* @@ -64,7 +68,7 @@ public interface PackageOccurrenceOrBuilder * * *
-   * Required. All of the places within the filesystem versions of this package
+   * All of the places within the filesystem versions of this package
    * have been found.
    * 
* @@ -75,7 +79,7 @@ public interface PackageOccurrenceOrBuilder * * *
-   * Required. All of the places within the filesystem versions of this package
+   * All of the places within the filesystem versions of this package
    * have been found.
    * 
* @@ -86,7 +90,7 @@ public interface PackageOccurrenceOrBuilder * * *
-   * Required. All of the places within the filesystem versions of this package
+   * All of the places within the filesystem versions of this package
    * have been found.
    * 
* @@ -97,11 +101,166 @@ public interface PackageOccurrenceOrBuilder * * *
-   * Required. All of the places within the filesystem versions of this package
+   * 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/java-grafeas/src/main/java/io/grafeas/v1/SlsaProvenance.java b/java-grafeas/src/main/java/io/grafeas/v1/SlsaProvenance.java index 3dd1bad451a2..f33f6d108b1a 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/SlsaProvenance.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/SlsaProvenance.java @@ -148,14 +148,13 @@ private SlsaProvenance( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.grafeas.v1.SlsaProvenanceOuterClass - .internal_static_grafeas_v1_SlsaProvenance_descriptor; + 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.SlsaProvenanceOuterClass + return io.grafeas.v1.SlsaProvenanceProto .internal_static_grafeas_v1_SlsaProvenance_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grafeas.v1.SlsaProvenance.class, io.grafeas.v1.SlsaProvenance.Builder.class); @@ -461,14 +460,14 @@ private SlsaRecipe( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.grafeas.v1.SlsaProvenanceOuterClass + 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.SlsaProvenanceOuterClass + return io.grafeas.v1.SlsaProvenanceProto .internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grafeas.v1.SlsaProvenance.SlsaRecipe.class, @@ -942,14 +941,14 @@ public static final class Builder // @@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.SlsaProvenanceOuterClass + 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.SlsaProvenanceOuterClass + return io.grafeas.v1.SlsaProvenanceProto .internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grafeas.v1.SlsaProvenance.SlsaRecipe.class, @@ -996,7 +995,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.grafeas.v1.SlsaProvenanceOuterClass + return io.grafeas.v1.SlsaProvenanceProto .internal_static_grafeas_v1_SlsaProvenance_SlsaRecipe_descriptor; } @@ -2042,14 +2041,14 @@ private SlsaCompleteness( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.grafeas.v1.SlsaProvenanceOuterClass + 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.SlsaProvenanceOuterClass + return io.grafeas.v1.SlsaProvenanceProto .internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grafeas.v1.SlsaProvenance.SlsaCompleteness.class, @@ -2307,14 +2306,14 @@ public static final class Builder // @@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.SlsaProvenanceOuterClass + 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.SlsaProvenanceOuterClass + return io.grafeas.v1.SlsaProvenanceProto .internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grafeas.v1.SlsaProvenance.SlsaCompleteness.class, @@ -2349,7 +2348,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.grafeas.v1.SlsaProvenanceOuterClass + return io.grafeas.v1.SlsaProvenanceProto .internal_static_grafeas_v1_SlsaProvenance_SlsaCompleteness_descriptor; } @@ -2969,14 +2968,14 @@ private SlsaMetadata( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.grafeas.v1.SlsaProvenanceOuterClass + 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.SlsaProvenanceOuterClass + return io.grafeas.v1.SlsaProvenanceProto .internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grafeas.v1.SlsaProvenance.SlsaMetadata.class, @@ -3428,14 +3427,14 @@ public static final class Builder // @@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.SlsaProvenanceOuterClass + 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.SlsaProvenanceOuterClass + return io.grafeas.v1.SlsaProvenanceProto .internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grafeas.v1.SlsaProvenance.SlsaMetadata.class, @@ -3486,7 +3485,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.grafeas.v1.SlsaProvenanceOuterClass + return io.grafeas.v1.SlsaProvenanceProto .internal_static_grafeas_v1_SlsaProvenance_SlsaMetadata_descriptor; } @@ -4500,14 +4499,14 @@ private SlsaBuilder( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.grafeas.v1.SlsaProvenanceOuterClass + 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.SlsaProvenanceOuterClass + return io.grafeas.v1.SlsaProvenanceProto .internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grafeas.v1.SlsaProvenance.SlsaBuilder.class, @@ -4718,14 +4717,14 @@ public static final class Builder // @@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.SlsaProvenanceOuterClass + 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.SlsaProvenanceOuterClass + return io.grafeas.v1.SlsaProvenanceProto .internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grafeas.v1.SlsaProvenance.SlsaBuilder.class, @@ -4756,7 +4755,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.grafeas.v1.SlsaProvenanceOuterClass + return io.grafeas.v1.SlsaProvenanceProto .internal_static_grafeas_v1_SlsaProvenance_SlsaBuilder_descriptor; } @@ -5117,7 +5116,7 @@ private Material( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.grafeas.v1.SlsaProvenanceOuterClass + return io.grafeas.v1.SlsaProvenanceProto .internal_static_grafeas_v1_SlsaProvenance_Material_descriptor; } @@ -5135,7 +5134,7 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceOuterClass + return io.grafeas.v1.SlsaProvenanceProto .internal_static_grafeas_v1_SlsaProvenance_Material_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grafeas.v1.SlsaProvenance.Material.class, @@ -5184,7 +5183,7 @@ public com.google.protobuf.ByteString getUriBytes() { private static final class DigestDefaultEntryHolder { static final com.google.protobuf.MapEntry defaultEntry = com.google.protobuf.MapEntry.newDefaultInstance( - io.grafeas.v1.SlsaProvenanceOuterClass + io.grafeas.v1.SlsaProvenanceProto .internal_static_grafeas_v1_SlsaProvenance_Material_DigestEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", @@ -5429,7 +5428,7 @@ public static final class Builder // @@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.SlsaProvenanceOuterClass + return io.grafeas.v1.SlsaProvenanceProto .internal_static_grafeas_v1_SlsaProvenance_Material_descriptor; } @@ -5456,7 +5455,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return io.grafeas.v1.SlsaProvenanceOuterClass + return io.grafeas.v1.SlsaProvenanceProto .internal_static_grafeas_v1_SlsaProvenance_Material_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grafeas.v1.SlsaProvenance.Material.class, @@ -5488,7 +5487,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.grafeas.v1.SlsaProvenanceOuterClass + return io.grafeas.v1.SlsaProvenanceProto .internal_static_grafeas_v1_SlsaProvenance_Material_descriptor; } @@ -6253,14 +6252,13 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@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.SlsaProvenanceOuterClass - .internal_static_grafeas_v1_SlsaProvenance_descriptor; + 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.SlsaProvenanceOuterClass + return io.grafeas.v1.SlsaProvenanceProto .internal_static_grafeas_v1_SlsaProvenance_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grafeas.v1.SlsaProvenance.class, io.grafeas.v1.SlsaProvenance.Builder.class); @@ -6314,8 +6312,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.grafeas.v1.SlsaProvenanceOuterClass - .internal_static_grafeas_v1_SlsaProvenance_descriptor; + return io.grafeas.v1.SlsaProvenanceProto.internal_static_grafeas_v1_SlsaProvenance_descriptor; } @java.lang.Override diff --git a/java-grafeas/src/main/java/io/grafeas/v1/SlsaProvenanceOuterClass.java b/java-grafeas/src/main/java/io/grafeas/v1/SlsaProvenanceProto.java similarity index 97% rename from java-grafeas/src/main/java/io/grafeas/v1/SlsaProvenanceOuterClass.java rename to java-grafeas/src/main/java/io/grafeas/v1/SlsaProvenanceProto.java index a662d6d31465..d6cdd39c58c1 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/SlsaProvenanceOuterClass.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/SlsaProvenanceProto.java @@ -19,8 +19,8 @@ package io.grafeas.v1; -public final class SlsaProvenanceOuterClass { - private SlsaProvenanceOuterClass() {} +public final class SlsaProvenanceProto { + private SlsaProvenanceProto() {} public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} @@ -90,9 +90,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\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\001BQ\n\rio.grafeas.v1P\001Z8google.golang.or" - + "g/genproto/googleapis/grafeas/v1;grafeas" - + "\242\002\003GRAb\006proto3" + + "\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( diff --git a/java-grafeas/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwo.java b/java-grafeas/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwo.java new file mode 100644 index 000000000000..e64dd6ca5667 --- /dev/null +++ b/java-grafeas/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwo.java @@ -0,0 +1,7149 @@ +/* + * 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/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; + } + + private SlsaProvenanceZeroTwo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.Builder subBuilder = null; + if (builder_ != null) { + subBuilder = builder_.toBuilder(); + } + builder_ = + input.readMessage( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(builder_); + builder_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + buildType_ = s; + break; + } + case 26: + { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.Builder subBuilder = null; + if (invocation_ != null) { + subBuilder = invocation_.toBuilder(); + } + invocation_ = + input.readMessage( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(invocation_); + invocation_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.protobuf.Struct.Builder subBuilder = null; + if (buildConfig_ != null) { + subBuilder = buildConfig_.toBuilder(); + } + buildConfig_ = + input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(buildConfig_); + buildConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.Builder subBuilder = null; + if (metadata_ != null) { + subBuilder = metadata_.toBuilder(); + } + metadata_ = + input.readMessage( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(metadata_); + metadata_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + materials_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + materials_.add( + input.readMessage( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + materials_ = java.util.Collections.unmodifiableList(materials_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + 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; + } + + private SlsaBuilder( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + 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(); + + id_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + 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; + 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_); + } + unknownFields.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 += unknownFields.getSerializedSize(); + memoizedSize = size; + 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 (!unknownFields.equals(other.unknownFields)) return false; + 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) + unknownFields.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() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + 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); + result.id_ = id_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.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_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + 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; + onChanged(); + return this; + } + /** + * string id = 1; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + 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; + 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 { + return new SlsaBuilder(input, extensionRegistry); + } + }; + + public static com.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; + } + + private SlsaMaterial( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + 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(); + + uri_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + digest_ = + com.google.protobuf.MapField.newMapField( + DigestDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry digest__ = + input.readMessage( + DigestDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + digest_.getMutableMap().put(digest__.getKey(), digest__.getValue()); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + 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; + 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 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, + ""); + } + + private com.google.protobuf.MapField 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 java.lang.String getDigestOrDefault( + java.lang.String key, 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); + unknownFields.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 += unknownFields.getSerializedSize(); + memoizedSize = size; + 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 (!unknownFields.equals(other.unknownFields)) return false; + 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) + unknownFields.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() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + 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); + int from_bitField0_ = bitField0_; + result.uri_ = uri_; + result.digest_ = internalGetDigest(); + result.digest_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.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_; + onChanged(); + } + internalGetMutableDigest().mergeFrom(other.internalGetDigest()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + 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; + onChanged(); + return this; + } + /** + * string uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + 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; + onChanged(); + return this; + } + + private com.google.protobuf.MapField 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() { + onChanged(); + ; + if (digest_ == null) { + digest_ = com.google.protobuf.MapField.newMapField(DigestDefaultEntryHolder.defaultEntry); + } + if (!digest_.isMutable()) { + digest_ = digest_.copy(); + } + 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 java.lang.String getDigestOrDefault( + java.lang.String key, 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() { + 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() { + 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); + return this; + } + /** map<string, string> digest = 2; */ + public Builder putAllDigest(java.util.Map values) { + internalGetMutableDigest().getMutableMap().putAll(values); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @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 { + return new SlsaMaterial(input, extensionRegistry); + } + }; + + public static com.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; + } + + private SlsaInvocation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.Builder subBuilder = null; + if (configSource_ != null) { + subBuilder = configSource_.toBuilder(); + } + configSource_ = + input.readMessage( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(configSource_); + configSource_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.Struct.Builder subBuilder = null; + if (parameters_ != null) { + subBuilder = parameters_.toBuilder(); + } + parameters_ = + input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(parameters_); + parameters_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.protobuf.Struct.Builder subBuilder = null; + if (environment_ != null) { + subBuilder = environment_.toBuilder(); + } + environment_ = + input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(environment_); + environment_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + 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 getConfigSource(); + } + + 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 getParameters(); + } + + 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 getEnvironment(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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()); + } + unknownFields.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 += unknownFields.getSerializedSize(); + memoizedSize = size; + 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 (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.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() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (configSourceBuilder_ == null) { + configSource_ = null; + } else { + configSource_ = null; + configSourceBuilder_ = null; + } + if (parametersBuilder_ == null) { + parameters_ = null; + } else { + parameters_ = null; + parametersBuilder_ = null; + } + if (environmentBuilder_ == null) { + environment_ = null; + } else { + environment_ = null; + 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 (configSourceBuilder_ == null) { + result.configSource_ = configSource_; + } else { + result.configSource_ = configSourceBuilder_.build(); + } + if (parametersBuilder_ == null) { + result.parameters_ = parameters_; + } else { + result.parameters_ = parametersBuilder_.build(); + } + if (environmentBuilder_ == null) { + result.environment_ = environment_; + } else { + result.environment_ = environmentBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.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.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + 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 configSourceBuilder_ != null || configSource_ != null; + } + /** + * .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; + onChanged(); + } else { + configSourceBuilder_.setMessage(value); + } + + 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(); + onChanged(); + } else { + configSourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; */ + public Builder mergeConfigSource(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource value) { + if (configSourceBuilder_ == null) { + if (configSource_ != null) { + configSource_ = + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.newBuilder(configSource_) + .mergeFrom(value) + .buildPartial(); + } else { + configSource_ = value; + } + onChanged(); + } else { + configSourceBuilder_.mergeFrom(value); + } + + return this; + } + /** .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; */ + public Builder clearConfigSource() { + if (configSourceBuilder_ == null) { + configSource_ = null; + onChanged(); + } else { + configSource_ = null; + configSourceBuilder_ = null; + } + + return this; + } + /** .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.Builder getConfigSourceBuilder() { + + 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 parametersBuilder_ != null || parameters_ != null; + } + /** + * .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; + onChanged(); + } else { + parametersBuilder_.setMessage(value); + } + + return this; + } + /** .google.protobuf.Struct parameters = 2; */ + public Builder setParameters(com.google.protobuf.Struct.Builder builderForValue) { + if (parametersBuilder_ == null) { + parameters_ = builderForValue.build(); + onChanged(); + } else { + parametersBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** .google.protobuf.Struct parameters = 2; */ + public Builder mergeParameters(com.google.protobuf.Struct value) { + if (parametersBuilder_ == null) { + if (parameters_ != null) { + parameters_ = + com.google.protobuf.Struct.newBuilder(parameters_).mergeFrom(value).buildPartial(); + } else { + parameters_ = value; + } + onChanged(); + } else { + parametersBuilder_.mergeFrom(value); + } + + return this; + } + /** .google.protobuf.Struct parameters = 2; */ + public Builder clearParameters() { + if (parametersBuilder_ == null) { + parameters_ = null; + onChanged(); + } else { + parameters_ = null; + parametersBuilder_ = null; + } + + return this; + } + /** .google.protobuf.Struct parameters = 2; */ + public com.google.protobuf.Struct.Builder getParametersBuilder() { + + 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 environmentBuilder_ != null || environment_ != null; + } + /** + * .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; + onChanged(); + } else { + environmentBuilder_.setMessage(value); + } + + return this; + } + /** .google.protobuf.Struct environment = 3; */ + public Builder setEnvironment(com.google.protobuf.Struct.Builder builderForValue) { + if (environmentBuilder_ == null) { + environment_ = builderForValue.build(); + onChanged(); + } else { + environmentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** .google.protobuf.Struct environment = 3; */ + public Builder mergeEnvironment(com.google.protobuf.Struct value) { + if (environmentBuilder_ == null) { + if (environment_ != null) { + environment_ = + com.google.protobuf.Struct.newBuilder(environment_).mergeFrom(value).buildPartial(); + } else { + environment_ = value; + } + onChanged(); + } else { + environmentBuilder_.mergeFrom(value); + } + + return this; + } + /** .google.protobuf.Struct environment = 3; */ + public Builder clearEnvironment() { + if (environmentBuilder_ == null) { + environment_ = null; + onChanged(); + } else { + environment_ = null; + environmentBuilder_ = null; + } + + return this; + } + /** .google.protobuf.Struct environment = 3; */ + public com.google.protobuf.Struct.Builder getEnvironmentBuilder() { + + 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 { + return new SlsaInvocation(input, extensionRegistry); + } + }; + + public static com.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; + } + + private SlsaConfigSource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + 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(); + + uri_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + digest_ = + com.google.protobuf.MapField.newMapField( + DigestDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry digest__ = + input.readMessage( + DigestDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + digest_.getMutableMap().put(digest__.getKey(), digest__.getValue()); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + entryPoint_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + 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; + 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 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, + ""); + } + + private com.google.protobuf.MapField 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 java.lang.String getDigestOrDefault( + java.lang.String key, 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; + 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_); + } + unknownFields.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 += unknownFields.getSerializedSize(); + memoizedSize = size; + 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 (!unknownFields.equals(other.unknownFields)) return false; + 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) + unknownFields.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() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + 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); + int from_bitField0_ = bitField0_; + result.uri_ = uri_; + result.digest_ = internalGetDigest(); + result.digest_.makeImmutable(); + result.entryPoint_ = entryPoint_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.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_; + onChanged(); + } + internalGetMutableDigest().mergeFrom(other.internalGetDigest()); + if (!other.getEntryPoint().isEmpty()) { + entryPoint_ = other.entryPoint_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + 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; + onChanged(); + return this; + } + /** + * string uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + 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; + onChanged(); + return this; + } + + private com.google.protobuf.MapField 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() { + onChanged(); + ; + if (digest_ == null) { + digest_ = com.google.protobuf.MapField.newMapField(DigestDefaultEntryHolder.defaultEntry); + } + if (!digest_.isMutable()) { + digest_ = digest_.copy(); + } + 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 java.lang.String getDigestOrDefault( + java.lang.String key, 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() { + 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() { + 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); + return this; + } + /** map<string, string> digest = 2; */ + public Builder putAllDigest(java.util.Map values) { + internalGetMutableDigest().getMutableMap().putAll(values); + 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; + onChanged(); + return this; + } + /** + * string entry_point = 3; + * + * @return This builder for chaining. + */ + public Builder clearEntryPoint() { + + entryPoint_ = getDefaultInstance().getEntryPoint(); + 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; + 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 { + return new SlsaConfigSource(input, extensionRegistry); + } + }; + + public static com.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; + } + + private SlsaMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + 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(); + + buildInvocationId_ = s; + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (buildStartedOn_ != null) { + subBuilder = buildStartedOn_.toBuilder(); + } + buildStartedOn_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(buildStartedOn_); + buildStartedOn_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (buildFinishedOn_ != null) { + subBuilder = buildFinishedOn_.toBuilder(); + } + buildFinishedOn_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(buildFinishedOn_); + buildFinishedOn_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.Builder subBuilder = null; + if (completeness_ != null) { + subBuilder = completeness_.toBuilder(); + } + completeness_ = + input.readMessage( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(completeness_); + completeness_ = subBuilder.buildPartial(); + } + + break; + } + case 40: + { + reproducible_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + 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; + 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 getBuildStartedOn(); + } + + 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 getBuildFinishedOn(); + } + + 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 getCompleteness(); + } + + public static final int REPRODUCIBLE_FIELD_NUMBER = 5; + private boolean reproducible_; + /** + * 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_); + } + unknownFields.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 += unknownFields.getSerializedSize(); + memoizedSize = size; + 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 (!unknownFields.equals(other.unknownFields)) return false; + 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) + unknownFields.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() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + buildInvocationId_ = ""; + + if (buildStartedOnBuilder_ == null) { + buildStartedOn_ = null; + } else { + buildStartedOn_ = null; + buildStartedOnBuilder_ = null; + } + if (buildFinishedOnBuilder_ == null) { + buildFinishedOn_ = null; + } else { + buildFinishedOn_ = null; + buildFinishedOnBuilder_ = null; + } + if (completenessBuilder_ == null) { + completeness_ = null; + } else { + completeness_ = null; + 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); + result.buildInvocationId_ = buildInvocationId_; + if (buildStartedOnBuilder_ == null) { + result.buildStartedOn_ = buildStartedOn_; + } else { + result.buildStartedOn_ = buildStartedOnBuilder_.build(); + } + if (buildFinishedOnBuilder_ == null) { + result.buildFinishedOn_ = buildFinishedOn_; + } else { + result.buildFinishedOn_ = buildFinishedOnBuilder_.build(); + } + if (completenessBuilder_ == null) { + result.completeness_ = completeness_; + } else { + result.completeness_ = completenessBuilder_.build(); + } + result.reproducible_ = reproducible_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.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_; + 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.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + 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; + onChanged(); + return this; + } + /** + * string build_invocation_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearBuildInvocationId() { + + buildInvocationId_ = getDefaultInstance().getBuildInvocationId(); + 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; + 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 buildStartedOnBuilder_ != null || buildStartedOn_ != null; + } + /** + * .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; + onChanged(); + } else { + buildStartedOnBuilder_.setMessage(value); + } + + return this; + } + /** .google.protobuf.Timestamp build_started_on = 2; */ + public Builder setBuildStartedOn(com.google.protobuf.Timestamp.Builder builderForValue) { + if (buildStartedOnBuilder_ == null) { + buildStartedOn_ = builderForValue.build(); + onChanged(); + } else { + buildStartedOnBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** .google.protobuf.Timestamp build_started_on = 2; */ + public Builder mergeBuildStartedOn(com.google.protobuf.Timestamp value) { + if (buildStartedOnBuilder_ == null) { + if (buildStartedOn_ != null) { + buildStartedOn_ = + com.google.protobuf.Timestamp.newBuilder(buildStartedOn_) + .mergeFrom(value) + .buildPartial(); + } else { + buildStartedOn_ = value; + } + onChanged(); + } else { + buildStartedOnBuilder_.mergeFrom(value); + } + + return this; + } + /** .google.protobuf.Timestamp build_started_on = 2; */ + public Builder clearBuildStartedOn() { + if (buildStartedOnBuilder_ == null) { + buildStartedOn_ = null; + onChanged(); + } else { + buildStartedOn_ = null; + buildStartedOnBuilder_ = null; + } + + return this; + } + /** .google.protobuf.Timestamp build_started_on = 2; */ + public com.google.protobuf.Timestamp.Builder getBuildStartedOnBuilder() { + + 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 buildFinishedOnBuilder_ != null || buildFinishedOn_ != null; + } + /** + * .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; + onChanged(); + } else { + buildFinishedOnBuilder_.setMessage(value); + } + + return this; + } + /** .google.protobuf.Timestamp build_finished_on = 3; */ + public Builder setBuildFinishedOn(com.google.protobuf.Timestamp.Builder builderForValue) { + if (buildFinishedOnBuilder_ == null) { + buildFinishedOn_ = builderForValue.build(); + onChanged(); + } else { + buildFinishedOnBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** .google.protobuf.Timestamp build_finished_on = 3; */ + public Builder mergeBuildFinishedOn(com.google.protobuf.Timestamp value) { + if (buildFinishedOnBuilder_ == null) { + if (buildFinishedOn_ != null) { + buildFinishedOn_ = + com.google.protobuf.Timestamp.newBuilder(buildFinishedOn_) + .mergeFrom(value) + .buildPartial(); + } else { + buildFinishedOn_ = value; + } + onChanged(); + } else { + buildFinishedOnBuilder_.mergeFrom(value); + } + + return this; + } + /** .google.protobuf.Timestamp build_finished_on = 3; */ + public Builder clearBuildFinishedOn() { + if (buildFinishedOnBuilder_ == null) { + buildFinishedOn_ = null; + onChanged(); + } else { + buildFinishedOn_ = null; + buildFinishedOnBuilder_ = null; + } + + return this; + } + /** .google.protobuf.Timestamp build_finished_on = 3; */ + public com.google.protobuf.Timestamp.Builder getBuildFinishedOnBuilder() { + + 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 completenessBuilder_ != null || completeness_ != null; + } + /** + * .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; + onChanged(); + } else { + completenessBuilder_.setMessage(value); + } + + return this; + } + /** .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; */ + public Builder setCompleteness( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.Builder builderForValue) { + if (completenessBuilder_ == null) { + completeness_ = builderForValue.build(); + onChanged(); + } else { + completenessBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; */ + public Builder mergeCompleteness(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness value) { + if (completenessBuilder_ == null) { + if (completeness_ != null) { + completeness_ = + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.newBuilder(completeness_) + .mergeFrom(value) + .buildPartial(); + } else { + completeness_ = value; + } + onChanged(); + } else { + completenessBuilder_.mergeFrom(value); + } + + return this; + } + /** .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; */ + public Builder clearCompleteness() { + if (completenessBuilder_ == null) { + completeness_ = null; + onChanged(); + } else { + completeness_ = null; + completenessBuilder_ = null; + } + + return this; + } + /** .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness.Builder getCompletenessBuilder() { + + 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; + onChanged(); + return this; + } + /** + * bool reproducible = 5; + * + * @return This builder for chaining. + */ + public Builder clearReproducible() { + + 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 { + return new SlsaMetadata(input, extensionRegistry); + } + }; + + public static com.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; + } + + private SlsaCompleteness( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + parameters_ = input.readBool(); + break; + } + case 16: + { + environment_ = input.readBool(); + break; + } + case 24: + { + materials_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + 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_; + /** + * 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_; + /** + * 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_; + /** + * 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_); + } + unknownFields.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 += unknownFields.getSerializedSize(); + memoizedSize = size; + 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 (!unknownFields.equals(other.unknownFields)) return false; + 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) + unknownFields.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() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + 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); + result.parameters_ = parameters_; + result.environment_ = environment_; + result.materials_ = materials_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.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.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + 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; + onChanged(); + return this; + } + /** + * bool parameters = 1; + * + * @return This builder for chaining. + */ + public Builder clearParameters() { + + 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; + onChanged(); + return this; + } + /** + * bool environment = 2; + * + * @return This builder for chaining. + */ + public Builder clearEnvironment() { + + 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; + onChanged(); + return this; + } + /** + * bool materials = 3; + * + * @return This builder for chaining. + */ + public Builder clearMaterials() { + + 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 { + return new SlsaCompleteness(input, extensionRegistry); + } + }; + + public static com.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 getBuilder(); + } + + public static final int BUILD_TYPE_FIELD_NUMBER = 2; + 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 getInvocation(); + } + + 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 getBuildConfig(); + } + + 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 getMetadata(); + } + + public static final int MATERIALS_FIELD_NUMBER = 6; + 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)); + } + unknownFields.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 += unknownFields.getSerializedSize(); + memoizedSize = size; + 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 (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.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() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getMaterialsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (builderBuilder_ == null) { + builder_ = null; + } else { + builder_ = null; + builderBuilder_ = null; + } + buildType_ = ""; + + if (invocationBuilder_ == null) { + invocation_ = null; + } else { + invocation_ = null; + invocationBuilder_ = null; + } + if (buildConfigBuilder_ == null) { + buildConfig_ = null; + } else { + buildConfig_ = null; + buildConfigBuilder_ = null; + } + if (metadataBuilder_ == null) { + metadata_ = null; + } else { + metadata_ = null; + metadataBuilder_ = null; + } + if (materialsBuilder_ == null) { + materials_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + materialsBuilder_.clear(); + } + 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); + int from_bitField0_ = bitField0_; + if (builderBuilder_ == null) { + result.builder_ = builder_; + } else { + result.builder_ = builderBuilder_.build(); + } + result.buildType_ = buildType_; + if (invocationBuilder_ == null) { + result.invocation_ = invocation_; + } else { + result.invocation_ = invocationBuilder_.build(); + } + if (buildConfigBuilder_ == null) { + result.buildConfig_ = buildConfig_; + } else { + result.buildConfig_ = buildConfigBuilder_.build(); + } + if (metadataBuilder_ == null) { + result.metadata_ = metadata_; + } else { + result.metadata_ = metadataBuilder_.build(); + } + if (materialsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + materials_ = java.util.Collections.unmodifiableList(materials_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.materials_ = materials_; + } else { + result.materials_ = materialsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.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_; + 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_ & ~0x00000001); + } else { + ensureMaterialsIsMutable(); + materials_.addAll(other.materials_); + } + onChanged(); + } + } else { + if (!other.materials_.isEmpty()) { + if (materialsBuilder_.isEmpty()) { + materialsBuilder_.dispose(); + materialsBuilder_ = null; + materials_ = other.materials_; + bitField0_ = (bitField0_ & ~0x00000001); + materialsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMaterialsFieldBuilder() + : null; + } else { + materialsBuilder_.addAllMessages(other.materials_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + io.grafeas.v1.SlsaProvenanceZeroTwo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grafeas.v1.SlsaProvenanceZeroTwo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + 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 builderBuilder_ != null || builder_ != null; + } + /** + * .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; + onChanged(); + } else { + builderBuilder_.setMessage(value); + } + + return this; + } + /** .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; */ + public Builder setBuilder( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.Builder builderForValue) { + if (builderBuilder_ == null) { + builder_ = builderForValue.build(); + onChanged(); + } else { + builderBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; */ + public Builder mergeBuilder(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder value) { + if (builderBuilder_ == null) { + if (builder_ != null) { + builder_ = + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.newBuilder(builder_) + .mergeFrom(value) + .buildPartial(); + } else { + builder_ = value; + } + onChanged(); + } else { + builderBuilder_.mergeFrom(value); + } + + return this; + } + /** .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; */ + public Builder clearBuilder() { + if (builderBuilder_ == null) { + builder_ = null; + onChanged(); + } else { + builder_ = null; + builderBuilder_ = null; + } + + return this; + } + /** .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder.Builder getBuilderBuilder() { + + 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; + onChanged(); + return this; + } + /** + * string build_type = 2; + * + * @return This builder for chaining. + */ + public Builder clearBuildType() { + + buildType_ = getDefaultInstance().getBuildType(); + 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; + 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 invocationBuilder_ != null || invocation_ != null; + } + /** + * .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; + onChanged(); + } else { + invocationBuilder_.setMessage(value); + } + + return this; + } + /** .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; */ + public Builder setInvocation( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.Builder builderForValue) { + if (invocationBuilder_ == null) { + invocation_ = builderForValue.build(); + onChanged(); + } else { + invocationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; */ + public Builder mergeInvocation(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation value) { + if (invocationBuilder_ == null) { + if (invocation_ != null) { + invocation_ = + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.newBuilder(invocation_) + .mergeFrom(value) + .buildPartial(); + } else { + invocation_ = value; + } + onChanged(); + } else { + invocationBuilder_.mergeFrom(value); + } + + return this; + } + /** .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; */ + public Builder clearInvocation() { + if (invocationBuilder_ == null) { + invocation_ = null; + onChanged(); + } else { + invocation_ = null; + invocationBuilder_ = null; + } + + return this; + } + /** .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation.Builder getInvocationBuilder() { + + 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 buildConfigBuilder_ != null || buildConfig_ != null; + } + /** + * .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; + onChanged(); + } else { + buildConfigBuilder_.setMessage(value); + } + + return this; + } + /** .google.protobuf.Struct build_config = 4; */ + public Builder setBuildConfig(com.google.protobuf.Struct.Builder builderForValue) { + if (buildConfigBuilder_ == null) { + buildConfig_ = builderForValue.build(); + onChanged(); + } else { + buildConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** .google.protobuf.Struct build_config = 4; */ + public Builder mergeBuildConfig(com.google.protobuf.Struct value) { + if (buildConfigBuilder_ == null) { + if (buildConfig_ != null) { + buildConfig_ = + com.google.protobuf.Struct.newBuilder(buildConfig_).mergeFrom(value).buildPartial(); + } else { + buildConfig_ = value; + } + onChanged(); + } else { + buildConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** .google.protobuf.Struct build_config = 4; */ + public Builder clearBuildConfig() { + if (buildConfigBuilder_ == null) { + buildConfig_ = null; + onChanged(); + } else { + buildConfig_ = null; + buildConfigBuilder_ = null; + } + + return this; + } + /** .google.protobuf.Struct build_config = 4; */ + public com.google.protobuf.Struct.Builder getBuildConfigBuilder() { + + 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 metadataBuilder_ != null || metadata_ != null; + } + /** + * .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; + onChanged(); + } else { + metadataBuilder_.setMessage(value); + } + + return this; + } + /** .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; */ + public Builder setMetadata( + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + onChanged(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; */ + public Builder mergeMetadata(io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata value) { + if (metadataBuilder_ == null) { + if (metadata_ != null) { + metadata_ = + io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.newBuilder(metadata_) + .mergeFrom(value) + .buildPartial(); + } else { + metadata_ = value; + } + onChanged(); + } else { + metadataBuilder_.mergeFrom(value); + } + + return this; + } + /** .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; */ + public Builder clearMetadata() { + if (metadataBuilder_ == null) { + metadata_ = null; + onChanged(); + } else { + metadata_ = null; + metadataBuilder_ = null; + } + + return this; + } + /** .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; */ + public io.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata.Builder getMetadataBuilder() { + + 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_ & 0x00000001) != 0)) { + materials_ = + new java.util.ArrayList(materials_); + bitField0_ |= 0x00000001; + } + } + + 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_ & ~0x00000001); + 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_ & 0x00000001) != 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 { + return new SlsaProvenanceZeroTwo(input, extensionRegistry); + } + }; + + public static com.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/java-grafeas/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoOrBuilder.java b/java-grafeas/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoOrBuilder.java new file mode 100644 index 000000000000..18a226025905 --- /dev/null +++ b/java-grafeas/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoOrBuilder.java @@ -0,0 +1,111 @@ +/* + * 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/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/java-grafeas/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoProto.java b/java-grafeas/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoProto.java new file mode 100644 index 000000000000..b31a48a5b674 --- /dev/null +++ b/java-grafeas/src/main/java/io/grafeas/v1/SlsaProvenanceZeroTwoProto.java @@ -0,0 +1,206 @@ +/* + * 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/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/java-grafeas/src/main/java/io/grafeas/v1/Vulnerability.java b/java-grafeas/src/main/java/io/grafeas/v1/Vulnerability.java index 0967bd8adcf6..7295c049c72b 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/Vulnerability.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/Vulnerability.java @@ -89,7 +89,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ription\030\003 \001(\t\022M\n\nfixing_kbs\030\004 \003(\01329.graf" + "eas.v1.VulnerabilityNote.WindowsDetail.K" + "nowledgeBase\032*\n\rKnowledgeBase\022\014\n\004name\030\001 " - + "\001(\t\022\013\n\003url\030\002 \001(\t\"\254\005\n\027VulnerabilityOccurr" + + "\001(\t\022\013\n\003url\030\002 \001(\t\"\335\005\n\027VulnerabilityOccurr" + "ence\022\014\n\004type\030\001 \001(\t\022&\n\010severity\030\002 \001(\0162\024.g" + "rafeas.v1.Severity\022\022\n\ncvss_score\030\003 \001(\002\022 " + "\n\006cvssv3\030\n \001(\0132\020.grafeas.v1.CVSS\022G\n\rpack" @@ -98,7 +98,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "iption\030\005 \001(\t\022\030\n\020long_description\030\006 \001(\t\022," + "\n\014related_urls\030\007 \003(\0132\026.grafeas.v1.Relate" + "dUrl\0220\n\022effective_severity\030\010 \001(\0162\024.grafe" - + "as.v1.Severity\022\025\n\rfix_available\030\t \001(\010\032\257\002" + + "as.v1.Severity\022\025\n\rfix_available\030\t \001(\010\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_v" + "ersion\030\003 \001(\0132\023.grafeas.v1.Version\022\025\n\rfix" @@ -106,9 +106,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "*\n\rfixed_version\030\006 \001(\0132\023.grafeas.v1.Vers" + "ion\022\025\n\rfix_available\030\007 \001(\010\022\024\n\014package_ty" + "pe\030\010 \001(\t\0225\n\022effective_severity\030\t \001(\0162\024.g" - + "rafeas.v1.SeverityB\003\340A\003BQ\n\rio.grafeas.v1" - + "P\001Z8google.golang.org/genproto/googleapi" - + "s/grafeas/v1;grafeas\242\002\003GRAb\006proto3" + + "rafeas.v1.SeverityB\003\340A\003\022/\n\rfile_location" + + "\030\n \003(\0132\030.grafeas.v1.FileLocationBQ\n\rio.g" + + "rafeas.v1P\001Z8google.golang.org/genproto/" + + "googleapis/grafeas/v1;grafeas\242\002\003GRAb\006pro" + + "to3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -117,7 +119,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), io.grafeas.v1.Common.getDescriptor(), - io.grafeas.v1.CvssProto.getDescriptor(), + io.grafeas.v1.CVSSProto.getDescriptor(), io.grafeas.v1.Package.getDescriptor(), io.grafeas.v1.SeverityOuterClass.getDescriptor(), }); @@ -200,6 +202,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "FixAvailable", "PackageType", "EffectiveSeverity", + "FileLocation", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); @@ -209,7 +212,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); io.grafeas.v1.Common.getDescriptor(); - io.grafeas.v1.CvssProto.getDescriptor(); + io.grafeas.v1.CVSSProto.getDescriptor(); io.grafeas.v1.Package.getDescriptor(); io.grafeas.v1.SeverityOuterClass.getDescriptor(); } 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 b2582df05761..2033ffde5293 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/VulnerabilityOccurrence.java @@ -461,6 +461,57 @@ public interface PackageIssueOrBuilder * @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); } /** * @@ -489,6 +540,7 @@ private PackageIssue() { fixedPackage_ = ""; packageType_ = ""; effectiveSeverity_ = 0; + fileLocation_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -510,6 +562,7 @@ private PackageIssue( if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } + int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { @@ -597,6 +650,16 @@ private PackageIssue( effectiveSeverity_ = rawValue; break; } + case 82: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + fileLocation_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + fileLocation_.add( + input.readMessage(io.grafeas.v1.FileLocation.parser(), extensionRegistry)); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -613,6 +676,9 @@ private PackageIssue( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + fileLocation_ = java.util.Collections.unmodifiableList(fileLocation_); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -1047,6 +1113,75 @@ public io.grafeas.v1.Severity getEffectiveSeverity() { return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result; } + public static final int FILE_LOCATION_FIELD_NUMBER = 10; + 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 @@ -1088,6 +1223,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io 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)); + } unknownFields.writeTo(output); } @@ -1124,6 +1262,9 @@ public int getSerializedSize() { 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 += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1155,6 +1296,7 @@ public boolean equals(final java.lang.Object obj) { 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 (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -1188,6 +1330,10 @@ public int hashCode() { 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) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -1330,7 +1476,9 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getFileLocationFieldBuilder(); + } } @java.lang.Override @@ -1362,6 +1510,12 @@ public Builder clear() { effectiveSeverity_ = 0; + if (fileLocationBuilder_ == null) { + fileLocation_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + fileLocationBuilder_.clear(); + } return this; } @@ -1389,6 +1543,7 @@ public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue build() { public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue buildPartial() { io.grafeas.v1.VulnerabilityOccurrence.PackageIssue result = new io.grafeas.v1.VulnerabilityOccurrence.PackageIssue(this); + int from_bitField0_ = bitField0_; result.affectedCpeUri_ = affectedCpeUri_; result.affectedPackage_ = affectedPackage_; if (affectedVersionBuilder_ == null) { @@ -1406,6 +1561,15 @@ public io.grafeas.v1.VulnerabilityOccurrence.PackageIssue buildPartial() { result.fixAvailable_ = fixAvailable_; result.packageType_ = packageType_; result.effectiveSeverity_ = effectiveSeverity_; + if (fileLocationBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + fileLocation_ = java.util.Collections.unmodifiableList(fileLocation_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fileLocation_ = fileLocation_; + } else { + result.fileLocation_ = fileLocationBuilder_.build(); + } onBuilt(); return result; } @@ -1490,6 +1654,33 @@ public Builder mergeFrom(io.grafeas.v1.VulnerabilityOccurrence.PackageIssue othe if (other.effectiveSeverity_ != 0) { setEffectiveSeverityValue(other.getEffectiveSeverityValue()); } + if (fileLocationBuilder_ == null) { + if (!other.fileLocation_.isEmpty()) { + if (fileLocation_.isEmpty()) { + fileLocation_ = other.fileLocation_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFileLocationIsMutable(); + fileLocation_.addAll(other.fileLocation_); + } + onChanged(); + } + } else { + if (!other.fileLocation_.isEmpty()) { + if (fileLocationBuilder_.isEmpty()) { + fileLocationBuilder_.dispose(); + fileLocationBuilder_ = null; + fileLocation_ = other.fileLocation_; + bitField0_ = (bitField0_ & ~0x00000001); + fileLocationBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFileLocationFieldBuilder() + : null; + } else { + fileLocationBuilder_.addAllMessages(other.fileLocation_); + } + } + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -1520,6 +1711,8 @@ public Builder mergeFrom( return this; } + private int bitField0_; + private java.lang.Object affectedCpeUri_ = ""; /** * @@ -2604,6 +2797,357 @@ public Builder clearEffectiveSeverity() { return this; } + private java.util.List fileLocation_ = + java.util.Collections.emptyList(); + + private void ensureFileLocationIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + fileLocation_ = new java.util.ArrayList(fileLocation_); + bitField0_ |= 0x00000001; + } + } + + 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_ & ~0x00000001); + 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_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + fileLocation_ = null; + } + return fileLocationBuilder_; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { diff --git a/java-grafeas/src/main/java/io/grafeas/v1/stub/GrafeasStubSettings.java b/java-grafeas/src/main/java/io/grafeas/v1/stub/GrafeasStubSettings.java index 04f1ce2368f2..f8cc2d57fa43 100644 --- a/java-grafeas/src/main/java/io/grafeas/v1/stub/GrafeasStubSettings.java +++ b/java-grafeas/src/main/java/io/grafeas/v1/stub/GrafeasStubSettings.java @@ -380,7 +380,6 @@ public UnaryCallSettings updateNoteSettings() { return listNoteOccurrencesSettings; } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public GrafeasStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() diff --git a/java-grafeas/src/main/proto/grafeas/v1/common.proto b/java-grafeas/src/main/proto/grafeas/v1/common.proto index 29a666320be2..80bd7869968a 100644 --- a/java-grafeas/src/main/proto/grafeas/v1/common.proto +++ b/java-grafeas/src/main/proto/grafeas/v1/common.proto @@ -119,3 +119,32 @@ 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/java-grafeas/src/main/proto/grafeas/v1/compliance.proto b/java-grafeas/src/main/proto/grafeas/v1/compliance.proto index 7913151eb2c0..688fa82596b1 100644 --- a/java-grafeas/src/main/proto/grafeas/v1/compliance.proto +++ b/java-grafeas/src/main/proto/grafeas/v1/compliance.proto @@ -52,6 +52,9 @@ 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; diff --git a/java-grafeas/src/main/proto/grafeas/v1/cvss.proto b/java-grafeas/src/main/proto/grafeas/v1/cvss.proto index c82b3d12f891..ab7e2b8d0412 100644 --- a/java-grafeas/src/main/proto/grafeas/v1/cvss.proto +++ b/java-grafeas/src/main/proto/grafeas/v1/cvss.proto @@ -19,8 +19,8 @@ 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 java_outer_classname = "CvssProto"; 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 @@ -87,10 +87,8 @@ message CVSSv3 { // 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 multiple versions of -// CVSS. The intention is that as new versions of CVSS scores get added, we -// will be able to modify this message rather than adding new protos for each -// new version of the score. +// 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; diff --git a/java-grafeas/src/main/proto/grafeas/v1/dsse_attestation.proto b/java-grafeas/src/main/proto/grafeas/v1/dsse_attestation.proto index 0264ab9911c9..34ba3df9f9be 100644 --- a/java-grafeas/src/main/proto/grafeas/v1/dsse_attestation.proto +++ b/java-grafeas/src/main/proto/grafeas/v1/dsse_attestation.proto @@ -49,4 +49,4 @@ message DSSEAttestationOccurrence { oneof decoded_payload { InTotoStatement statement = 2; } -} \ No newline at end of file +} diff --git a/java-grafeas/src/main/proto/grafeas/v1/intoto_statement.proto b/java-grafeas/src/main/proto/grafeas/v1/intoto_statement.proto index 9e4067cbb322..1f798d0d65f1 100644 --- a/java-grafeas/src/main/proto/grafeas/v1/intoto_statement.proto +++ b/java-grafeas/src/main/proto/grafeas/v1/intoto_statement.proto @@ -18,6 +18,7 @@ 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; @@ -38,6 +39,7 @@ message InTotoStatement { oneof predicate { InTotoProvenance provenance = 4; SlsaProvenance slsa_provenance = 5; + SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; } } message Subject { diff --git a/java-grafeas/src/main/proto/grafeas/v1/package.proto b/java-grafeas/src/main/proto/grafeas/v1/package.proto index 078c88c77020..61b21dbf0323 100644 --- a/java-grafeas/src/main/proto/grafeas/v1/package.proto +++ b/java-grafeas/src/main/proto/grafeas/v1/package.proto @@ -16,6 +16,9 @@ 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"; @@ -34,9 +37,9 @@ enum Architecture { // This represents a particular channel of distribution for a given package. // E.g., Debian's jessie-backports dpkg mirror. message Distribution { - // Required. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) + // The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) // denoting the package manager version distributing a package. - string cpe_uri = 1; + string cpe_uri = 1 [(google.api.field_behavior) = REQUIRED]; // The CPU architecture for which packages in this distribution channel were // built. @@ -58,10 +61,11 @@ message Distribution { // 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 { - // Required. The CPE URI in [CPE format](https://cpe.mitre.org/specification/) - // denoting the package manager version distributing a package. + // 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; @@ -69,25 +73,81 @@ message Location { string path = 3; } -// This represents a particular package that is distributed over various -// channels. E.g., glibc (aka libc6) is distributed by many, at various -// versions. +// PackageNote represents a particular package version. message PackageNote { - // Required. Immutable. The name of the package. - string name = 1; + // 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 { - // Output only. The name of the installed package. - string name = 1; + // The name of the installed package. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = OUTPUT_ONLY + ]; - // Required. All of the places within the filesystem versions of this package + // 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. diff --git a/java-grafeas/src/main/proto/grafeas/v1/slsa_provenance.proto b/java-grafeas/src/main/proto/grafeas/v1/slsa_provenance.proto index b585f0b7bcfe..c038af064e0e 100644 --- a/java-grafeas/src/main/proto/grafeas/v1/slsa_provenance.proto +++ b/java-grafeas/src/main/proto/grafeas/v1/slsa_provenance.proto @@ -23,6 +23,7 @@ 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. @@ -111,4 +112,4 @@ message SlsaProvenance { // incomplete unless metadata.completeness.materials is true. Unset or null is // equivalent to empty. repeated Material materials = 4; -} \ No newline at end of file +} diff --git a/java-grafeas/src/main/proto/grafeas/v1/slsa_provenance_zero_two.proto b/java-grafeas/src/main/proto/grafeas/v1/slsa_provenance_zero_two.proto new file mode 100644 index 000000000000..11cdd1c0ba59 --- /dev/null +++ b/java-grafeas/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/java-grafeas/src/main/proto/grafeas/v1/vulnerability.proto b/java-grafeas/src/main/proto/grafeas/v1/vulnerability.proto index 434e14983c4a..70ab550af598 100644 --- a/java-grafeas/src/main/proto/grafeas/v1/vulnerability.proto +++ b/java-grafeas/src/main/proto/grafeas/v1/vulnerability.proto @@ -209,6 +209,9 @@ message VulnerabilityOccurrence { // 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.