From 33eaa39ea6b518c304629e055af151aa95850656 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 3 Oct 2022 17:10:20 +0000 Subject: [PATCH] chore(bazel): update protobuf to v3.21.7 (#966) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 477955264 Source-Link: https://togithub.com/googleapis/googleapis/commit/a724450af76d0001f23602684c49cd6a4b3a5654 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/4abcbcaec855e74a0b22a4988cf9e0eb61a83094 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGFiY2JjYWVjODU1ZTc0YTBiMjJhNDk4OGNmOWUwZWI2MWE4MzA5NCJ9 --- java-containeranalysis/README.md | 4 +- ...ulnerabilityOccurrencesSummaryRequest.java | 129 ++++---- .../v1/VulnerabilityOccurrencesSummary.java | 293 ++++++++---------- 3 files changed, 175 insertions(+), 251 deletions(-) diff --git a/java-containeranalysis/README.md b/java-containeranalysis/README.md index ba13eb87d1d5..87783f65052d 100644 --- a/java-containeranalysis/README.md +++ b/java-containeranalysis/README.md @@ -56,13 +56,13 @@ implementation 'com.google.cloud:google-cloud-containeranalysis' If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-containeranalysis:2.4.7' +implementation 'com.google.cloud:google-cloud-containeranalysis:2.4.8' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-containeranalysis" % "2.4.7" +libraryDependencies += "com.google.cloud" % "google-cloud-containeranalysis" % "2.4.8" ``` ## Authentication diff --git a/java-containeranalysis/proto-google-cloud-containeranalysis-v1/src/main/java/com/google/containeranalysis/v1/GetVulnerabilityOccurrencesSummaryRequest.java b/java-containeranalysis/proto-google-cloud-containeranalysis-v1/src/main/java/com/google/containeranalysis/v1/GetVulnerabilityOccurrencesSummaryRequest.java index 3413ad3ecb3b..78ae88c7ef87 100644 --- a/java-containeranalysis/proto-google-cloud-containeranalysis-v1/src/main/java/com/google/containeranalysis/v1/GetVulnerabilityOccurrencesSummaryRequest.java +++ b/java-containeranalysis/proto-google-cloud-containeranalysis-v1/src/main/java/com/google/containeranalysis/v1/GetVulnerabilityOccurrencesSummaryRequest.java @@ -56,59 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetVulnerabilityOccurrencesSummaryRequest( - 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(); - - parent_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = 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 com.google.containeranalysis.v1.Containeranalysis .internal_static_google_devtools_containeranalysis_v1_GetVulnerabilityOccurrencesSummaryRequest_descriptor; @@ -249,7 +196,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -264,7 +211,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -283,7 +230,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (!getFilter().equals(other.getFilter())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -298,7 +245,7 @@ public int hashCode() { hash = (53 * hash) + getParent().hashCode(); hash = (37 * hash) + FILTER_FIELD_NUMBER; hash = (53 * hash) + getFilter().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -432,17 +379,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -547,7 +487,7 @@ public Builder mergeFrom( filter_ = other.filter_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -562,20 +502,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest parsedMessage = - null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -842,7 +805,19 @@ public GetVulnerabilityOccurrencesSummaryRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetVulnerabilityOccurrencesSummaryRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-containeranalysis/proto-google-cloud-containeranalysis-v1/src/main/java/com/google/containeranalysis/v1/VulnerabilityOccurrencesSummary.java b/java-containeranalysis/proto-google-cloud-containeranalysis-v1/src/main/java/com/google/containeranalysis/v1/VulnerabilityOccurrencesSummary.java index 2183a40ef8e8..4738bd7622f7 100644 --- a/java-containeranalysis/proto-google-cloud-containeranalysis-v1/src/main/java/com/google/containeranalysis/v1/VulnerabilityOccurrencesSummary.java +++ b/java-containeranalysis/proto-google-cloud-containeranalysis-v1/src/main/java/com/google/containeranalysis/v1/VulnerabilityOccurrencesSummary.java @@ -54,65 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private VulnerabilityOccurrencesSummary( - 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: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - counts_ = - new java.util.ArrayList< - com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary - .FixableTotalByDigest>(); - mutable_bitField0_ |= 0x00000001; - } - counts_.add( - input.readMessage( - com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary - .FixableTotalByDigest.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)) { - counts_ = java.util.Collections.unmodifiableList(counts_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.containeranalysis.v1.Containeranalysis .internal_static_google_devtools_containeranalysis_v1_VulnerabilityOccurrencesSummary_descriptor; @@ -247,69 +188,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FixableTotalByDigest( - 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(); - - resourceUri_ = s; - break; - } - case 16: - { - int rawValue = input.readEnum(); - - severity_ = rawValue; - break; - } - case 24: - { - fixableCount_ = input.readInt64(); - break; - } - case 32: - { - totalCount_ = input.readInt64(); - 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 com.google.containeranalysis.v1.Containeranalysis .internal_static_google_devtools_containeranalysis_v1_VulnerabilityOccurrencesSummary_FixableTotalByDigest_descriptor; @@ -475,7 +353,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (totalCount_ != 0L) { output.writeInt64(4, totalCount_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -496,7 +374,7 @@ public int getSerializedSize() { if (totalCount_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, totalCount_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -519,7 +397,7 @@ public boolean equals(final java.lang.Object obj) { if (severity_ != other.severity_) return false; if (getFixableCount() != other.getFixableCount()) return false; if (getTotalCount() != other.getTotalCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -538,7 +416,7 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getFixableCount()); hash = (37 * hash) + TOTAL_COUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalCount()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -694,17 +572,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -828,7 +699,7 @@ public Builder mergeFrom( if (other.getTotalCount() != 0L) { setTotalCount(other.getTotalCount()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -843,20 +714,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest - parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + resourceUri_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + severity_ = input.readEnum(); + + break; + } // case 16 + case 24: + { + fixableCount_ = input.readInt64(); + + break; + } // case 24 + case 32: + { + totalCount_ = input.readInt64(); + + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1204,7 +1110,19 @@ public FixableTotalByDigest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FixableTotalByDigest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1330,7 +1248,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < counts_.size(); i++) { output.writeMessage(1, counts_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1342,7 +1260,7 @@ public int getSerializedSize() { for (int i = 0; i < counts_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, counts_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1359,7 +1277,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary) obj; if (!getCountsList().equals(other.getCountsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1374,7 +1292,7 @@ public int hashCode() { hash = (37 * hash) + COUNTS_FIELD_NUMBER; hash = (53 * hash) + getCountsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1505,19 +1423,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getCountsFieldBuilder(); - } } @java.lang.Override @@ -1525,10 +1434,11 @@ public Builder clear() { super.clear(); if (countsBuilder_ == null) { counts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + counts_ = null; countsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -1646,7 +1556,7 @@ public Builder mergeFrom( } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1661,19 +1571,47 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest + m = + input.readMessage( + com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary + .FixableTotalByDigest.parser(), + extensionRegistry); + if (countsBuilder_ == null) { + ensureCountsIsMutable(); + counts_.add(m); + } else { + countsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2148,7 +2086,18 @@ public VulnerabilityOccurrencesSummary parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new VulnerabilityOccurrencesSummary(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } };