From 7a596ab1b5c3a0872a6174bf7c7be3465c956e4e 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:30:21 +0000 Subject: [PATCH] chore(bazel): update protobuf to v3.21.7 (#1378) - [ ] 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 --- .../AnalyzeIamPolicyLongrunningMetadata.java | 122 +- .../AnalyzeIamPolicyLongrunningRequest.java | 158 +-- .../AnalyzeIamPolicyLongrunningResponse.java | 101 +- .../asset/v1/AnalyzeIamPolicyRequest.java | 157 +-- .../asset/v1/AnalyzeIamPolicyResponse.java | 380 +++--- .../cloud/asset/v1/AnalyzeMoveRequest.java | 138 +- .../cloud/asset/v1/AnalyzeMoveResponse.java | 132 +- .../java/com/google/cloud/asset/v1/Asset.java | 399 ++---- .../cloud/asset/v1/AttachedResource.java | 146 +-- .../v1/BatchGetAssetsHistoryRequest.java | 189 +-- .../v1/BatchGetAssetsHistoryResponse.java | 133 +- .../BatchGetEffectiveIamPoliciesRequest.java | 135 +- .../BatchGetEffectiveIamPoliciesResponse.java | 439 +++---- .../cloud/asset/v1/BigQueryDestination.java | 169 +-- .../cloud/asset/v1/ConditionEvaluation.java | 112 +- .../cloud/asset/v1/CreateFeedRequest.java | 145 +- .../asset/v1/CreateSavedQueryRequest.java | 148 +-- .../cloud/asset/v1/DeleteFeedRequest.java | 112 +- .../asset/v1/DeleteSavedQueryRequest.java | 113 +- .../cloud/asset/v1/ExportAssetsRequest.java | 209 ++- .../cloud/asset/v1/ExportAssetsResponse.java | 164 +-- .../java/com/google/cloud/asset/v1/Feed.java | 229 ++-- .../cloud/asset/v1/FeedOutputConfig.java | 126 +- .../google/cloud/asset/v1/GcsDestination.java | 127 +- .../cloud/asset/v1/GcsOutputResult.java | 120 +- .../google/cloud/asset/v1/GetFeedRequest.java | 112 +- .../cloud/asset/v1/GetSavedQueryRequest.java | 112 +- .../v1/IamPolicyAnalysisOutputConfig.java | 437 +++--- .../asset/v1/IamPolicyAnalysisQuery.java | 900 +++++-------- .../asset/v1/IamPolicyAnalysisResult.java | 1166 +++++++---------- .../asset/v1/IamPolicyAnalysisState.java | 125 +- .../cloud/asset/v1/IamPolicySearchResult.java | 477 +++---- .../cloud/asset/v1/ListAssetsRequest.java | 211 ++- .../cloud/asset/v1/ListAssetsResponse.java | 164 +-- .../cloud/asset/v1/ListFeedsRequest.java | 112 +- .../cloud/asset/v1/ListFeedsResponse.java | 130 +- .../asset/v1/ListSavedQueriesRequest.java | 150 +-- .../asset/v1/ListSavedQueriesResponse.java | 146 +-- .../google/cloud/asset/v1/MoveAnalysis.java | 160 +-- .../cloud/asset/v1/MoveAnalysisResult.java | 163 +-- .../com/google/cloud/asset/v1/MoveImpact.java | 112 +- .../google/cloud/asset/v1/OutputConfig.java | 151 +-- .../google/cloud/asset/v1/OutputResult.java | 124 +- .../google/cloud/asset/v1/PartitionSpec.java | 112 +- .../cloud/asset/v1/PubsubDestination.java | 112 +- .../asset/v1/QueryAssetsOutputConfig.java | 267 ++-- .../cloud/asset/v1/QueryAssetsRequest.java | 256 ++-- .../cloud/asset/v1/QueryAssetsResponse.java | 198 ++- .../google/cloud/asset/v1/QueryResult.java | 175 +-- .../google/cloud/asset/v1/RelatedAsset.java | 159 +-- .../google/cloud/asset/v1/RelatedAssets.java | 155 +-- .../cloud/asset/v1/RelatedResource.java | 125 +- .../cloud/asset/v1/RelatedResources.java | 133 +- .../asset/v1/RelationshipAttributes.java | 151 +-- .../com/google/cloud/asset/v1/Resource.java | 197 ++- .../cloud/asset/v1/ResourceSearchResult.java | 528 +++----- .../com/google/cloud/asset/v1/SavedQuery.java | 372 ++---- .../asset/v1/SearchAllIamPoliciesRequest.java | 184 ++- .../v1/SearchAllIamPoliciesResponse.java | 148 +-- .../asset/v1/SearchAllResourcesRequest.java | 205 ++- .../asset/v1/SearchAllResourcesResponse.java | 147 +-- .../cloud/asset/v1/TableFieldSchema.java | 171 +-- .../google/cloud/asset/v1/TableSchema.java | 132 +- .../google/cloud/asset/v1/TemporalAsset.java | 187 +-- .../com/google/cloud/asset/v1/TimeWindow.java | 141 +- .../cloud/asset/v1/UpdateFeedRequest.java | 140 +- .../asset/v1/UpdateSavedQueryRequest.java | 143 +- .../cloud/asset/v1/VersionedResource.java | 132 +- .../v1p1beta1/IamPolicySearchResult.java | 305 ++--- .../cloud/asset/v1p1beta1/Permissions.java | 120 +- .../SearchAllIamPoliciesRequest.java | 150 +-- .../SearchAllIamPoliciesResponse.java | 151 +-- .../v1p1beta1/SearchAllResourcesRequest.java | 184 ++- .../v1p1beta1/SearchAllResourcesResponse.java | 150 +-- .../v1p1beta1/StandardResourceMetadata.java | 243 ++-- .../google/cloud/asset/v1p2beta1/Asset.java | 188 +-- .../asset/v1p2beta1/CreateFeedRequest.java | 148 +-- .../asset/v1p2beta1/DeleteFeedRequest.java | 113 +- .../google/cloud/asset/v1p2beta1/Feed.java | 190 +-- .../asset/v1p2beta1/FeedOutputConfig.java | 129 +- .../cloud/asset/v1p2beta1/GcsDestination.java | 113 +- .../cloud/asset/v1p2beta1/GetFeedRequest.java | 112 +- .../asset/v1p2beta1/ListFeedsRequest.java | 113 +- .../asset/v1p2beta1/ListFeedsResponse.java | 133 +- .../cloud/asset/v1p2beta1/OutputConfig.java | 126 +- .../asset/v1p2beta1/PubsubDestination.java | 113 +- .../cloud/asset/v1p2beta1/Resource.java | 184 ++- .../cloud/asset/v1p2beta1/TemporalAsset.java | 154 +-- .../cloud/asset/v1p2beta1/TimeWindow.java | 141 +- .../asset/v1p2beta1/UpdateFeedRequest.java | 143 +- .../google/cloud/asset/v1p5beta1/Asset.java | 313 ++--- .../asset/v1p5beta1/ListAssetsRequest.java | 192 ++- .../asset/v1p5beta1/ListAssetsResponse.java | 167 +-- .../cloud/asset/v1p5beta1/Resource.java | 184 ++- .../google/cloud/asset/v1p7beta1/Asset.java | 356 ++--- .../asset/v1p7beta1/BigQueryDestination.java | 170 +-- .../asset/v1p7beta1/ExportAssetsRequest.java | 210 ++- .../asset/v1p7beta1/ExportAssetsResponse.java | 165 +-- .../cloud/asset/v1p7beta1/GcsDestination.java | 127 +- .../asset/v1p7beta1/GcsOutputResult.java | 120 +- .../cloud/asset/v1p7beta1/OutputConfig.java | 156 +-- .../cloud/asset/v1p7beta1/OutputResult.java | 125 +- .../cloud/asset/v1p7beta1/PartitionSpec.java | 112 +- .../cloud/asset/v1p7beta1/RelatedAsset.java | 146 +-- .../cloud/asset/v1p7beta1/RelatedAssets.java | 156 +-- .../v1p7beta1/RelationshipAttributes.java | 152 +-- .../cloud/asset/v1p7beta1/Resource.java | 197 ++- 107 files changed, 8006 insertions(+), 12470 deletions(-) diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningMetadata.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningMetadata.java index 16e2935d0..71e8cf0b1 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningMetadata.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningMetadata.java @@ -53,60 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AnalyzeIamPolicyLongrunningMetadata( - 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: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = 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 com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningMetadata_descriptor; @@ -188,7 +134,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (createTime_ != null) { output.writeMessage(1, getCreateTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -200,7 +146,7 @@ public int getSerializedSize() { if (createTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -220,7 +166,7 @@ public boolean equals(final java.lang.Object obj) { if (hasCreateTime()) { if (!getCreateTime().equals(other.getCreateTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -235,7 +181,7 @@ public int hashCode() { hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getCreateTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -366,17 +312,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata.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 @@ -475,7 +414,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMe if (other.hasCreateTime()) { mergeCreateTime(other.getCreateTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -490,19 +429,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata 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: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + 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.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -740,7 +697,18 @@ public AnalyzeIamPolicyLongrunningMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AnalyzeIamPolicyLongrunningMetadata(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningRequest.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningRequest.java index 2cd68a884..b737684f4 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningRequest.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningRequest.java @@ -54,85 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AnalyzeIamPolicyLongrunningRequest( - 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: - { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder subBuilder = null; - if (analysisQuery_ != null) { - subBuilder = analysisQuery_.toBuilder(); - } - analysisQuery_ = - input.readMessage( - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(analysisQuery_); - analysisQuery_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.Builder subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = - input.readMessage( - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputConfig_); - outputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - savedAnalysisQuery_ = 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.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningRequest_descriptor; @@ -356,7 +277,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(savedAnalysisQuery_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, savedAnalysisQuery_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -374,7 +295,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(savedAnalysisQuery_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, savedAnalysisQuery_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -399,7 +320,7 @@ public boolean equals(final java.lang.Object obj) { if (hasOutputConfig()) { if (!getOutputConfig().equals(other.getOutputConfig())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -420,7 +341,7 @@ public int hashCode() { hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getOutputConfig().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -551,17 +472,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest.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 @@ -681,7 +595,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRe if (other.hasOutputConfig()) { mergeOutputConfig(other.getOutputConfig()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -696,18 +610,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest 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: + { + input.readMessage(getAnalysisQueryFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getOutputConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + savedAnalysisQuery_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1330,7 +1275,18 @@ public AnalyzeIamPolicyLongrunningRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AnalyzeIamPolicyLongrunningRequest(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningResponse.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningResponse.java index 808bc307b..8265b9f52 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningResponse.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningResponse.java @@ -53,45 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AnalyzeIamPolicyLongrunningResponse( - 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; - 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.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningResponse_descriptor; @@ -121,7 +82,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -130,7 +91,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -146,7 +107,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse other = (com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -157,7 +118,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -288,17 +249,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse.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 @@ -383,7 +337,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRe if (other == com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -398,19 +352,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse 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; + default: + { + 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.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -447,7 +413,18 @@ public AnalyzeIamPolicyLongrunningResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AnalyzeIamPolicyLongrunningResponse(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyRequest.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyRequest.java index e0090b98f..8056eb3c3 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyRequest.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyRequest.java @@ -53,83 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AnalyzeIamPolicyRequest( - 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: - { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder subBuilder = null; - if (analysisQuery_ != null) { - subBuilder = analysisQuery_.toBuilder(); - } - analysisQuery_ = - input.readMessage( - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(analysisQuery_); - analysisQuery_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.Duration.Builder subBuilder = null; - if (executionTimeout_ != null) { - subBuilder = executionTimeout_.toBuilder(); - } - executionTimeout_ = - input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(executionTimeout_); - executionTimeout_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - savedAnalysisQuery_ = 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.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_descriptor; @@ -373,7 +296,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(savedAnalysisQuery_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, savedAnalysisQuery_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -391,7 +314,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(savedAnalysisQuery_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, savedAnalysisQuery_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -416,7 +339,7 @@ public boolean equals(final java.lang.Object obj) { if (hasExecutionTimeout()) { if (!getExecutionTimeout().equals(other.getExecutionTimeout())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -437,7 +360,7 @@ public int hashCode() { hash = (37 * hash) + EXECUTION_TIMEOUT_FIELD_NUMBER; hash = (53 * hash) + getExecutionTimeout().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -567,17 +490,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.AnalyzeIamPolicyRequest.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 @@ -695,7 +611,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.AnalyzeIamPolicyRequest other if (other.hasExecutionTimeout()) { mergeExecutionTimeout(other.getExecutionTimeout()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -710,18 +626,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.AnalyzeIamPolicyRequest 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: + { + input.readMessage(getAnalysisQueryFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage( + getExecutionTimeoutFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + savedAnalysisQuery_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1.AnalyzeIamPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1402,7 +1350,18 @@ public AnalyzeIamPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AnalyzeIamPolicyRequest(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyResponse.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyResponse.java index ded28a1b4..a4c0819a8 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyResponse.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyResponse.java @@ -53,87 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AnalyzeIamPolicyResponse( - 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: - { - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder - subBuilder = null; - if (mainAnalysis_ != null) { - subBuilder = mainAnalysis_.toBuilder(); - } - mainAnalysis_ = - input.readMessage( - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(mainAnalysis_); - mainAnalysis_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - serviceAccountImpersonationAnalysis_ = - new java.util.ArrayList< - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis>(); - mutable_bitField0_ |= 0x00000001; - } - serviceAccountImpersonationAnalysis_.add( - input.readMessage( - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.parser(), - extensionRegistry)); - break; - } - case 24: - { - fullyExplored_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - serviceAccountImpersonationAnalysis_ = - java.util.Collections.unmodifiableList(serviceAccountImpersonationAnalysis_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_descriptor; @@ -355,100 +274,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private IamPolicyAnalysis( - 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: - { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder subBuilder = null; - if (analysisQuery_ != null) { - subBuilder = analysisQuery_.toBuilder(); - } - analysisQuery_ = - input.readMessage( - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(analysisQuery_); - analysisQuery_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - analysisResults_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - analysisResults_.add( - input.readMessage( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.parser(), - extensionRegistry)); - break; - } - case 24: - { - fullyExplored_ = input.readBool(); - break; - } - case 42: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - nonCriticalErrors_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - nonCriticalErrors_.add( - input.readMessage( - com.google.cloud.asset.v1.IamPolicyAnalysisState.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)) { - analysisResults_ = java.util.Collections.unmodifiableList(analysisResults_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - nonCriticalErrors_ = java.util.Collections.unmodifiableList(nonCriticalErrors_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_descriptor; @@ -710,7 +535,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < nonCriticalErrors_.size(); i++) { output.writeMessage(5, nonCriticalErrors_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -733,7 +558,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, nonCriticalErrors_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -756,7 +581,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAnalysisResultsList().equals(other.getAnalysisResultsList())) return false; if (getFullyExplored() != other.getFullyExplored()) return false; if (!getNonCriticalErrorsList().equals(other.getNonCriticalErrorsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -781,7 +606,7 @@ public int hashCode() { hash = (37 * hash) + NON_CRITICAL_ERRORS_FIELD_NUMBER; hash = (53 * hash) + getNonCriticalErrorsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -915,20 +740,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.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) { - getAnalysisResultsFieldBuilder(); - getNonCriticalErrorsFieldBuilder(); - } } @java.lang.Override @@ -942,18 +757,20 @@ public Builder clear() { } if (analysisResultsBuilder_ == null) { analysisResults_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + analysisResults_ = null; analysisResultsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); fullyExplored_ = false; if (nonCriticalErrorsBuilder_ == null) { nonCriticalErrors_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + nonCriticalErrors_ = null; nonCriticalErrorsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -1124,7 +941,7 @@ public Builder mergeFrom( } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1139,19 +956,71 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis 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: + { + input.readMessage(getAnalysisQueryFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + com.google.cloud.asset.v1.IamPolicyAnalysisResult m = + input.readMessage( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.parser(), + extensionRegistry); + if (analysisResultsBuilder_ == null) { + ensureAnalysisResultsIsMutable(); + analysisResults_.add(m); + } else { + analysisResultsBuilder_.addMessage(m); + } + break; + } // case 18 + case 24: + { + fullyExplored_ = input.readBool(); + + break; + } // case 24 + case 42: + { + com.google.cloud.asset.v1.IamPolicyAnalysisState m = + input.readMessage( + com.google.cloud.asset.v1.IamPolicyAnalysisState.parser(), + extensionRegistry); + if (nonCriticalErrorsBuilder_ == null) { + ensureNonCriticalErrorsIsMutable(); + nonCriticalErrors_.add(m); + } else { + nonCriticalErrorsBuilder_.addMessage(m); + } + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2215,7 +2084,19 @@ public IamPolicyAnalysis parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new IamPolicyAnalysis(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(); } }; @@ -2426,7 +2307,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (fullyExplored_ != false) { output.writeBool(3, fullyExplored_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2446,7 +2327,7 @@ public int getSerializedSize() { if (fullyExplored_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, fullyExplored_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2469,7 +2350,7 @@ public boolean equals(final java.lang.Object obj) { if (!getServiceAccountImpersonationAnalysisList() .equals(other.getServiceAccountImpersonationAnalysisList())) return false; if (getFullyExplored() != other.getFullyExplored()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2490,7 +2371,7 @@ public int hashCode() { } hash = (37 * hash) + FULLY_EXPLORED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFullyExplored()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2620,19 +2501,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.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) { - getServiceAccountImpersonationAnalysisFieldBuilder(); - } } @java.lang.Override @@ -2646,10 +2518,11 @@ public Builder clear() { } if (serviceAccountImpersonationAnalysisBuilder_ == null) { serviceAccountImpersonationAnalysis_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + serviceAccountImpersonationAnalysis_ = null; serviceAccountImpersonationAnalysisBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); fullyExplored_ = false; return this; @@ -2781,7 +2654,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.AnalyzeIamPolicyResponse othe if (other.getFullyExplored() != false) { setFullyExplored(other.getFullyExplored()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2796,18 +2669,58 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse 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: + { + input.readMessage(getMainAnalysisFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis m = + input.readMessage( + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + .parser(), + extensionRegistry); + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + ensureServiceAccountImpersonationAnalysisIsMutable(); + serviceAccountImpersonationAnalysis_.add(m); + } else { + serviceAccountImpersonationAnalysisBuilder_.addMessage(m); + } + break; + } // case 18 + case 24: + { + fullyExplored_ = input.readBool(); + + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1.AnalyzeIamPolicyResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3564,7 +3477,18 @@ public AnalyzeIamPolicyResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AnalyzeIamPolicyResponse(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveRequest.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveRequest.java index 19aa2c4bd..ea3940ed5 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveRequest.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AnalyzeMoveRequest( - 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(); - - resource_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - destinationParent_ = s; - break; - } - case 24: - { - int rawValue = input.readEnum(); - - view_ = rawValue; - 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.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_AnalyzeMoveRequest_descriptor; @@ -469,7 +409,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(3, view_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -489,7 +429,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, view_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -508,7 +448,7 @@ public boolean equals(final java.lang.Object obj) { if (!getResource().equals(other.getResource())) return false; if (!getDestinationParent().equals(other.getDestinationParent())) return false; if (view_ != other.view_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -525,7 +465,7 @@ public int hashCode() { hash = (53 * hash) + getDestinationParent().hashCode(); hash = (37 * hash) + VIEW_FIELD_NUMBER; hash = (53 * hash) + view_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -654,17 +594,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.AnalyzeMoveRequest.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 @@ -766,7 +699,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.AnalyzeMoveRequest other) { if (other.view_ != 0) { setViewValue(other.getViewValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -781,17 +714,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.AnalyzeMoveRequest 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: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + destinationParent_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + view_ = input.readEnum(); + + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.AnalyzeMoveRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1172,7 +1137,18 @@ public AnalyzeMoveRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AnalyzeMoveRequest(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveResponse.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveResponse.java index 5c684bd6a..4a0685f15 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveResponse.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveResponse.java @@ -52,60 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AnalyzeMoveResponse( - 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)) { - moveAnalysis_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - moveAnalysis_.add( - input.readMessage( - com.google.cloud.asset.v1.MoveAnalysis.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)) { - moveAnalysis_ = java.util.Collections.unmodifiableList(moveAnalysis_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_AnalyzeMoveResponse_descriptor; @@ -212,7 +158,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < moveAnalysis_.size(); i++) { output.writeMessage(1, moveAnalysis_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -224,7 +170,7 @@ public int getSerializedSize() { for (int i = 0; i < moveAnalysis_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, moveAnalysis_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -241,7 +187,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.asset.v1.AnalyzeMoveResponse) obj; if (!getMoveAnalysisList().equals(other.getMoveAnalysisList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -256,7 +202,7 @@ public int hashCode() { hash = (37 * hash) + MOVE_ANALYSIS_FIELD_NUMBER; hash = (53 * hash) + getMoveAnalysisList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -385,19 +331,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.AnalyzeMoveResponse.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) { - getMoveAnalysisFieldBuilder(); - } } @java.lang.Override @@ -405,10 +342,11 @@ public Builder clear() { super.clear(); if (moveAnalysisBuilder_ == null) { moveAnalysis_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + moveAnalysis_ = null; moveAnalysisBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -522,7 +460,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.AnalyzeMoveResponse other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -537,17 +475,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.AnalyzeMoveResponse 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.cloud.asset.v1.MoveAnalysis m = + input.readMessage( + com.google.cloud.asset.v1.MoveAnalysis.parser(), extensionRegistry); + if (moveAnalysisBuilder_ == null) { + ensureMoveAnalysisIsMutable(); + moveAnalysis_.add(m); + } else { + moveAnalysisBuilder_.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.cloud.asset.v1.AnalyzeMoveResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -953,7 +918,18 @@ public AnalyzeMoveResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AnalyzeMoveResponse(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Asset.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Asset.java index d7f1dcf9c..a9d87f9f9 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Asset.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Asset.java @@ -63,244 +63,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Asset( - 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(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - assetType_ = s; - break; - } - case 26: - { - com.google.cloud.asset.v1.Resource.Builder subBuilder = null; - if (resource_ != null) { - subBuilder = resource_.toBuilder(); - } - resource_ = - input.readMessage(com.google.cloud.asset.v1.Resource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(resource_); - resource_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - com.google.iam.v1.Policy.Builder subBuilder = null; - if (iamPolicy_ != null) { - subBuilder = iamPolicy_.toBuilder(); - } - iamPolicy_ = input.readMessage(com.google.iam.v1.Policy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(iamPolicy_); - iamPolicy_ = subBuilder.buildPartial(); - } - - break; - } - case 50: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - orgPolicy_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - orgPolicy_.add( - input.readMessage( - com.google.cloud.orgpolicy.v1.Policy.parser(), extensionRegistry)); - break; - } - case 58: - { - com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder subBuilder = null; - if (accessContextPolicyCase_ == 7) { - subBuilder = - ((com.google.identity.accesscontextmanager.v1.AccessPolicy) - accessContextPolicy_) - .toBuilder(); - } - accessContextPolicy_ = - input.readMessage( - com.google.identity.accesscontextmanager.v1.AccessPolicy.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.identity.accesscontextmanager.v1.AccessPolicy) - accessContextPolicy_); - accessContextPolicy_ = subBuilder.buildPartial(); - } - accessContextPolicyCase_ = 7; - break; - } - case 66: - { - com.google.identity.accesscontextmanager.v1.AccessLevel.Builder subBuilder = null; - if (accessContextPolicyCase_ == 8) { - subBuilder = - ((com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_) - .toBuilder(); - } - accessContextPolicy_ = - input.readMessage( - com.google.identity.accesscontextmanager.v1.AccessLevel.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_); - accessContextPolicy_ = subBuilder.buildPartial(); - } - accessContextPolicyCase_ = 8; - break; - } - case 74: - { - com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder subBuilder = - null; - if (accessContextPolicyCase_ == 9) { - subBuilder = - ((com.google.identity.accesscontextmanager.v1.ServicePerimeter) - accessContextPolicy_) - .toBuilder(); - } - accessContextPolicy_ = - input.readMessage( - com.google.identity.accesscontextmanager.v1.ServicePerimeter.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.identity.accesscontextmanager.v1.ServicePerimeter) - accessContextPolicy_); - accessContextPolicy_ = subBuilder.buildPartial(); - } - accessContextPolicyCase_ = 9; - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - ancestors_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - ancestors_.add(s); - break; - } - case 90: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 98: - { - com.google.cloud.osconfig.v1.Inventory.Builder subBuilder = null; - if (osInventory_ != null) { - subBuilder = osInventory_.toBuilder(); - } - osInventory_ = - input.readMessage( - com.google.cloud.osconfig.v1.Inventory.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(osInventory_); - osInventory_ = subBuilder.buildPartial(); - } - - break; - } - case 106: - { - com.google.cloud.asset.v1.RelatedAssets.Builder subBuilder = null; - if (relatedAssets_ != null) { - subBuilder = relatedAssets_.toBuilder(); - } - relatedAssets_ = - input.readMessage( - com.google.cloud.asset.v1.RelatedAssets.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(relatedAssets_); - relatedAssets_ = subBuilder.buildPartial(); - } - - break; - } - case 122: - { - com.google.cloud.asset.v1.RelatedAsset.Builder subBuilder = null; - if (relatedAsset_ != null) { - subBuilder = relatedAsset_.toBuilder(); - } - relatedAsset_ = - input.readMessage( - com.google.cloud.asset.v1.RelatedAsset.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(relatedAsset_); - relatedAsset_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - orgPolicy_ = java.util.Collections.unmodifiableList(orgPolicy_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - ancestors_ = ancestors_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetProto .internal_static_google_cloud_asset_v1_Asset_descriptor; @@ -1201,7 +963,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (relatedAsset_ != null) { output.writeMessage(15, getRelatedAsset()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1261,7 +1023,7 @@ public int getSerializedSize() { if (relatedAsset_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getRelatedAsset()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1318,7 +1080,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1381,7 +1143,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1516,19 +1278,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.Asset.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) { - getOrgPolicyFieldBuilder(); - } } @java.lang.Override @@ -1558,10 +1311,20 @@ public Builder clear() { } if (orgPolicyBuilder_ == null) { orgPolicy_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + orgPolicy_ = null; orgPolicyBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); + if (accessPolicyBuilder_ != null) { + accessPolicyBuilder_.clear(); + } + if (accessLevelBuilder_ != null) { + accessLevelBuilder_.clear(); + } + if (servicePerimeterBuilder_ != null) { + servicePerimeterBuilder_.clear(); + } if (osInventoryBuilder_ == null) { osInventory_ = null; } else { @@ -1812,7 +1575,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.Asset other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1827,17 +1590,118 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.Asset 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: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + assetType_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + input.readMessage(getIamPolicyFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 50: + { + com.google.cloud.orgpolicy.v1.Policy m = + input.readMessage( + com.google.cloud.orgpolicy.v1.Policy.parser(), extensionRegistry); + if (orgPolicyBuilder_ == null) { + ensureOrgPolicyIsMutable(); + orgPolicy_.add(m); + } else { + orgPolicyBuilder_.addMessage(m); + } + break; + } // case 50 + case 58: + { + input.readMessage(getAccessPolicyFieldBuilder().getBuilder(), extensionRegistry); + accessContextPolicyCase_ = 7; + break; + } // case 58 + case 66: + { + input.readMessage(getAccessLevelFieldBuilder().getBuilder(), extensionRegistry); + accessContextPolicyCase_ = 8; + break; + } // case 66 + case 74: + { + input.readMessage( + getServicePerimeterFieldBuilder().getBuilder(), extensionRegistry); + accessContextPolicyCase_ = 9; + break; + } // case 74 + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAncestorsIsMutable(); + ancestors_.add(s); + break; + } // case 82 + case 90: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 90 + case 98: + { + input.readMessage(getOsInventoryFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 98 + case 106: + { + input.readMessage(getRelatedAssetsFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 106 + case 122: + { + input.readMessage(getRelatedAssetFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 122 + default: + { + 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.cloud.asset.v1.Asset) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4687,7 +4551,18 @@ public Asset parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Asset(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AttachedResource.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AttachedResource.java index 35e4ee101..59d205474 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AttachedResource.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AttachedResource.java @@ -54,68 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AttachedResource( - 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(); - - assetType_ = s; - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - versionedResources_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - versionedResources_.add( - input.readMessage( - com.google.cloud.asset.v1.VersionedResource.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)) { - versionedResources_ = java.util.Collections.unmodifiableList(versionedResources_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetProto .internal_static_google_cloud_asset_v1_AttachedResource_descriptor; @@ -288,7 +226,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < versionedResources_.size(); i++) { output.writeMessage(3, versionedResources_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -304,7 +242,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, versionedResources_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -322,7 +260,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAssetType().equals(other.getAssetType())) return false; if (!getVersionedResourcesList().equals(other.getVersionedResourcesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -339,7 +277,7 @@ public int hashCode() { hash = (37 * hash) + VERSIONED_RESOURCES_FIELD_NUMBER; hash = (53 * hash) + getVersionedResourcesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -469,19 +407,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.AttachedResource.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) { - getVersionedResourcesFieldBuilder(); - } } @java.lang.Override @@ -491,10 +420,11 @@ public Builder clear() { if (versionedResourcesBuilder_ == null) { versionedResources_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + versionedResources_ = null; versionedResourcesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -613,7 +543,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.AttachedResource other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -628,17 +558,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.AttachedResource 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: + { + assetType_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 26: + { + com.google.cloud.asset.v1.VersionedResource m = + input.readMessage( + com.google.cloud.asset.v1.VersionedResource.parser(), extensionRegistry); + if (versionedResourcesBuilder_ == null) { + ensureVersionedResourcesIsMutable(); + versionedResources_.add(m); + } else { + versionedResourcesBuilder_.addMessage(m); + } + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.AttachedResource) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1198,7 +1161,18 @@ public AttachedResource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AttachedResource(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequest.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequest.java index 6ea0ce8d5..3d8acb44b 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequest.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequest.java @@ -55,102 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BatchGetAssetsHistoryRequest( - 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(); - - parent_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - assetNames_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assetNames_.add(s); - break; - } - case 24: - { - int rawValue = input.readEnum(); - - contentType_ = rawValue; - break; - } - case 34: - { - com.google.cloud.asset.v1.TimeWindow.Builder subBuilder = null; - if (readTimeWindow_ != null) { - subBuilder = readTimeWindow_.toBuilder(); - } - readTimeWindow_ = - input.readMessage( - com.google.cloud.asset.v1.TimeWindow.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(readTimeWindow_); - readTimeWindow_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - relationshipTypes_.add(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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - assetNames_ = assetNames_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - relationshipTypes_ = relationshipTypes_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryRequest_descriptor; @@ -564,7 +468,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < relationshipTypes_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, relationshipTypes_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -599,7 +503,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getRelationshipTypesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -623,7 +527,7 @@ public boolean equals(final java.lang.Object obj) { if (!getReadTimeWindow().equals(other.getReadTimeWindow())) return false; } if (!getRelationshipTypesList().equals(other.getRelationshipTypesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -650,7 +554,7 @@ public int hashCode() { hash = (37 * hash) + RELATIONSHIP_TYPES_FIELD_NUMBER; hash = (53 * hash) + getRelationshipTypesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -780,17 +684,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest.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 @@ -935,7 +832,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -950,18 +847,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest 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: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAssetNamesIsMutable(); + assetNames_.add(s); + break; + } // case 18 + case 24: + { + contentType_ = input.readEnum(); + + break; + } // case 24 + case 34: + { + input.readMessage(getReadTimeWindowFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRelationshipTypesIsMutable(); + relationshipTypes_.add(s); + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1999,7 +1941,18 @@ public BatchGetAssetsHistoryRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchGetAssetsHistoryRequest(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryResponse.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryResponse.java index eae14325c..3b12b5200 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryResponse.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryResponse.java @@ -52,60 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BatchGetAssetsHistoryResponse( - 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)) { - assets_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assets_.add( - input.readMessage( - com.google.cloud.asset.v1.TemporalAsset.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)) { - assets_ = java.util.Collections.unmodifiableList(assets_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryResponse_descriptor; @@ -207,7 +153,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < assets_.size(); i++) { output.writeMessage(1, assets_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -219,7 +165,7 @@ public int getSerializedSize() { for (int i = 0; i < assets_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, assets_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -236,7 +182,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse) obj; if (!getAssetsList().equals(other.getAssetsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -251,7 +197,7 @@ public int hashCode() { hash = (37 * hash) + ASSETS_FIELD_NUMBER; hash = (53 * hash) + getAssetsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -381,19 +327,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse.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) { - getAssetsFieldBuilder(); - } } @java.lang.Override @@ -401,10 +338,11 @@ public Builder clear() { super.clear(); if (assetsBuilder_ == null) { assets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + assets_ = null; assetsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -519,7 +457,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -534,18 +472,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse 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.cloud.asset.v1.TemporalAsset m = + input.readMessage( + com.google.cloud.asset.v1.TemporalAsset.parser(), extensionRegistry); + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.add(m); + } else { + assetsBuilder_.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.cloud.asset.v1.BatchGetAssetsHistoryResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -931,7 +895,18 @@ public BatchGetAssetsHistoryResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchGetAssetsHistoryResponse(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesRequest.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesRequest.java index 13901f543..a32e9f06c 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesRequest.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesRequest.java @@ -56,66 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BatchGetEffectiveIamPoliciesRequest( - 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(); - - scope_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - names_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - names_.add(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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - names_ = names_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesRequest_descriptor; @@ -303,7 +243,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < names_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, names_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -323,7 +263,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getNamesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -341,7 +281,7 @@ public boolean equals(final java.lang.Object obj) { if (!getScope().equals(other.getScope())) return false; if (!getNamesList().equals(other.getNamesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -358,7 +298,7 @@ public int hashCode() { hash = (37 * hash) + NAMES_FIELD_NUMBER; hash = (53 * hash) + getNamesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -489,17 +429,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.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 @@ -609,7 +542,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesR } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -624,19 +557,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest 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: + { + scope_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureNamesIsMutable(); + names_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1048,7 +1006,18 @@ public BatchGetEffectiveIamPoliciesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchGetEffectiveIamPoliciesRequest(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesResponse.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesResponse.java index a0e086b23..d42e88741 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesResponse.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesResponse.java @@ -55,65 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BatchGetEffectiveIamPoliciesResponse( - 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 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - policyResults_ = - new java.util.ArrayList< - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse - .EffectiveIamPolicy>(); - mutable_bitField0_ |= 0x00000001; - } - policyResults_.add( - input.readMessage( - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse - .EffectiveIamPolicy.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)) { - policyResults_ = java.util.Collections.unmodifiableList(policyResults_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_descriptor; @@ -363,72 +304,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private EffectiveIamPolicy( - 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(); - - fullResourceName_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - policies_ = - new java.util.ArrayList< - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse - .EffectiveIamPolicy.PolicyInfo>(); - mutable_bitField0_ |= 0x00000001; - } - policies_.add( - input.readMessage( - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse - .EffectiveIamPolicy.PolicyInfo.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)) { - policies_ = java.util.Collections.unmodifiableList(policies_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_descriptor; @@ -553,67 +428,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PolicyInfo( - 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(); - - attachedResource_ = s; - break; - } - case 18: - { - com.google.iam.v1.Policy.Builder subBuilder = null; - if (policy_ != null) { - subBuilder = policy_.toBuilder(); - } - policy_ = input.readMessage(com.google.iam.v1.Policy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(policy_); - policy_ = 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 com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo_descriptor; @@ -753,7 +567,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (policy_ != null) { output.writeMessage(2, getPolicy()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -768,7 +582,7 @@ public int getSerializedSize() { if (policy_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPolicy()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -795,7 +609,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPolicy()) { if (!getPolicy().equals(other.getPolicy())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -812,7 +626,7 @@ public int hashCode() { hash = (37 * hash) + POLICY_FIELD_NUMBER; hash = (53 * hash) + getPolicy().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -971,17 +785,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.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 @@ -1109,7 +916,7 @@ public Builder mergeFrom( if (other.hasPolicy()) { mergePolicy(other.getPolicy()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1124,22 +931,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy - .PolicyInfo - 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: + { + attachedResource_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getPolicyFieldBuilder().getBuilder(), extensionRegistry); + + 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.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy - .PolicyInfo) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1486,7 +1314,19 @@ public PolicyInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PolicyInfo(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(); } }; @@ -1765,7 +1605,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < policies_.size(); i++) { output.writeMessage(2, policies_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1780,7 +1620,7 @@ public int getSerializedSize() { for (int i = 0; i < policies_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, policies_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1800,7 +1640,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFullResourceName().equals(other.getFullResourceName())) return false; if (!getPoliciesList().equals(other.getPoliciesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1817,7 +1657,7 @@ public int hashCode() { hash = (37 * hash) + POLICIES_FIELD_NUMBER; hash = (53 * hash) + getPoliciesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1960,19 +1800,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.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) { - getPoliciesFieldBuilder(); - } } @java.lang.Override @@ -1982,10 +1813,11 @@ public Builder clear() { if (policiesBuilder_ == null) { policies_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + policies_ = null; policiesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -2119,7 +1951,7 @@ public Builder mergeFrom( } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2134,20 +1966,54 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy - 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: + { + fullResourceName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy + .PolicyInfo + m = + input.readMessage( + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse + .EffectiveIamPolicy.PolicyInfo.parser(), + extensionRegistry); + if (policiesBuilder_ == null) { + ensurePoliciesIsMutable(); + policies_.add(m); + } else { + policiesBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3078,7 +2944,19 @@ public EffectiveIamPolicy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new EffectiveIamPolicy(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(); } }; @@ -3228,7 +3106,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < policyResults_.size(); i++) { output.writeMessage(2, policyResults_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3240,7 +3118,7 @@ public int getSerializedSize() { for (int i = 0; i < policyResults_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, policyResults_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3257,7 +3135,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse) obj; if (!getPolicyResultsList().equals(other.getPolicyResultsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3272,7 +3150,7 @@ public int hashCode() { hash = (37 * hash) + POLICY_RESULTS_FIELD_NUMBER; hash = (53 * hash) + getPolicyResultsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3403,19 +3281,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.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) { - getPolicyResultsFieldBuilder(); - } } @java.lang.Override @@ -3423,10 +3292,11 @@ public Builder clear() { super.clear(); if (policyResultsBuilder_ == null) { policyResults_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + policyResults_ = null; policyResultsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -3543,7 +3413,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesR } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3558,19 +3428,47 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse 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 18: + { + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy + m = + input.readMessage( + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse + .EffectiveIamPolicy.parser(), + extensionRegistry); + if (policyResultsBuilder_ == null) { + ensurePolicyResultsIsMutable(); + policyResults_.add(m); + } else { + policyResultsBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4131,7 +4029,18 @@ public BatchGetEffectiveIamPoliciesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchGetEffectiveIamPoliciesResponse(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BigQueryDestination.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BigQueryDestination.java index d3db2835d..2e4697a0b 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BigQueryDestination.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BigQueryDestination.java @@ -53,85 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BigQueryDestination( - 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(); - - dataset_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - table_ = s; - break; - } - case 24: - { - force_ = input.readBool(); - break; - } - case 34: - { - com.google.cloud.asset.v1.PartitionSpec.Builder subBuilder = null; - if (partitionSpec_ != null) { - subBuilder = partitionSpec_.toBuilder(); - } - partitionSpec_ = - input.readMessage( - com.google.cloud.asset.v1.PartitionSpec.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(partitionSpec_); - partitionSpec_ = subBuilder.buildPartial(); - } - - break; - } - case 40: - { - separateTablesPerAssetType_ = 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 com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_BigQueryDestination_descriptor; @@ -444,7 +365,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (separateTablesPerAssetType_ != false) { output.writeBool(5, separateTablesPerAssetType_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -468,7 +389,7 @@ public int getSerializedSize() { if (separateTablesPerAssetType_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, separateTablesPerAssetType_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -492,7 +413,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPartitionSpec().equals(other.getPartitionSpec())) return false; } if (getSeparateTablesPerAssetType() != other.getSeparateTablesPerAssetType()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -515,7 +436,7 @@ public int hashCode() { } hash = (37 * hash) + SEPARATE_TABLES_PER_ASSET_TYPE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSeparateTablesPerAssetType()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -644,17 +565,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.BigQueryDestination.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 @@ -776,7 +690,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.BigQueryDestination other) { if (other.getSeparateTablesPerAssetType() != false) { setSeparateTablesPerAssetType(other.getSeparateTablesPerAssetType()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -791,17 +705,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.BigQueryDestination 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: + { + dataset_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + table_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + force_ = input.readBool(); + + break; + } // case 24 + case 34: + { + input.readMessage(getPartitionSpecFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 40: + { + separateTablesPerAssetType_ = input.readBool(); + + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.BigQueryDestination) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1588,7 +1546,18 @@ public BigQueryDestination parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BigQueryDestination(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ConditionEvaluation.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ConditionEvaluation.java index 2d821fe3f..efe984177 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ConditionEvaluation.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ConditionEvaluation.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ConditionEvaluation( - 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: - { - int rawValue = input.readEnum(); - - evaluationValue_ = rawValue; - 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.cloud.asset.v1.AssetProto .internal_static_google_cloud_asset_v1_ConditionEvaluation_descriptor; @@ -356,7 +310,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(1, evaluationValue_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -371,7 +325,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, evaluationValue_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -388,7 +342,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.asset.v1.ConditionEvaluation) obj; if (evaluationValue_ != other.evaluationValue_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -401,7 +355,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + EVALUATION_VALUE_FIELD_NUMBER; hash = (53 * hash) + evaluationValue_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -530,17 +484,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.ConditionEvaluation.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 @@ -628,7 +575,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.ConditionEvaluation other) { if (other.evaluationValue_ != 0) { setEvaluationValueValue(other.getEvaluationValueValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -643,17 +590,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.ConditionEvaluation 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 8: + { + evaluationValue_ = input.readEnum(); + + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.ConditionEvaluation) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -783,7 +750,18 @@ public ConditionEvaluation parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ConditionEvaluation(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateFeedRequest.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateFeedRequest.java index f05fab727..60b1d7f9c 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateFeedRequest.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateFeedRequest.java @@ -53,73 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateFeedRequest( - 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(); - - feedId_ = s; - break; - } - case 26: - { - com.google.cloud.asset.v1.Feed.Builder subBuilder = null; - if (feed_ != null) { - subBuilder = feed_.toBuilder(); - } - feed_ = input.readMessage(com.google.cloud.asset.v1.Feed.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(feed_); - feed_ = 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 com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_CreateFeedRequest_descriptor; @@ -321,7 +254,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (feed_ != null) { output.writeMessage(3, getFeed()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -339,7 +272,7 @@ public int getSerializedSize() { if (feed_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getFeed()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -361,7 +294,7 @@ public boolean equals(final java.lang.Object obj) { if (hasFeed()) { if (!getFeed().equals(other.getFeed())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -380,7 +313,7 @@ public int hashCode() { hash = (37 * hash) + FEED_FIELD_NUMBER; hash = (53 * hash) + getFeed().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -509,17 +442,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.CreateFeedRequest.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 @@ -629,7 +555,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.CreateFeedRequest other) { if (other.hasFeed()) { mergeFeed(other.getFeed()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -644,17 +570,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.CreateFeedRequest 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: + { + feedId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getFeedFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.CreateFeedRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1132,7 +1090,18 @@ public CreateFeedRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateFeedRequest(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateSavedQueryRequest.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateSavedQueryRequest.java index 7bb028864..fdf201d63 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateSavedQueryRequest.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateSavedQueryRequest.java @@ -53,75 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateSavedQueryRequest( - 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: - { - com.google.cloud.asset.v1.SavedQuery.Builder subBuilder = null; - if (savedQuery_ != null) { - subBuilder = savedQuery_.toBuilder(); - } - savedQuery_ = - input.readMessage( - com.google.cloud.asset.v1.SavedQuery.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(savedQuery_); - savedQuery_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - savedQueryId_ = 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.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_CreateSavedQueryRequest_descriptor; @@ -339,7 +270,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(savedQueryId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, savedQueryId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -357,7 +288,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(savedQueryId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, savedQueryId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -379,7 +310,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSavedQuery().equals(other.getSavedQuery())) return false; } if (!getSavedQueryId().equals(other.getSavedQueryId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -398,7 +329,7 @@ public int hashCode() { } hash = (37 * hash) + SAVED_QUERY_ID_FIELD_NUMBER; hash = (53 * hash) + getSavedQueryId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -527,17 +458,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.CreateSavedQueryRequest.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 @@ -648,7 +572,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.CreateSavedQueryRequest other savedQueryId_ = other.savedQueryId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -663,18 +587,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.CreateSavedQueryRequest 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: + { + input.readMessage(getSavedQueryFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + savedQueryId_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1.CreateSavedQueryRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1194,7 +1149,18 @@ public CreateSavedQueryRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateSavedQueryRequest(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteFeedRequest.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteFeedRequest.java index e8556cb77..8383be811 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteFeedRequest.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteFeedRequest.java @@ -44,52 +44,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteFeedRequest( - 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(); - - name_ = 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.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_DeleteFeedRequest_descriptor; @@ -181,7 +135,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -193,7 +147,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -210,7 +164,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.asset.v1.DeleteFeedRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -223,7 +177,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -344,17 +298,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.DeleteFeedRequest.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 @@ -443,7 +390,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.DeleteFeedRequest other) { name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -458,17 +405,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.DeleteFeedRequest 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: + { + name_ = input.readStringRequireUtf8(); + + 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.cloud.asset.v1.DeleteFeedRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -635,7 +602,18 @@ public DeleteFeedRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteFeedRequest(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteSavedQueryRequest.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteSavedQueryRequest.java index 87acf06bf..d67729d6f 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteSavedQueryRequest.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteSavedQueryRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteSavedQueryRequest( - 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(); - - name_ = 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.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_DeleteSavedQueryRequest_descriptor; @@ -191,7 +145,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -203,7 +157,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -220,7 +174,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.asset.v1.DeleteSavedQueryRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -233,7 +187,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -362,17 +316,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.DeleteSavedQueryRequest.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 @@ -462,7 +409,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.DeleteSavedQueryRequest other name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -477,18 +424,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.DeleteSavedQueryRequest 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: + { + name_ = input.readStringRequireUtf8(); + + 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.cloud.asset.v1.DeleteSavedQueryRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -660,7 +626,18 @@ public DeleteSavedQueryRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteSavedQueryRequest(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequest.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequest.java index 5d34a1eb0..9d948a1d0 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequest.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequest.java @@ -55,117 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ExportAssetsRequest( - 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(); - - parent_ = s; - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (readTime_ != null) { - subBuilder = readTime_.toBuilder(); - } - readTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(readTime_); - readTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - assetTypes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assetTypes_.add(s); - break; - } - case 32: - { - int rawValue = input.readEnum(); - - contentType_ = rawValue; - break; - } - case 42: - { - com.google.cloud.asset.v1.OutputConfig.Builder subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = - input.readMessage( - com.google.cloud.asset.v1.OutputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputConfig_); - outputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - relationshipTypes_.add(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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - assetTypes_ = assetTypes_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - relationshipTypes_ = relationshipTypes_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_ExportAssetsRequest_descriptor; @@ -656,7 +545,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < relationshipTypes_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, relationshipTypes_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -694,7 +583,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getRelationshipTypesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -722,7 +611,7 @@ public boolean equals(final java.lang.Object obj) { if (!getOutputConfig().equals(other.getOutputConfig())) return false; } if (!getRelationshipTypesList().equals(other.getRelationshipTypesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -753,7 +642,7 @@ public int hashCode() { hash = (37 * hash) + RELATIONSHIP_TYPES_FIELD_NUMBER; hash = (53 * hash) + getRelationshipTypesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -882,17 +771,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.ExportAssetsRequest.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 @@ -1050,7 +932,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.ExportAssetsRequest other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1065,17 +947,69 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.ExportAssetsRequest 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: + { + input.readMessage(getReadTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAssetTypesIsMutable(); + assetTypes_.add(s); + break; + } // case 26 + case 32: + { + contentType_ = input.readEnum(); + + break; + } // case 32 + case 42: + { + input.readMessage(getOutputConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRelationshipTypesIsMutable(); + relationshipTypes_.add(s); + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.ExportAssetsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2346,7 +2280,18 @@ public ExportAssetsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ExportAssetsRequest(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsResponse.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsResponse.java index 871329111..0e63e672d 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsResponse.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsResponse.java @@ -54,92 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ExportAssetsResponse( - 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: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (readTime_ != null) { - subBuilder = readTime_.toBuilder(); - } - readTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(readTime_); - readTime_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.cloud.asset.v1.OutputConfig.Builder subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = - input.readMessage( - com.google.cloud.asset.v1.OutputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputConfig_); - outputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.cloud.asset.v1.OutputResult.Builder subBuilder = null; - if (outputResult_ != null) { - subBuilder = outputResult_.toBuilder(); - } - outputResult_ = - input.readMessage( - com.google.cloud.asset.v1.OutputResult.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputResult_); - outputResult_ = 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 com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_ExportAssetsResponse_descriptor; @@ -332,7 +246,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (outputResult_ != null) { output.writeMessage(3, getOutputResult()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -350,7 +264,7 @@ public int getSerializedSize() { if (outputResult_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOutputResult()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -378,7 +292,7 @@ public boolean equals(final java.lang.Object obj) { if (hasOutputResult()) { if (!getOutputResult().equals(other.getOutputResult())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -401,7 +315,7 @@ public int hashCode() { hash = (37 * hash) + OUTPUT_RESULT_FIELD_NUMBER; hash = (53 * hash) + getOutputResult().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -534,17 +448,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.ExportAssetsResponse.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 @@ -668,7 +575,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.ExportAssetsResponse other) { if (other.hasOutputResult()) { mergeOutputResult(other.getOutputResult()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -683,17 +590,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.ExportAssetsResponse 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: + { + input.readMessage(getReadTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getOutputConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getOutputResultFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.ExportAssetsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1314,7 +1253,18 @@ public ExportAssetsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ExportAssetsResponse(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Feed.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Feed.java index 54f095768..e2b6ab5a8 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Feed.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Feed.java @@ -60,129 +60,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Feed( - 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(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - assetNames_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assetNames_.add(s); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - assetTypes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - assetTypes_.add(s); - break; - } - case 32: - { - int rawValue = input.readEnum(); - - contentType_ = rawValue; - break; - } - case 42: - { - com.google.cloud.asset.v1.FeedOutputConfig.Builder subBuilder = null; - if (feedOutputConfig_ != null) { - subBuilder = feedOutputConfig_.toBuilder(); - } - feedOutputConfig_ = - input.readMessage( - com.google.cloud.asset.v1.FeedOutputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(feedOutputConfig_); - feedOutputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 50: - { - com.google.type.Expr.Builder subBuilder = null; - if (condition_ != null) { - subBuilder = condition_.toBuilder(); - } - condition_ = input.readMessage(com.google.type.Expr.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(condition_); - condition_ = subBuilder.buildPartial(); - } - - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - relationshipTypes_.add(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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - assetNames_ = assetNames_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - assetTypes_ = assetTypes_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - relationshipTypes_ = relationshipTypes_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_Feed_descriptor; @@ -750,7 +627,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < relationshipTypes_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, relationshipTypes_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -796,7 +673,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getRelationshipTypesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -824,7 +701,7 @@ public boolean equals(final java.lang.Object obj) { if (!getCondition().equals(other.getCondition())) return false; } if (!getRelationshipTypesList().equals(other.getRelationshipTypesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -859,7 +736,7 @@ public int hashCode() { hash = (37 * hash) + RELATIONSHIP_TYPES_FIELD_NUMBER; hash = (53 * hash) + getRelationshipTypesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -990,17 +867,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.Feed.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 @@ -1174,7 +1044,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.Feed other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1189,17 +1059,77 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.Feed 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: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAssetNamesIsMutable(); + assetNames_.add(s); + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAssetTypesIsMutable(); + assetTypes_.add(s); + break; + } // case 26 + case 32: + { + contentType_ = input.readEnum(); + + break; + } // case 32 + case 42: + { + input.readMessage( + getFeedOutputConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 50: + { + input.readMessage(getConditionFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 50 + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRelationshipTypesIsMutable(); + relationshipTypes_.add(s); + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.Feed) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2677,7 +2607,18 @@ public Feed parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Feed(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOutputConfig.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOutputConfig.java index b117cbc08..e1964247c 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOutputConfig.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOutputConfig.java @@ -50,62 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FeedOutputConfig( - 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: - { - com.google.cloud.asset.v1.PubsubDestination.Builder subBuilder = null; - if (destinationCase_ == 1) { - subBuilder = - ((com.google.cloud.asset.v1.PubsubDestination) destination_).toBuilder(); - } - destination_ = - input.readMessage( - com.google.cloud.asset.v1.PubsubDestination.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.asset.v1.PubsubDestination) destination_); - destination_ = subBuilder.buildPartial(); - } - destinationCase_ = 1; - 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.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_FeedOutputConfig_descriptor; @@ -233,7 +177,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (destinationCase_ == 1) { output.writeMessage(1, (com.google.cloud.asset.v1.PubsubDestination) destination_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -247,7 +191,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 1, (com.google.cloud.asset.v1.PubsubDestination) destination_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -271,7 +215,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -290,7 +234,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -419,22 +363,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.FeedOutputConfig.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 public Builder clear() { super.clear(); + if (pubsubDestinationBuilder_ != null) { + pubsubDestinationBuilder_.clear(); + } destinationCase_ = 0; destination_ = null; return this; @@ -532,7 +472,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.FeedOutputConfig other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -547,17 +487,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.FeedOutputConfig 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: + { + input.readMessage( + getPubsubDestinationFieldBuilder().getBuilder(), extensionRegistry); + destinationCase_ = 1; + 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.cloud.asset.v1.FeedOutputConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -817,7 +778,18 @@ public FeedOutputConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FeedOutputConfig(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestination.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestination.java index 1dce75f52..8fd6eb12c 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestination.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestination.java @@ -50,59 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GcsDestination( - 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(); - objectUriCase_ = 1; - objectUri_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - objectUriCase_ = 2; - objectUri_ = 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.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_GcsDestination_descriptor; @@ -370,7 +317,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (objectUriCase_ == 2) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, objectUri_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -385,7 +332,7 @@ public int getSerializedSize() { if (objectUriCase_ == 2) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, objectUri_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -411,7 +358,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -434,7 +381,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -563,17 +510,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.GcsDestination.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 @@ -684,7 +624,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.GcsDestination other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -699,17 +639,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.GcsDestination 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: + { + java.lang.String s = input.readStringRequireUtf8(); + objectUriCase_ = 1; + objectUri_ = s; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + objectUriCase_ = 2; + objectUri_ = s; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.GcsDestination) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1117,7 +1085,18 @@ public GcsDestination parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GcsDestination(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsOutputResult.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsOutputResult.java index 0aa88585c..9090ccbed 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsOutputResult.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsOutputResult.java @@ -52,59 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GcsOutputResult( - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - uris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - uris_.add(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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - uris_ = uris_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_GcsOutputResult_descriptor; @@ -202,7 +149,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < uris_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uris_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -219,7 +166,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getUrisList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -236,7 +183,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.asset.v1.GcsOutputResult) obj; if (!getUrisList().equals(other.getUrisList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -251,7 +198,7 @@ public int hashCode() { hash = (37 * hash) + URIS_FIELD_NUMBER; hash = (53 * hash) + getUrisList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -380,17 +327,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.GcsOutputResult.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 @@ -490,7 +430,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.GcsOutputResult other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -505,17 +445,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.GcsOutputResult 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: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUrisIsMutable(); + uris_.add(s); + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.GcsOutputResult) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -730,7 +691,18 @@ public GcsOutputResult parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GcsOutputResult(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetFeedRequest.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetFeedRequest.java index c99beadb0..b5428fcb0 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetFeedRequest.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetFeedRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetFeedRequest( - 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(); - - name_ = 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.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_GetFeedRequest_descriptor; @@ -189,7 +143,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -201,7 +155,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -217,7 +171,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.asset.v1.GetFeedRequest other = (com.google.cloud.asset.v1.GetFeedRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -230,7 +184,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -359,17 +313,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.GetFeedRequest.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 @@ -458,7 +405,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.GetFeedRequest other) { name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -473,17 +420,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.GetFeedRequest 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: + { + name_ = input.readStringRequireUtf8(); + + 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.cloud.asset.v1.GetFeedRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -650,7 +617,18 @@ public GetFeedRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetFeedRequest(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetSavedQueryRequest.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetSavedQueryRequest.java index 98ae2dbb9..049c25491 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetSavedQueryRequest.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetSavedQueryRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetSavedQueryRequest( - 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(); - - name_ = 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.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_GetSavedQueryRequest_descriptor; @@ -189,7 +143,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -201,7 +155,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -218,7 +172,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.asset.v1.GetSavedQueryRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -231,7 +185,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -360,17 +314,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.GetSavedQueryRequest.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 @@ -459,7 +406,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.GetSavedQueryRequest other) { name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -474,17 +421,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.GetSavedQueryRequest 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: + { + name_ = input.readStringRequireUtf8(); + + 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.cloud.asset.v1.GetSavedQueryRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -651,7 +618,18 @@ public GetSavedQueryRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetSavedQueryRequest(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfig.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfig.java index a222d55a9..7a91001c4 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfig.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfig.java @@ -50,93 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private IamPolicyAnalysisOutputConfig( - 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: - { - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.Builder - subBuilder = null; - if (destinationCase_ == 1) { - subBuilder = - ((com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) - destination_) - .toBuilder(); - } - destination_ = - input.readMessage( - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) - destination_); - destination_ = subBuilder.buildPartial(); - } - destinationCase_ = 1; - break; - } - case 18: - { - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.Builder - subBuilder = null; - if (destinationCase_ == 2) { - subBuilder = - ((com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) - destination_) - .toBuilder(); - } - destination_ = - input.readMessage( - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) - destination_); - destination_ = subBuilder.buildPartial(); - } - destinationCase_ = 2; - 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.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_descriptor; @@ -230,52 +143,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GcsDestination( - 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(); - - uri_ = 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.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_GcsDestination_descriptor; @@ -371,7 +238,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -383,7 +250,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -401,7 +268,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) obj; if (!getUri().equals(other.getUri())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -414,7 +281,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + URI_FIELD_NUMBER; hash = (53 * hash) + getUri().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -549,17 +416,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.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 @@ -658,7 +518,7 @@ public Builder mergeFrom( uri_ = other.uri_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -673,19 +533,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination 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: + { + uri_ = input.readStringRequireUtf8(); + + 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.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -866,7 +744,19 @@ public GcsDestination parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GcsDestination(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(); } }; @@ -1073,73 +963,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BigQueryDestination( - 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(); - - dataset_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - tablePrefix_ = s; - break; - } - case 24: - { - int rawValue = input.readEnum(); - - partitionKey_ = rawValue; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - writeDisposition_ = 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.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_BigQueryDestination_descriptor; @@ -1566,7 +1389,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(writeDisposition_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, writeDisposition_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1590,7 +1413,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(writeDisposition_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, writeDisposition_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1611,7 +1434,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTablePrefix().equals(other.getTablePrefix())) return false; if (partitionKey_ != other.partitionKey_) return false; if (!getWriteDisposition().equals(other.getWriteDisposition())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1630,7 +1453,7 @@ public int hashCode() { hash = (53 * hash) + partitionKey_; hash = (37 * hash) + WRITE_DISPOSITION_FIELD_NUMBER; hash = (53 * hash) + getWriteDisposition().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1770,17 +1593,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.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 @@ -1901,7 +1717,7 @@ public Builder mergeFrom( writeDisposition_ = other.writeDisposition_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1916,20 +1732,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination 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: + { + dataset_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + tablePrefix_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + partitionKey_ = input.readEnum(); + + break; + } // case 24 + case 34: + { + writeDisposition_ = input.readStringRequireUtf8(); + + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2497,7 +2348,19 @@ public BigQueryDestination parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BigQueryDestination(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(); } }; @@ -2709,7 +2572,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) destination_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2732,7 +2595,7 @@ public int getSerializedSize() { (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) destination_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2759,7 +2622,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2782,7 +2645,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2912,22 +2775,21 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.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 public Builder clear() { super.clear(); + if (gcsDestinationBuilder_ != null) { + gcsDestinationBuilder_.clear(); + } + if (bigqueryDestinationBuilder_ != null) { + bigqueryDestinationBuilder_.clear(); + } destinationCase_ = 0; destination_ = null; return this; @@ -3038,7 +2900,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3053,18 +2915,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig 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: + { + input.readMessage(getGcsDestinationFieldBuilder().getBuilder(), extensionRegistry); + destinationCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + getBigqueryDestinationFieldBuilder().getBuilder(), extensionRegistry); + destinationCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3606,7 +3494,18 @@ public IamPolicyAnalysisOutputConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new IamPolicyAnalysisOutputConfig(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQuery.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQuery.java index 4e7987d6f..0eabc0064 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQuery.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQuery.java @@ -52,141 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private IamPolicyAnalysisQuery( - 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(); - - scope_ = s; - break; - } - case 18: - { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder subBuilder = - null; - if (resourceSelector_ != null) { - subBuilder = resourceSelector_.toBuilder(); - } - resourceSelector_ = - input.readMessage( - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(resourceSelector_); - resourceSelector_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder subBuilder = - null; - if (identitySelector_ != null) { - subBuilder = identitySelector_.toBuilder(); - } - identitySelector_ = - input.readMessage( - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(identitySelector_); - identitySelector_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder subBuilder = - null; - if (accessSelector_ != null) { - subBuilder = accessSelector_.toBuilder(); - } - accessSelector_ = - input.readMessage( - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(accessSelector_); - accessSelector_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder subBuilder = null; - if (options_ != null) { - subBuilder = options_.toBuilder(); - } - options_ = - input.readMessage( - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(options_); - options_ = subBuilder.buildPartial(); - } - - break; - } - case 50: - { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder subBuilder = - null; - if (conditionContext_ != null) { - subBuilder = conditionContext_.toBuilder(); - } - conditionContext_ = - input.readMessage( - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(conditionContext_); - conditionContext_ = 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 com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor; @@ -274,52 +139,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ResourceSelector( - 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(); - - fullResourceName_ = 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.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_descriptor; @@ -407,7 +226,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullResourceName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fullResourceName_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -419,7 +238,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullResourceName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fullResourceName_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -436,7 +255,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) obj; if (!getFullResourceName().equals(other.getFullResourceName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -449,7 +268,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + FULL_RESOURCE_NAME_FIELD_NUMBER; hash = (53 * hash) + getFullResourceName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -585,17 +404,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.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 @@ -692,7 +504,7 @@ public Builder mergeFrom( fullResourceName_ = other.fullResourceName_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -707,19 +519,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector 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: + { + fullResourceName_ = input.readStringRequireUtf8(); + + 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.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -879,7 +709,19 @@ public ResourceSelector parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ResourceSelector(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(); } }; @@ -983,52 +825,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private IdentitySelector( - 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(); - - identity_ = 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.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_descriptor; @@ -1128,7 +924,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(identity_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, identity_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1140,7 +936,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(identity_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, identity_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1157,7 +953,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) obj; if (!getIdentity().equals(other.getIdentity())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1170,7 +966,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + IDENTITY_FIELD_NUMBER; hash = (53 * hash) + getIdentity().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1306,17 +1102,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.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 @@ -1413,7 +1202,7 @@ public Builder mergeFrom( identity_ = other.identity_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1428,19 +1217,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector 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: + { + identity_ = input.readStringRequireUtf8(); + + 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.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1630,7 +1437,19 @@ public IdentitySelector parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new IdentitySelector(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(); } }; @@ -1796,72 +1615,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AccessSelector( - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - roles_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - roles_.add(s); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - permissions_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - permissions_.add(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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - roles_ = roles_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - permissions_ = permissions_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_descriptor; @@ -2019,7 +1772,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < permissions_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, permissions_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2044,7 +1797,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getPermissionsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2062,7 +1815,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRolesList().equals(other.getRolesList())) return false; if (!getPermissionsList().equals(other.getPermissionsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2081,7 +1834,7 @@ public int hashCode() { hash = (37 * hash) + PERMISSIONS_FIELD_NUMBER; hash = (53 * hash) + getPermissionsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2219,17 +1972,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.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 @@ -2352,7 +2098,7 @@ public Builder mergeFrom( } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2367,19 +2113,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector 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: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRolesIsMutable(); + roles_.add(s); + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePermissionsIsMutable(); + permissions_.add(s); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2756,7 +2528,19 @@ public AccessSelector parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AccessSelector(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(); } }; @@ -2958,75 +2742,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Options( - 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: - { - expandGroups_ = input.readBool(); - break; - } - case 16: - { - expandRoles_ = input.readBool(); - break; - } - case 24: - { - expandResources_ = input.readBool(); - break; - } - case 32: - { - outputResourceEdges_ = input.readBool(); - break; - } - case 40: - { - outputGroupEdges_ = input.readBool(); - break; - } - case 48: - { - analyzeServiceAccountImpersonation_ = 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 com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_descriptor; @@ -3249,7 +2964,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (analyzeServiceAccountImpersonation_ != false) { output.writeBool(6, analyzeServiceAccountImpersonation_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3278,7 +2993,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeBoolSize( 6, analyzeServiceAccountImpersonation_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3301,7 +3016,7 @@ public boolean equals(final java.lang.Object obj) { if (getOutputGroupEdges() != other.getOutputGroupEdges()) return false; if (getAnalyzeServiceAccountImpersonation() != other.getAnalyzeServiceAccountImpersonation()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3326,7 +3041,7 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAnalyzeServiceAccountImpersonation()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3458,17 +3173,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.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 @@ -3589,7 +3297,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Option if (other.getAnalyzeServiceAccountImpersonation() != false) { setAnalyzeServiceAccountImpersonation(other.getAnalyzeServiceAccountImpersonation()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3604,18 +3312,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options 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 8: + { + expandGroups_ = input.readBool(); + + break; + } // case 8 + case 16: + { + expandRoles_ = input.readBool(); + + break; + } // case 16 + case 24: + { + expandResources_ = input.readBool(); + + break; + } // case 24 + case 32: + { + outputResourceEdges_ = input.readBool(); + + break; + } // case 32 + case 40: + { + outputGroupEdges_ = input.readBool(); + + break; + } // case 40 + case 48: + { + analyzeServiceAccountImpersonation_ = input.readBool(); + + break; + } // case 48 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4165,7 +3922,19 @@ public Options parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Options(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(); } }; @@ -4265,60 +4034,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ConditionContext( - 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: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (timeContextCase_ == 1) { - subBuilder = ((com.google.protobuf.Timestamp) timeContext_).toBuilder(); - } - timeContext_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.protobuf.Timestamp) timeContext_); - timeContext_ = subBuilder.buildPartial(); - } - timeContextCase_ = 1; - 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.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_descriptor; @@ -4452,7 +4167,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (timeContextCase_ == 1) { output.writeMessage(1, (com.google.protobuf.Timestamp) timeContext_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -4466,7 +4181,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 1, (com.google.protobuf.Timestamp) timeContext_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4490,7 +4205,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4509,7 +4224,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4643,22 +4358,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.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 public Builder clear() { super.clear(); + if (accessTimeBuilder_ != null) { + accessTimeBuilder_.clear(); + } timeContextCase_ = 0; timeContext_ = null; return this; @@ -4764,7 +4475,7 @@ public Builder mergeFrom( break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4779,19 +4490,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext 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: + { + input.readMessage(getAccessTimeFieldBuilder().getBuilder(), extensionRegistry); + timeContextCase_ = 1; + 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.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -5069,7 +4798,19 @@ public ConditionContext parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ConditionContext(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(); } }; @@ -5460,7 +5201,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (conditionContext_ != null) { output.writeMessage(6, getConditionContext()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -5487,7 +5228,7 @@ public int getSerializedSize() { if (conditionContext_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getConditionContext()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -5524,7 +5265,7 @@ public boolean equals(final java.lang.Object obj) { if (hasConditionContext()) { if (!getConditionContext().equals(other.getConditionContext())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -5557,7 +5298,7 @@ public int hashCode() { hash = (37 * hash) + CONDITION_CONTEXT_FIELD_NUMBER; hash = (53 * hash) + getConditionContext().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -5686,17 +5427,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisQuery.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 @@ -5856,7 +5590,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisQuery other) if (other.hasConditionContext()) { mergeConditionContext(other.getConditionContext()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -5871,17 +5605,70 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery 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: + { + scope_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage( + getResourceSelectorFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage( + getIdentitySelectorFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + input.readMessage(getAccessSelectorFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 42: + { + input.readMessage(getOptionsFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 50: + { + input.readMessage( + getConditionContextFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisQuery) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -7103,7 +6890,18 @@ public IamPolicyAnalysisQuery parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new IamPolicyAnalysisQuery(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResult.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResult.java index 49581224e..19d21836d 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResult.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResult.java @@ -54,108 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private IamPolicyAnalysisResult( - 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(); - - attachedResourceFullName_ = s; - break; - } - case 18: - { - com.google.iam.v1.Binding.Builder subBuilder = null; - if (iamBinding_ != null) { - subBuilder = iamBinding_.toBuilder(); - } - iamBinding_ = - input.readMessage(com.google.iam.v1.Binding.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(iamBinding_); - iamBinding_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - accessControlLists_ = - new java.util.ArrayList< - com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList>(); - mutable_bitField0_ |= 0x00000001; - } - accessControlLists_.add( - input.readMessage( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.parser(), - extensionRegistry)); - break; - } - case 34: - { - com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.Builder subBuilder = - null; - if (identityList_ != null) { - subBuilder = identityList_.toBuilder(); - } - identityList_ = - input.readMessage( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(identityList_); - identityList_ = subBuilder.buildPartial(); - } - - break; - } - case 40: - { - fullyExplored_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - accessControlLists_ = java.util.Collections.unmodifiableList(accessControlLists_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetProto .internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor; @@ -272,69 +170,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Resource( - 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(); - - fullResourceName_ = s; - break; - } - case 18: - { - com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder subBuilder = null; - if (analysisState_ != null) { - subBuilder = analysisState_.toBuilder(); - } - analysisState_ = - input.readMessage( - com.google.cloud.asset.v1.IamPolicyAnalysisState.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(analysisState_); - analysisState_ = 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 com.google.cloud.asset.v1.AssetProto .internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Resource_descriptor; @@ -469,7 +304,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (analysisState_ != null) { output.writeMessage(2, getAnalysisState()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -484,7 +319,7 @@ public int getSerializedSize() { if (analysisState_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAnalysisState()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -505,7 +340,7 @@ public boolean equals(final java.lang.Object obj) { if (hasAnalysisState()) { if (!getAnalysisState().equals(other.getAnalysisState())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -522,7 +357,7 @@ public int hashCode() { hash = (37 * hash) + ANALYSIS_STATE_FIELD_NUMBER; hash = (53 * hash) + getAnalysisState().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -654,17 +489,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.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 @@ -772,7 +600,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resou if (other.hasAnalysisState()) { mergeAnalysisState(other.getAnalysisState()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -787,18 +615,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource 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: + { + fullResourceName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getAnalysisStateFieldBuilder().getBuilder(), extensionRegistry); + + 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.cloud.asset.v1.IamPolicyAnalysisResult.Resource) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1133,7 +986,19 @@ public Resource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Resource(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(); } }; @@ -1301,76 +1166,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Access( - 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(); - oneofAccessCase_ = 1; - oneofAccess_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - oneofAccessCase_ = 2; - oneofAccess_ = s; - break; - } - case 26: - { - com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder subBuilder = null; - if (analysisState_ != null) { - subBuilder = analysisState_.toBuilder(); - } - analysisState_ = - input.readMessage( - com.google.cloud.asset.v1.IamPolicyAnalysisState.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(analysisState_); - analysisState_ = 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 com.google.cloud.asset.v1.AssetProto .internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Access_descriptor; @@ -1644,7 +1439,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (analysisState_ != null) { output.writeMessage(3, getAnalysisState()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1662,7 +1457,7 @@ public int getSerializedSize() { if (analysisState_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAnalysisState()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1693,7 +1488,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1720,7 +1515,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1852,17 +1647,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.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 @@ -1990,7 +1778,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Acces break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2005,18 +1793,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access 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: + { + java.lang.String s = input.readStringRequireUtf8(); + oneofAccessCase_ = 1; + oneofAccess_ = s; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + oneofAccessCase_ = 2; + oneofAccess_ = s; + break; + } // case 18 + case 26: + { + input.readMessage(getAnalysisStateFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2521,7 +2342,19 @@ public Access parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Access(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(); } }; @@ -2659,69 +2492,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Identity( - 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(); - - name_ = s; - break; - } - case 18: - { - com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder subBuilder = null; - if (analysisState_ != null) { - subBuilder = analysisState_.toBuilder(); - } - analysisState_ = - input.readMessage( - com.google.cloud.asset.v1.IamPolicyAnalysisState.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(analysisState_); - analysisState_ = 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 com.google.cloud.asset.v1.AssetProto .internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Identity_descriptor; @@ -2874,7 +2644,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (analysisState_ != null) { output.writeMessage(2, getAnalysisState()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2889,7 +2659,7 @@ public int getSerializedSize() { if (analysisState_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAnalysisState()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2910,7 +2680,7 @@ public boolean equals(final java.lang.Object obj) { if (hasAnalysisState()) { if (!getAnalysisState().equals(other.getAnalysisState())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2927,7 +2697,7 @@ public int hashCode() { hash = (37 * hash) + ANALYSIS_STATE_FIELD_NUMBER; hash = (53 * hash) + getAnalysisState().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3059,17 +2829,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.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 @@ -3177,7 +2940,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Ident if (other.hasAnalysisState()) { mergeAnalysisState(other.getAnalysisState()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3192,18 +2955,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity 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: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getAnalysisStateFieldBuilder().getBuilder(), extensionRegistry); + + 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.cloud.asset.v1.IamPolicyAnalysisResult.Identity) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3583,7 +3371,19 @@ public Identity parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Identity(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(); } }; @@ -3696,59 +3496,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Edge( - 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(); - - sourceNode_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetNode_ = 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.cloud.asset.v1.AssetProto .internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Edge_descriptor; @@ -3886,7 +3633,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetNode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, targetNode_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3901,7 +3648,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetNode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, targetNode_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3919,7 +3666,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSourceNode().equals(other.getSourceNode())) return false; if (!getTargetNode().equals(other.getTargetNode())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3934,7 +3681,7 @@ public int hashCode() { hash = (53 * hash) + getSourceNode().hashCode(); hash = (37 * hash) + TARGET_NODE_FIELD_NUMBER; hash = (53 * hash) + getTargetNode().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4066,17 +3813,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.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 @@ -4175,7 +3915,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge targetNode_ = other.targetNode_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4190,18 +3930,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge 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: + { + sourceNode_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + targetNode_ = 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.cloud.asset.v1.IamPolicyAnalysisResult.Edge) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4460,7 +4225,19 @@ public Edge parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Edge(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(); } }; @@ -4778,113 +4555,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AccessControlList( - 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)) { - resources_ = - new java.util.ArrayList< - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource>(); - mutable_bitField0_ |= 0x00000001; - } - resources_.add( - input.readMessage( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.parser(), - extensionRegistry)); - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - accesses_ = - new java.util.ArrayList< - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access>(); - mutable_bitField0_ |= 0x00000002; - } - accesses_.add( - input.readMessage( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.parser(), - extensionRegistry)); - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - resourceEdges_ = - new java.util.ArrayList< - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge>(); - mutable_bitField0_ |= 0x00000004; - } - resourceEdges_.add( - input.readMessage( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.parser(), - extensionRegistry)); - break; - } - case 34: - { - com.google.cloud.asset.v1.ConditionEvaluation.Builder subBuilder = null; - if (conditionEvaluation_ != null) { - subBuilder = conditionEvaluation_.toBuilder(); - } - conditionEvaluation_ = - input.readMessage( - com.google.cloud.asset.v1.ConditionEvaluation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(conditionEvaluation_); - conditionEvaluation_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - resources_ = java.util.Collections.unmodifiableList(resources_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - accesses_ = java.util.Collections.unmodifiableList(accesses_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - resourceEdges_ = java.util.Collections.unmodifiableList(resourceEdges_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetProto .internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_AccessControlList_descriptor; @@ -5243,7 +4913,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (conditionEvaluation_ != null) { output.writeMessage(4, getConditionEvaluation()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -5265,7 +4935,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getConditionEvaluation()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -5288,7 +4958,7 @@ public boolean equals(final java.lang.Object obj) { if (hasConditionEvaluation()) { if (!getConditionEvaluation().equals(other.getConditionEvaluation())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -5315,7 +4985,7 @@ public int hashCode() { hash = (37 * hash) + CONDITION_EVALUATION_FIELD_NUMBER; hash = (53 * hash) + getConditionEvaluation().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -5460,21 +5130,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.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) { - getResourcesFieldBuilder(); - getAccessesFieldBuilder(); - getResourceEdgesFieldBuilder(); - } } @java.lang.Override @@ -5482,22 +5141,25 @@ public Builder clear() { super.clear(); if (resourcesBuilder_ == null) { resources_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + resources_ = null; resourcesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (accessesBuilder_ == null) { accesses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + accesses_ = null; accessesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); if (resourceEdgesBuilder_ == null) { resourceEdges_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + resourceEdges_ = null; resourceEdgesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); if (conditionEvaluationBuilder_ == null) { conditionEvaluation_ = null; } else { @@ -5705,7 +5367,7 @@ public Builder mergeFrom( if (other.hasConditionEvaluation()) { mergeConditionEvaluation(other.getConditionEvaluation()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -5720,19 +5382,80 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList 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.cloud.asset.v1.IamPolicyAnalysisResult.Resource m = + input.readMessage( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.parser(), + extensionRegistry); + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + resources_.add(m); + } else { + resourcesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access m = + input.readMessage( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.parser(), + extensionRegistry); + if (accessesBuilder_ == null) { + ensureAccessesIsMutable(); + accesses_.add(m); + } else { + accessesBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge m = + input.readMessage( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.parser(), + extensionRegistry); + if (resourceEdgesBuilder_ == null) { + ensureResourceEdgesIsMutable(); + resourceEdges_.add(m); + } else { + resourceEdgesBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: + { + input.readMessage( + getConditionEvaluationFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -7286,7 +7009,19 @@ public AccessControlList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AccessControlList(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(); } }; @@ -7512,80 +7247,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private IdentityList( - 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)) { - identities_ = - new java.util.ArrayList< - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity>(); - mutable_bitField0_ |= 0x00000001; - } - identities_.add( - input.readMessage( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.parser(), - extensionRegistry)); - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - groupEdges_ = - new java.util.ArrayList< - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge>(); - mutable_bitField0_ |= 0x00000002; - } - groupEdges_.add( - input.readMessage( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.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)) { - identities_ = java.util.Collections.unmodifiableList(identities_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - groupEdges_ = java.util.Collections.unmodifiableList(groupEdges_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetProto .internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_IdentityList_descriptor; @@ -7824,7 +7485,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < groupEdges_.size(); i++) { output.writeMessage(2, groupEdges_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -7839,7 +7500,7 @@ public int getSerializedSize() { for (int i = 0; i < groupEdges_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, groupEdges_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -7857,7 +7518,7 @@ public boolean equals(final java.lang.Object obj) { if (!getIdentitiesList().equals(other.getIdentitiesList())) return false; if (!getGroupEdgesList().equals(other.getGroupEdgesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -7876,7 +7537,7 @@ public int hashCode() { hash = (37 * hash) + GROUP_EDGES_FIELD_NUMBER; hash = (53 * hash) + getGroupEdgesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -8008,20 +7669,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.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) { - getIdentitiesFieldBuilder(); - getGroupEdgesFieldBuilder(); - } } @java.lang.Override @@ -8029,16 +7680,18 @@ public Builder clear() { super.clear(); if (identitiesBuilder_ == null) { identities_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + identities_ = null; identitiesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (groupEdgesBuilder_ == null) { groupEdges_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + groupEdges_ = null; groupEdgesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -8194,7 +7847,7 @@ public Builder mergeFrom( } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -8209,19 +7862,59 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList 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.cloud.asset.v1.IamPolicyAnalysisResult.Identity m = + input.readMessage( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.parser(), + extensionRegistry); + if (identitiesBuilder_ == null) { + ensureIdentitiesIsMutable(); + identities_.add(m); + } else { + identitiesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge m = + input.readMessage( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.parser(), + extensionRegistry); + if (groupEdgesBuilder_ == null) { + ensureGroupEdgesIsMutable(); + groupEdges_.add(m); + } else { + groupEdgesBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -9227,7 +8920,19 @@ public IdentityList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new IdentityList(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(); } }; @@ -9553,7 +9258,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (fullyExplored_ != false) { output.writeBool(5, fullyExplored_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -9579,7 +9284,7 @@ public int getSerializedSize() { if (fullyExplored_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, fullyExplored_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -9606,7 +9311,7 @@ public boolean equals(final java.lang.Object obj) { if (!getIdentityList().equals(other.getIdentityList())) return false; } if (getFullyExplored() != other.getFullyExplored()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -9633,7 +9338,7 @@ public int hashCode() { } hash = (37 * hash) + FULLY_EXPLORED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFullyExplored()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -9763,19 +9468,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisResult.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) { - getAccessControlListsFieldBuilder(); - } } @java.lang.Override @@ -9791,10 +9487,11 @@ public Builder clear() { } if (accessControlListsBuilder_ == null) { accessControlLists_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + accessControlLists_ = null; accessControlListsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (identityListBuilder_ == null) { identityList_ = null; } else { @@ -9942,7 +9639,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisResult other if (other.getFullyExplored() != false) { setFullyExplored(other.getFullyExplored()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -9957,18 +9654,70 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisResult 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: + { + attachedResourceFullName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getIamBindingFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList m = + input.readMessage( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList + .parser(), + extensionRegistry); + if (accessControlListsBuilder_ == null) { + ensureAccessControlListsIsMutable(); + accessControlLists_.add(m); + } else { + accessControlListsBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: + { + input.readMessage(getIdentityListFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 40: + { + fullyExplored_ = input.readBool(); + + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1.IamPolicyAnalysisResult) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -11047,7 +10796,18 @@ public IamPolicyAnalysisResult parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new IamPolicyAnalysisResult(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisState.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisState.java index d76ed9749..0047a4a4a 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisState.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisState.java @@ -54,59 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private IamPolicyAnalysisState( - 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: - { - int rawValue = input.readEnum(); - - code_ = rawValue; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - cause_ = 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.cloud.asset.v1.AssetProto .internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_descriptor; @@ -236,7 +183,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cause_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, cause_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -251,7 +198,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cause_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, cause_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -269,7 +216,7 @@ public boolean equals(final java.lang.Object obj) { if (code_ != other.code_) return false; if (!getCause().equals(other.getCause())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -284,7 +231,7 @@ public int hashCode() { hash = (53 * hash) + code_; hash = (37 * hash) + CAUSE_FIELD_NUMBER; hash = (53 * hash) + getCause().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -414,17 +361,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisState.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 @@ -520,7 +460,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisState other) cause_ = other.cause_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -535,17 +475,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisState 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 8: + { + code_ = input.readEnum(); + + break; + } // case 8 + case 18: + { + cause_ = 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.cloud.asset.v1.IamPolicyAnalysisState) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -802,7 +768,18 @@ public IamPolicyAnalysisState parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new IamPolicyAnalysisState(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResult.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResult.java index 00683a862..0a6a0e044 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResult.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResult.java @@ -56,118 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private IamPolicySearchResult( - 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(); - - resource_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 26: - { - com.google.iam.v1.Policy.Builder subBuilder = null; - if (policy_ != null) { - subBuilder = policy_.toBuilder(); - } - policy_ = input.readMessage(com.google.iam.v1.Policy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(policy_); - policy_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Builder subBuilder = null; - if (explanation_ != null) { - subBuilder = explanation_.toBuilder(); - } - explanation_ = - input.readMessage( - com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(explanation_); - explanation_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - assetType_ = s; - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - folders_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - folders_.add(s); - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - organization_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - folders_ = folders_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetProto .internal_static_google_cloud_asset_v1_IamPolicySearchResult_descriptor; @@ -327,66 +215,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Explanation( - 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)) { - matchedPermissions_ = - com.google.protobuf.MapField.newMapField( - MatchedPermissionsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry< - java.lang.String, - com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> - matchedPermissions__ = - input.readMessage( - MatchedPermissionsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - matchedPermissions_ - .getMutableMap() - .put(matchedPermissions__.getKey(), matchedPermissions__.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 com.google.cloud.asset.v1.AssetProto .internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_descriptor; @@ -503,60 +331,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Permissions( - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - permissions_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - permissions_.add(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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - permissions_ = permissions_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetProto .internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_Permissions_descriptor; @@ -651,7 +425,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < permissions_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, permissions_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -668,7 +442,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getPermissionsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -686,7 +460,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions) obj; if (!getPermissionsList().equals(other.getPermissionsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -701,7 +475,7 @@ public int hashCode() { hash = (37 * hash) + PERMISSIONS_FIELD_NUMBER; hash = (53 * hash) + getPermissionsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -843,17 +617,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions.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 @@ -964,7 +731,7 @@ public Builder mergeFrom( } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -979,20 +746,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions 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: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePermissionsIsMutable(); + permissions_.add(s); + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1202,7 +987,19 @@ public Permissions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Permissions(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(); } }; @@ -1401,7 +1198,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io internalGetMatchedPermissions(), MatchedPermissionsDefaultEntryHolder.defaultEntry, 1); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1425,7 +1222,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, matchedPermissions__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1443,7 +1240,7 @@ public boolean equals(final java.lang.Object obj) { if (!internalGetMatchedPermissions().equals(other.internalGetMatchedPermissions())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1458,7 +1255,7 @@ public int hashCode() { hash = (37 * hash) + MATCHED_PERMISSIONS_FIELD_NUMBER; hash = (53 * hash) + internalGetMatchedPermissions().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1610,17 +1407,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.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 @@ -1712,7 +1502,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicySearchResult.Explana == com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.getDefaultInstance()) return this; internalGetMutableMatchedPermissions().mergeFrom(other.internalGetMatchedPermissions()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1727,19 +1517,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicySearchResult.Explanation 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.protobuf.MapEntry< + java.lang.String, + com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> + matchedPermissions__ = + input.readMessage( + MatchedPermissionsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableMatchedPermissions() + .getMutableMap() + .put(matchedPermissions__.getKey(), matchedPermissions__.getValue()); + 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.cloud.asset.v1.IamPolicySearchResult.Explanation) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2029,7 +1845,19 @@ public Explanation parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Explanation(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(); } }; @@ -2539,7 +2367,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(organization_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, organization_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2574,7 +2402,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(organization_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, organization_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2603,7 +2431,7 @@ public boolean equals(final java.lang.Object obj) { if (hasExplanation()) { if (!getExplanation().equals(other.getExplanation())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2634,7 +2462,7 @@ public int hashCode() { hash = (37 * hash) + EXPLANATION_FIELD_NUMBER; hash = (53 * hash) + getExplanation().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2763,17 +2591,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.IamPolicySearchResult.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 @@ -2930,7 +2751,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicySearchResult other) if (other.hasExplanation()) { mergeExplanation(other.getExplanation()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2945,17 +2766,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicySearchResult 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: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getPolicyFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + input.readMessage(getExplanationFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 42: + { + assetType_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureFoldersIsMutable(); + folders_.add(s); + break; + } // case 50 + case 58: + { + organization_ = input.readStringRequireUtf8(); + + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.IamPolicySearchResult) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4224,7 +4102,18 @@ public IamPolicySearchResult parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new IamPolicySearchResult(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequest.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequest.java index 26658678d..527721a55 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequest.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequest.java @@ -56,113 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListAssetsRequest( - 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(); - - parent_ = s; - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (readTime_ != null) { - subBuilder = readTime_.toBuilder(); - } - readTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(readTime_); - readTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - assetTypes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assetTypes_.add(s); - break; - } - case 32: - { - int rawValue = input.readEnum(); - - contentType_ = rawValue; - break; - } - case 40: - { - pageSize_ = input.readInt32(); - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - relationshipTypes_.add(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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - assetTypes_ = assetTypes_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - relationshipTypes_ = relationshipTypes_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_ListAssetsRequest_descriptor; @@ -673,7 +566,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < relationshipTypes_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, relationshipTypes_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -714,7 +607,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getRelationshipTypesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -740,7 +633,7 @@ public boolean equals(final java.lang.Object obj) { if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; if (!getRelationshipTypesList().equals(other.getRelationshipTypesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -771,7 +664,7 @@ public int hashCode() { hash = (37 * hash) + RELATIONSHIP_TYPES_FIELD_NUMBER; hash = (53 * hash) + getRelationshipTypesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -900,17 +793,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.ListAssetsRequest.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 @@ -1067,7 +953,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.ListAssetsRequest other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1082,17 +968,75 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.ListAssetsRequest 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: + { + input.readMessage(getReadTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAssetTypesIsMutable(); + assetTypes_.add(s); + break; + } // case 26 + case 32: + { + contentType_ = input.readEnum(); + + break; + } // case 32 + case 40: + { + pageSize_ = input.readInt32(); + + break; + } // case 40 + case 50: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRelationshipTypesIsMutable(); + relationshipTypes_.add(s); + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.ListAssetsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2327,7 +2271,18 @@ public ListAssetsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListAssetsRequest(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsResponse.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsResponse.java index 9836d4899..77f756613 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsResponse.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsResponse.java @@ -53,81 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListAssetsResponse( - 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: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (readTime_ != null) { - subBuilder = readTime_.toBuilder(); - } - readTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(readTime_); - readTime_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - assets_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assets_.add( - input.readMessage(com.google.cloud.asset.v1.Asset.parser(), extensionRegistry)); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - assets_ = java.util.Collections.unmodifiableList(assets_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_ListAssetsResponse_descriptor; @@ -334,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -352,7 +277,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -374,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getAssetsList().equals(other.getAssetsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -395,7 +320,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -524,19 +449,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.ListAssetsResponse.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) { - getAssetsFieldBuilder(); - } } @java.lang.Override @@ -550,10 +466,11 @@ public Builder clear() { } if (assetsBuilder_ == null) { assets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + assets_ = null; assetsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -682,7 +599,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.ListAssetsResponse other) { nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -697,17 +614,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.ListAssetsResponse 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: + { + input.readMessage(getReadTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + com.google.cloud.asset.v1.Asset m = + input.readMessage(com.google.cloud.asset.v1.Asset.parser(), extensionRegistry); + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.add(m); + } else { + assetsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.ListAssetsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1386,7 +1341,18 @@ public ListAssetsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListAssetsResponse(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsRequest.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsRequest.java index 737d7605f..2998c69f5 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsRequest.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListFeedsRequest( - 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; - } - 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.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_ListFeedsRequest_descriptor; @@ -183,7 +137,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -195,7 +149,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -212,7 +166,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.asset.v1.ListFeedsRequest) obj; if (!getParent().equals(other.getParent())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -225,7 +179,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PARENT_FIELD_NUMBER; hash = (53 * hash) + getParent().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -354,17 +308,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.ListFeedsRequest.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 @@ -453,7 +400,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.ListFeedsRequest other) { parent_ = other.parent_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -468,17 +415,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.ListFeedsRequest 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 + default: + { + 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.cloud.asset.v1.ListFeedsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -630,7 +597,18 @@ public ListFeedsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListFeedsRequest(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsResponse.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsResponse.java index b0b58308c..a8c959028 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsResponse.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsResponse.java @@ -44,59 +44,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListFeedsResponse( - 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)) { - feeds_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - feeds_.add( - input.readMessage(com.google.cloud.asset.v1.Feed.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)) { - feeds_ = java.util.Collections.unmodifiableList(feeds_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_ListFeedsResponse_descriptor; @@ -197,7 +144,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < feeds_.size(); i++) { output.writeMessage(1, feeds_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -209,7 +156,7 @@ public int getSerializedSize() { for (int i = 0; i < feeds_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, feeds_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -226,7 +173,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.asset.v1.ListFeedsResponse) obj; if (!getFeedsList().equals(other.getFeedsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -241,7 +188,7 @@ public int hashCode() { hash = (37 * hash) + FEEDS_FIELD_NUMBER; hash = (53 * hash) + getFeedsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -362,19 +309,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.ListFeedsResponse.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) { - getFeedsFieldBuilder(); - } } @java.lang.Override @@ -382,10 +320,11 @@ public Builder clear() { super.clear(); if (feedsBuilder_ == null) { feeds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + feeds_ = null; feedsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -499,7 +438,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.ListFeedsResponse other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -514,17 +453,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.ListFeedsResponse 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.cloud.asset.v1.Feed m = + input.readMessage(com.google.cloud.asset.v1.Feed.parser(), extensionRegistry); + if (feedsBuilder_ == null) { + ensureFeedsIsMutable(); + feeds_.add(m); + } else { + feedsBuilder_.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.cloud.asset.v1.ListFeedsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -907,7 +872,18 @@ public ListFeedsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListFeedsResponse(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesRequest.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesRequest.java index 2a293c9cd..a98e454d5 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesRequest.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesRequest.java @@ -54,71 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListSavedQueriesRequest( - 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 16: - { - pageSize_ = input.readInt32(); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 34: - { - 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.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_ListSavedQueriesRequest_descriptor; @@ -352,7 +287,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, 4, filter_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -373,7 +308,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -393,7 +328,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFilter().equals(other.getFilter())) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -412,7 +347,7 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -541,17 +476,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.ListSavedQueriesRequest.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 @@ -661,7 +589,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.ListSavedQueriesRequest other pageToken_ = other.pageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -676,18 +604,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.ListSavedQueriesRequest 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 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1.ListSavedQueriesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1162,7 +1127,18 @@ public ListSavedQueriesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListSavedQueriesRequest(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesResponse.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesResponse.java index cb51c0b80..a91cad7d2 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesResponse.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesResponse.java @@ -53,67 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListSavedQueriesResponse( - 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)) { - savedQueries_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - savedQueries_.add( - input.readMessage( - com.google.cloud.asset.v1.SavedQuery.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - savedQueries_ = java.util.Collections.unmodifiableList(savedQueries_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_ListSavedQueriesResponse_descriptor; @@ -269,7 +208,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -284,7 +223,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -302,7 +241,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSavedQueriesList().equals(other.getSavedQueriesList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -319,7 +258,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -448,19 +387,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.ListSavedQueriesResponse.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) { - getSavedQueriesFieldBuilder(); - } } @java.lang.Override @@ -468,10 +398,11 @@ public Builder clear() { super.clear(); if (savedQueriesBuilder_ == null) { savedQueries_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + savedQueries_ = null; savedQueriesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -593,7 +524,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.ListSavedQueriesResponse othe nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -608,18 +539,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.ListSavedQueriesResponse 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.cloud.asset.v1.SavedQuery m = + input.readMessage( + com.google.cloud.asset.v1.SavedQuery.parser(), extensionRegistry); + if (savedQueriesBuilder_ == null) { + ensureSavedQueriesIsMutable(); + savedQueries_.add(m); + } else { + savedQueriesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = 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.cloud.asset.v1.ListSavedQueriesResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1118,7 +1081,18 @@ public ListSavedQueriesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListSavedQueriesResponse(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysis.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysis.java index 4fe6f64f8..d82321b9d 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysis.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysis.java @@ -52,82 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private MoveAnalysis( - 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(); - - displayName_ = s; - break; - } - case 18: - { - com.google.cloud.asset.v1.MoveAnalysisResult.Builder subBuilder = null; - if (resultCase_ == 2) { - subBuilder = ((com.google.cloud.asset.v1.MoveAnalysisResult) result_).toBuilder(); - } - result_ = - input.readMessage( - com.google.cloud.asset.v1.MoveAnalysisResult.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.asset.v1.MoveAnalysisResult) result_); - result_ = subBuilder.buildPartial(); - } - resultCase_ = 2; - break; - } - case 26: - { - com.google.rpc.Status.Builder subBuilder = null; - if (resultCase_ == 3) { - subBuilder = ((com.google.rpc.Status) result_).toBuilder(); - } - result_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.rpc.Status) result_); - result_ = subBuilder.buildPartial(); - } - resultCase_ = 3; - 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.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_MoveAnalysis_descriptor; @@ -366,7 +290,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (resultCase_ == 3) { output.writeMessage(3, (com.google.rpc.Status) result_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -388,7 +312,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 3, (com.google.rpc.Status) result_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -415,7 +339,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -440,7 +364,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -569,17 +493,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.MoveAnalysis.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 @@ -587,6 +504,12 @@ public Builder clear() { super.clear(); displayName_ = ""; + if (analysisBuilder_ != null) { + analysisBuilder_.clear(); + } + if (errorBuilder_ != null) { + errorBuilder_.clear(); + } resultCase_ = 0; result_ = null; return this; @@ -701,7 +624,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.MoveAnalysis other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -716,17 +639,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.MoveAnalysis 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: + { + displayName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getAnalysisFieldBuilder().getBuilder(), extensionRegistry); + resultCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getErrorFieldBuilder().getBuilder(), extensionRegistry); + resultCase_ = 3; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.MoveAnalysis) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1298,7 +1253,18 @@ public MoveAnalysis parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MoveAnalysis(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysisResult.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysisResult.java index 06690b41e..953394bbb 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysisResult.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysisResult.java @@ -53,74 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private MoveAnalysisResult( - 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)) { - blockers_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - blockers_.add( - input.readMessage( - com.google.cloud.asset.v1.MoveImpact.parser(), extensionRegistry)); - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - warnings_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - warnings_.add( - input.readMessage( - com.google.cloud.asset.v1.MoveImpact.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)) { - blockers_ = java.util.Collections.unmodifiableList(blockers_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - warnings_ = java.util.Collections.unmodifiableList(warnings_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_MoveAnalysisResult_descriptor; @@ -309,7 +241,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < warnings_.size(); i++) { output.writeMessage(2, warnings_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -324,7 +256,7 @@ public int getSerializedSize() { for (int i = 0; i < warnings_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, warnings_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -342,7 +274,7 @@ public boolean equals(final java.lang.Object obj) { if (!getBlockersList().equals(other.getBlockersList())) return false; if (!getWarningsList().equals(other.getWarningsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -361,7 +293,7 @@ public int hashCode() { hash = (37 * hash) + WARNINGS_FIELD_NUMBER; hash = (53 * hash) + getWarningsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -490,20 +422,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.MoveAnalysisResult.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) { - getBlockersFieldBuilder(); - getWarningsFieldBuilder(); - } } @java.lang.Override @@ -511,16 +433,18 @@ public Builder clear() { super.clear(); if (blockersBuilder_ == null) { blockers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + blockers_ = null; blockersBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningsBuilder_ == null) { warnings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + warnings_ = null; warningsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -670,7 +594,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.MoveAnalysisResult other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -685,17 +609,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.MoveAnalysisResult 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.cloud.asset.v1.MoveImpact m = + input.readMessage( + com.google.cloud.asset.v1.MoveImpact.parser(), extensionRegistry); + if (blockersBuilder_ == null) { + ensureBlockersIsMutable(); + blockers_.add(m); + } else { + blockersBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.cloud.asset.v1.MoveImpact m = + input.readMessage( + com.google.cloud.asset.v1.MoveImpact.parser(), extensionRegistry); + if (warningsBuilder_ == null) { + ensureWarningsIsMutable(); + warnings_.add(m); + } else { + warningsBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.MoveAnalysisResult) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1483,7 +1447,18 @@ public MoveAnalysisResult parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MoveAnalysisResult(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveImpact.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveImpact.java index 5a2303a10..f292982ae 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveImpact.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveImpact.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private MoveImpact( - 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(); - - detail_ = 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.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_MoveImpact_descriptor; @@ -179,7 +133,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(detail_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, detail_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -191,7 +145,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(detail_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, detail_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -207,7 +161,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.asset.v1.MoveImpact other = (com.google.cloud.asset.v1.MoveImpact) obj; if (!getDetail().equals(other.getDetail())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -220,7 +174,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + DETAIL_FIELD_NUMBER; hash = (53 * hash) + getDetail().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -348,17 +302,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.MoveImpact.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 @@ -446,7 +393,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.MoveImpact other) { detail_ = other.detail_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -461,17 +408,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.MoveImpact 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: + { + detail_ = input.readStringRequireUtf8(); + + 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.cloud.asset.v1.MoveImpact) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -613,7 +580,18 @@ public MoveImpact parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MoveImpact(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputConfig.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputConfig.java index 6e02e0f21..e637ada7c 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputConfig.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputConfig.java @@ -50,78 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private OutputConfig( - 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: - { - com.google.cloud.asset.v1.GcsDestination.Builder subBuilder = null; - if (destinationCase_ == 1) { - subBuilder = ((com.google.cloud.asset.v1.GcsDestination) destination_).toBuilder(); - } - destination_ = - input.readMessage( - com.google.cloud.asset.v1.GcsDestination.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.asset.v1.GcsDestination) destination_); - destination_ = subBuilder.buildPartial(); - } - destinationCase_ = 1; - break; - } - case 18: - { - com.google.cloud.asset.v1.BigQueryDestination.Builder subBuilder = null; - if (destinationCase_ == 2) { - subBuilder = - ((com.google.cloud.asset.v1.BigQueryDestination) destination_).toBuilder(); - } - destination_ = - input.readMessage( - com.google.cloud.asset.v1.BigQueryDestination.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.asset.v1.BigQueryDestination) destination_); - destination_ = subBuilder.buildPartial(); - } - destinationCase_ = 2; - 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.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_OutputConfig_descriptor; @@ -309,7 +237,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (destinationCase_ == 2) { output.writeMessage(2, (com.google.cloud.asset.v1.BigQueryDestination) destination_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -328,7 +256,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 2, (com.google.cloud.asset.v1.BigQueryDestination) destination_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -354,7 +282,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -377,7 +305,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -506,22 +434,21 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.OutputConfig.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 public Builder clear() { super.clear(); + if (gcsDestinationBuilder_ != null) { + gcsDestinationBuilder_.clear(); + } + if (bigqueryDestinationBuilder_ != null) { + bigqueryDestinationBuilder_.clear(); + } destinationCase_ = 0; destination_ = null; return this; @@ -631,7 +558,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.OutputConfig other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -646,17 +573,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.OutputConfig 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: + { + input.readMessage(getGcsDestinationFieldBuilder().getBuilder(), extensionRegistry); + destinationCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + getBigqueryDestinationFieldBuilder().getBuilder(), extensionRegistry); + destinationCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.OutputConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1136,7 +1090,18 @@ public OutputConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OutputConfig(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputResult.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputResult.java index 7922ccf43..6f8249d64 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputResult.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputResult.java @@ -50,61 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private OutputResult( - 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: - { - com.google.cloud.asset.v1.GcsOutputResult.Builder subBuilder = null; - if (resultCase_ == 1) { - subBuilder = ((com.google.cloud.asset.v1.GcsOutputResult) result_).toBuilder(); - } - result_ = - input.readMessage( - com.google.cloud.asset.v1.GcsOutputResult.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.asset.v1.GcsOutputResult) result_); - result_ = subBuilder.buildPartial(); - } - resultCase_ = 1; - 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.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_OutputResult_descriptor; @@ -232,7 +177,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (resultCase_ == 1) { output.writeMessage(1, (com.google.cloud.asset.v1.GcsOutputResult) result_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -246,7 +191,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 1, (com.google.cloud.asset.v1.GcsOutputResult) result_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -269,7 +214,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -288,7 +233,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -417,22 +362,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.OutputResult.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 public Builder clear() { super.clear(); + if (gcsResultBuilder_ != null) { + gcsResultBuilder_.clear(); + } resultCase_ = 0; result_ = null; return this; @@ -530,7 +471,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.OutputResult other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -545,17 +486,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.OutputResult 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: + { + input.readMessage(getGcsResultFieldBuilder().getBuilder(), extensionRegistry); + resultCase_ = 1; + 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.cloud.asset.v1.OutputResult) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -814,7 +775,18 @@ public OutputResult parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OutputResult(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PartitionSpec.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PartitionSpec.java index 29caf7155..4a844504e 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PartitionSpec.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PartitionSpec.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PartitionSpec( - 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: - { - int rawValue = input.readEnum(); - - partitionKey_ = rawValue; - 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.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_PartitionSpec_descriptor; @@ -345,7 +299,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(1, partitionKey_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -359,7 +313,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, partitionKey_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -375,7 +329,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.asset.v1.PartitionSpec other = (com.google.cloud.asset.v1.PartitionSpec) obj; if (partitionKey_ != other.partitionKey_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -388,7 +342,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PARTITION_KEY_FIELD_NUMBER; hash = (53 * hash) + partitionKey_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -517,17 +471,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.PartitionSpec.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 @@ -615,7 +562,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.PartitionSpec other) { if (other.partitionKey_ != 0) { setPartitionKeyValue(other.getPartitionKeyValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -630,17 +577,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.PartitionSpec 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 8: + { + partitionKey_ = input.readEnum(); + + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.PartitionSpec) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -769,7 +736,18 @@ public PartitionSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PartitionSpec(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PubsubDestination.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PubsubDestination.java index c0989ae4e..97aa01169 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PubsubDestination.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PubsubDestination.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PubsubDestination( - 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(); - - topic_ = 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.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_PubsubDestination_descriptor; @@ -181,7 +135,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, topic_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -193,7 +147,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, topic_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -210,7 +164,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.asset.v1.PubsubDestination) obj; if (!getTopic().equals(other.getTopic())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -223,7 +177,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TOPIC_FIELD_NUMBER; hash = (53 * hash) + getTopic().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -352,17 +306,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.PubsubDestination.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 @@ -451,7 +398,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.PubsubDestination other) { topic_ = other.topic_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -466,17 +413,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.PubsubDestination 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: + { + topic_ = input.readStringRequireUtf8(); + + 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.cloud.asset.v1.PubsubDestination) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -623,7 +590,18 @@ public PubsubDestination parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PubsubDestination(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsOutputConfig.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsOutputConfig.java index 2599ed269..f1114dc90 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsOutputConfig.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsOutputConfig.java @@ -50,64 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private QueryAssetsOutputConfig( - 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: - { - com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.Builder - subBuilder = null; - if (bigqueryDestination_ != null) { - subBuilder = bigqueryDestination_.toBuilder(); - } - bigqueryDestination_ = - input.readMessage( - com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(bigqueryDestination_); - bigqueryDestination_ = 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 com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_descriptor; @@ -259,66 +201,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BigQueryDestination( - 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(); - - dataset_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - table_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - writeDisposition_ = 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.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_BigQueryDestination_descriptor; @@ -524,7 +406,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(writeDisposition_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, writeDisposition_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -542,7 +424,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(writeDisposition_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, writeDisposition_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -561,7 +443,7 @@ public boolean equals(final java.lang.Object obj) { if (!getDataset().equals(other.getDataset())) return false; if (!getTable().equals(other.getTable())) return false; if (!getWriteDisposition().equals(other.getWriteDisposition())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -578,7 +460,7 @@ public int hashCode() { hash = (53 * hash) + getTable().hashCode(); hash = (37 * hash) + WRITE_DISPOSITION_FIELD_NUMBER; hash = (53 * hash) + getWriteDisposition().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -713,17 +595,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.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 @@ -836,7 +711,7 @@ public Builder mergeFrom( writeDisposition_ = other.writeDisposition_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -851,19 +726,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination 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: + { + dataset_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + table_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + writeDisposition_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1271,7 +1176,19 @@ public BigQueryDestination parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BigQueryDestination(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(); } }; @@ -1365,7 +1282,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (bigqueryDestination_ != null) { output.writeMessage(1, getBigqueryDestination()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1377,7 +1294,7 @@ public int getSerializedSize() { if (bigqueryDestination_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBigqueryDestination()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1397,7 +1314,7 @@ public boolean equals(final java.lang.Object obj) { if (hasBigqueryDestination()) { if (!getBigqueryDestination().equals(other.getBigqueryDestination())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1412,7 +1329,7 @@ public int hashCode() { hash = (37 * hash) + BIGQUERY_DESTINATION_FIELD_NUMBER; hash = (53 * hash) + getBigqueryDestination().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1541,17 +1458,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.QueryAssetsOutputConfig.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 @@ -1648,7 +1558,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.QueryAssetsOutputConfig other if (other.hasBigqueryDestination()) { mergeBigqueryDestination(other.getBigqueryDestination()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1663,18 +1573,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.QueryAssetsOutputConfig 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: + { + input.readMessage( + getBigqueryDestinationFieldBuilder().getBuilder(), extensionRegistry); + + 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.cloud.asset.v1.QueryAssetsOutputConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1924,7 +1854,18 @@ public QueryAssetsOutputConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new QueryAssetsOutputConfig(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsRequest.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsRequest.java index 51b47b014..30bbeec03 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsRequest.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsRequest.java @@ -53,140 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private QueryAssetsRequest( - 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(); - queryCase_ = 2; - query_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - queryCase_ = 3; - query_ = s; - break; - } - case 32: - { - pageSize_ = input.readInt32(); - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 50: - { - com.google.protobuf.Duration.Builder subBuilder = null; - if (timeout_ != null) { - subBuilder = timeout_.toBuilder(); - } - timeout_ = - input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(timeout_); - timeout_ = subBuilder.buildPartial(); - } - - break; - } - case 58: - { - com.google.cloud.asset.v1.TimeWindow.Builder subBuilder = null; - if (timeCase_ == 7) { - subBuilder = ((com.google.cloud.asset.v1.TimeWindow) time_).toBuilder(); - } - time_ = - input.readMessage( - com.google.cloud.asset.v1.TimeWindow.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.asset.v1.TimeWindow) time_); - time_ = subBuilder.buildPartial(); - } - timeCase_ = 7; - break; - } - case 66: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (timeCase_ == 8) { - subBuilder = ((com.google.protobuf.Timestamp) time_).toBuilder(); - } - time_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.protobuf.Timestamp) time_); - time_ = subBuilder.buildPartial(); - } - timeCase_ = 8; - break; - } - case 74: - { - com.google.cloud.asset.v1.QueryAssetsOutputConfig.Builder subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = - input.readMessage( - com.google.cloud.asset.v1.QueryAssetsOutputConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputConfig_); - outputConfig_ = 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 com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_QueryAssetsRequest_descriptor; @@ -885,7 +751,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (outputConfig_ != null) { output.writeMessage(9, getOutputConfig()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -925,7 +791,7 @@ public int getSerializedSize() { if (outputConfig_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getOutputConfig()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -974,7 +840,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1023,7 +889,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1152,17 +1018,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.QueryAssetsRequest.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 @@ -1180,6 +1039,12 @@ public Builder clear() { timeout_ = null; timeoutBuilder_ = null; } + if (readTimeWindowBuilder_ != null) { + readTimeWindowBuilder_.clear(); + } + if (readTimeBuilder_ != null) { + readTimeBuilder_.clear(); + } if (outputConfigBuilder_ == null) { outputConfig_ = null; } else { @@ -1354,7 +1219,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.QueryAssetsRequest other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1369,17 +1234,87 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.QueryAssetsRequest 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: + { + java.lang.String s = input.readStringRequireUtf8(); + queryCase_ = 2; + query_ = s; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + queryCase_ = 3; + query_ = s; + break; + } // case 26 + case 32: + { + pageSize_ = input.readInt32(); + + break; + } // case 32 + case 42: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + input.readMessage(getTimeoutFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 50 + case 58: + { + input.readMessage(getReadTimeWindowFieldBuilder().getBuilder(), extensionRegistry); + timeCase_ = 7; + break; + } // case 58 + case 66: + { + input.readMessage(getReadTimeFieldBuilder().getBuilder(), extensionRegistry); + timeCase_ = 8; + break; + } // case 66 + case 74: + { + input.readMessage(getOutputConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 74 + default: + { + 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.cloud.asset.v1.QueryAssetsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3026,7 +2961,18 @@ public QueryAssetsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new QueryAssetsRequest(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsResponse.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsResponse.java index 8fdcc9f9e..1bd4becdd 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsResponse.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsResponse.java @@ -52,105 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private QueryAssetsResponse( - 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(); - - jobReference_ = s; - break; - } - case 16: - { - done_ = input.readBool(); - break; - } - case 26: - { - com.google.rpc.Status.Builder subBuilder = null; - if (responseCase_ == 3) { - subBuilder = ((com.google.rpc.Status) response_).toBuilder(); - } - response_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.rpc.Status) response_); - response_ = subBuilder.buildPartial(); - } - responseCase_ = 3; - break; - } - case 34: - { - com.google.cloud.asset.v1.QueryResult.Builder subBuilder = null; - if (responseCase_ == 4) { - subBuilder = ((com.google.cloud.asset.v1.QueryResult) response_).toBuilder(); - } - response_ = - input.readMessage( - com.google.cloud.asset.v1.QueryResult.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.asset.v1.QueryResult) response_); - response_ = subBuilder.buildPartial(); - } - responseCase_ = 4; - break; - } - case 42: - { - com.google.cloud.asset.v1.QueryAssetsOutputConfig.Builder subBuilder = null; - if (responseCase_ == 5) { - subBuilder = - ((com.google.cloud.asset.v1.QueryAssetsOutputConfig) response_).toBuilder(); - } - response_ = - input.readMessage( - com.google.cloud.asset.v1.QueryAssetsOutputConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.asset.v1.QueryAssetsOutputConfig) response_); - response_ = subBuilder.buildPartial(); - } - responseCase_ = 5; - 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.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_QueryAssetsResponse_descriptor; @@ -472,7 +373,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (responseCase_ == 5) { output.writeMessage(5, (com.google.cloud.asset.v1.QueryAssetsOutputConfig) response_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -502,7 +403,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 5, (com.google.cloud.asset.v1.QueryAssetsOutputConfig) response_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -534,7 +435,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -565,7 +466,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -694,17 +595,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.QueryAssetsResponse.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 @@ -714,6 +608,15 @@ public Builder clear() { done_ = false; + if (errorBuilder_ != null) { + errorBuilder_.clear(); + } + if (queryResultBuilder_ != null) { + queryResultBuilder_.clear(); + } + if (outputConfigBuilder_ != null) { + outputConfigBuilder_.clear(); + } responseCase_ = 0; response_ = null; return this; @@ -844,7 +747,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.QueryAssetsResponse other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -859,17 +762,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.QueryAssetsResponse 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: + { + jobReference_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + done_ = input.readBool(); + + break; + } // case 16 + case 26: + { + input.readMessage(getErrorFieldBuilder().getBuilder(), extensionRegistry); + responseCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage(getQueryResultFieldBuilder().getBuilder(), extensionRegistry); + responseCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage(getOutputConfigFieldBuilder().getBuilder(), extensionRegistry); + responseCase_ = 5; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.QueryAssetsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1719,7 +1666,18 @@ public QueryAssetsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new QueryAssetsResponse(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryResult.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryResult.java index c8e98ebad..257ca57f4 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryResult.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryResult.java @@ -56,86 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private QueryResult( - 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)) { - rows_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - rows_.add(input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry)); - break; - } - case 18: - { - com.google.cloud.asset.v1.TableSchema.Builder subBuilder = null; - if (schema_ != null) { - subBuilder = schema_.toBuilder(); - } - schema_ = - input.readMessage( - com.google.cloud.asset.v1.TableSchema.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(schema_); - schema_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - case 32: - { - totalRows_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - rows_ = java.util.Collections.unmodifiableList(rows_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_QueryResult_descriptor; @@ -358,7 +278,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (totalRows_ != 0L) { output.writeInt64(4, totalRows_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -379,7 +299,7 @@ public int getSerializedSize() { if (totalRows_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, totalRows_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -401,7 +321,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getNextPageToken().equals(other.getNextPageToken())) return false; if (getTotalRows() != other.getTotalRows()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -424,7 +344,7 @@ public int hashCode() { hash = (53 * hash) + getNextPageToken().hashCode(); hash = (37 * hash) + TOTAL_ROWS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalRows()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -555,19 +475,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.QueryResult.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) { - getRowsFieldBuilder(); - } } @java.lang.Override @@ -575,10 +486,11 @@ public Builder clear() { super.clear(); if (rowsBuilder_ == null) { rows_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + rows_ = null; rowsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (schemaBuilder_ == null) { schema_ = null; } else { @@ -719,7 +631,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.QueryResult other) { if (other.getTotalRows() != 0L) { setTotalRows(other.getTotalRows()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -734,17 +646,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.QueryResult 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.protobuf.Struct m = + input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.add(m); + } else { + rowsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + input.readMessage(getSchemaFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 32: + { + totalRows_ = 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.cloud.asset.v1.QueryResult) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1467,7 +1423,18 @@ public QueryResult parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new QueryResult(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAsset.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAsset.java index 845b44c83..309b2dd70 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAsset.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAsset.java @@ -62,80 +62,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RelatedAsset( - 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(); - - asset_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - assetType_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - ancestors_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - ancestors_.add(s); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - relationshipType_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - ancestors_ = ancestors_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetProto .internal_static_google_cloud_asset_v1_RelatedAsset_descriptor; @@ -417,7 +343,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relationshipType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, relationshipType_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -443,7 +369,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relationshipType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, relationshipType_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -462,7 +388,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAssetType().equals(other.getAssetType())) return false; if (!getAncestorsList().equals(other.getAncestorsList())) return false; if (!getRelationshipType().equals(other.getRelationshipType())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -483,7 +409,7 @@ public int hashCode() { } hash = (37 * hash) + RELATIONSHIP_TYPE_FIELD_NUMBER; hash = (53 * hash) + getRelationshipType().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -619,17 +545,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.RelatedAsset.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 @@ -750,7 +669,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.RelatedAsset other) { relationshipType_ = other.relationshipType_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -765,17 +684,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.RelatedAsset 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: + { + asset_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + assetType_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAncestorsIsMutable(); + ancestors_.add(s); + break; + } // case 26 + case 34: + { + relationshipType_ = input.readStringRequireUtf8(); + + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.RelatedAsset) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1375,7 +1333,18 @@ public RelatedAsset parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RelatedAsset(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssets.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssets.java index ed2646fbd..0650cd7d1 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssets.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssets.java @@ -56,76 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RelatedAssets( - 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: - { - com.google.cloud.asset.v1.RelationshipAttributes.Builder subBuilder = null; - if (relationshipAttributes_ != null) { - subBuilder = relationshipAttributes_.toBuilder(); - } - relationshipAttributes_ = - input.readMessage( - com.google.cloud.asset.v1.RelationshipAttributes.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(relationshipAttributes_); - relationshipAttributes_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - assets_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assets_.add( - input.readMessage( - com.google.cloud.asset.v1.RelatedAsset.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)) { - assets_ = java.util.Collections.unmodifiableList(assets_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetProto .internal_static_google_cloud_asset_v1_RelatedAssets_descriptor; @@ -279,7 +209,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < assets_.size(); i++) { output.writeMessage(2, assets_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -295,7 +225,7 @@ public int getSerializedSize() { for (int i = 0; i < assets_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, assets_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -315,7 +245,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRelationshipAttributes().equals(other.getRelationshipAttributes())) return false; } if (!getAssetsList().equals(other.getAssetsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -334,7 +264,7 @@ public int hashCode() { hash = (37 * hash) + ASSETS_FIELD_NUMBER; hash = (53 * hash) + getAssetsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -466,19 +396,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.RelatedAssets.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) { - getAssetsFieldBuilder(); - } } @java.lang.Override @@ -492,10 +413,11 @@ public Builder clear() { } if (assetsBuilder_ == null) { assets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + assets_ = null; assetsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -617,7 +539,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.RelatedAssets other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -632,17 +554,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.RelatedAssets 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: + { + input.readMessage( + getRelationshipAttributesFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + com.google.cloud.asset.v1.RelatedAsset m = + input.readMessage( + com.google.cloud.asset.v1.RelatedAsset.parser(), extensionRegistry); + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.add(m); + } else { + assetsBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.RelatedAssets) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1218,7 +1174,18 @@ public RelatedAssets parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RelatedAssets(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResource.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResource.java index cbd0b2157..80d9fd5e6 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResource.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResource.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RelatedResource( - 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(); - - assetType_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - fullResourceName_ = 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.cloud.asset.v1.AssetProto .internal_static_google_cloud_asset_v1_RelatedResource_descriptor; @@ -241,7 +188,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullResourceName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fullResourceName_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -256,7 +203,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullResourceName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fullResourceName_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -274,7 +221,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAssetType().equals(other.getAssetType())) return false; if (!getFullResourceName().equals(other.getFullResourceName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -289,7 +236,7 @@ public int hashCode() { hash = (53 * hash) + getAssetType().hashCode(); hash = (37 * hash) + FULL_RESOURCE_NAME_FIELD_NUMBER; hash = (53 * hash) + getFullResourceName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -418,17 +365,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.RelatedResource.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 @@ -524,7 +464,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.RelatedResource other) { fullResourceName_ = other.fullResourceName_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -539,17 +479,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.RelatedResource 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: + { + assetType_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + fullResourceName_ = 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.cloud.asset.v1.RelatedResource) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -802,7 +768,18 @@ public RelatedResource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RelatedResource(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResources.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResources.java index 350d3a2e0..a6c6df767 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResources.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResources.java @@ -52,61 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RelatedResources( - 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)) { - relatedResources_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - relatedResources_.add( - input.readMessage( - com.google.cloud.asset.v1.RelatedResource.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)) { - relatedResources_ = java.util.Collections.unmodifiableList(relatedResources_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetProto .internal_static_google_cloud_asset_v1_RelatedResources_descriptor; @@ -209,7 +154,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < relatedResources_.size(); i++) { output.writeMessage(1, relatedResources_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -221,7 +166,7 @@ public int getSerializedSize() { for (int i = 0; i < relatedResources_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, relatedResources_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -238,7 +183,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.asset.v1.RelatedResources) obj; if (!getRelatedResourcesList().equals(other.getRelatedResourcesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -253,7 +198,7 @@ public int hashCode() { hash = (37 * hash) + RELATED_RESOURCES_FIELD_NUMBER; hash = (53 * hash) + getRelatedResourcesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -382,19 +327,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.RelatedResources.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) { - getRelatedResourcesFieldBuilder(); - } } @java.lang.Override @@ -402,10 +338,11 @@ public Builder clear() { super.clear(); if (relatedResourcesBuilder_ == null) { relatedResources_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + relatedResources_ = null; relatedResourcesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -519,7 +456,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.RelatedResources other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -534,17 +471,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.RelatedResources 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.cloud.asset.v1.RelatedResource m = + input.readMessage( + com.google.cloud.asset.v1.RelatedResource.parser(), extensionRegistry); + if (relatedResourcesBuilder_ == null) { + ensureRelatedResourcesIsMutable(); + relatedResources_.add(m); + } else { + relatedResourcesBuilder_.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.cloud.asset.v1.RelatedResources) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -937,7 +901,18 @@ public RelatedResources parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RelatedResources(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelationshipAttributes.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelationshipAttributes.java index cb95c5f3a..7076d6b7c 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelationshipAttributes.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelationshipAttributes.java @@ -60,73 +60,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RelationshipAttributes( - 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(); - - sourceResourceType_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetResourceType_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - action_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - type_ = 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.cloud.asset.v1.AssetProto .internal_static_google_cloud_asset_v1_RelationshipAttributes_descriptor; @@ -366,7 +299,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, type_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -387,7 +320,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, type_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -407,7 +340,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSourceResourceType().equals(other.getSourceResourceType())) return false; if (!getTargetResourceType().equals(other.getTargetResourceType())) return false; if (!getAction().equals(other.getAction())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -426,7 +359,7 @@ public int hashCode() { hash = (53 * hash) + getTargetResourceType().hashCode(); hash = (37 * hash) + ACTION_FIELD_NUMBER; hash = (53 * hash) + getAction().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -559,17 +492,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.RelationshipAttributes.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 @@ -680,7 +606,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.RelationshipAttributes other) action_ = other.action_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -695,17 +621,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.RelationshipAttributes 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: + { + sourceResourceType_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + targetResourceType_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + action_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + type_ = input.readStringRequireUtf8(); + + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.RelationshipAttributes) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1170,7 +1134,18 @@ public RelationshipAttributes parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RelationshipAttributes(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Resource.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Resource.java index 792696ab6..e4672184d 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Resource.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Resource.java @@ -57,101 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Resource( - 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(); - - version_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - discoveryDocumentUri_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - discoveryName_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - resourceUrl_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 50: - { - com.google.protobuf.Struct.Builder subBuilder = null; - if (data_ != null) { - subBuilder = data_.toBuilder(); - } - data_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(data_); - data_ = subBuilder.buildPartial(); - } - - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - location_ = 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.cloud.asset.v1.AssetProto .internal_static_google_cloud_asset_v1_Resource_descriptor; @@ -585,7 +490,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, location_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -615,7 +520,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, location_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -640,7 +545,7 @@ public boolean equals(final java.lang.Object obj) { if (!getData().equals(other.getData())) return false; } if (!getLocation().equals(other.getLocation())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -667,7 +572,7 @@ public int hashCode() { } hash = (37 * hash) + LOCATION_FIELD_NUMBER; hash = (53 * hash) + getLocation().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -795,17 +700,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.Resource.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 @@ -942,7 +840,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.Resource other) { location_ = other.location_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -957,17 +855,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.Resource 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: + { + version_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + discoveryDocumentUri_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + discoveryName_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + resourceUrl_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + input.readMessage(getDataFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 50 + case 66: + { + location_ = input.readStringRequireUtf8(); + + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.Resource) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1925,7 +1879,18 @@ public Resource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Resource(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResult.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResult.java index afce56305..ed3399824 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResult.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResult.java @@ -70,295 +70,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ResourceSearchResult( - 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(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - assetType_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - location_ = s; - break; - } - case 58: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - networkTags_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - networkTags_.add(s); - break; - } - case 74: - { - com.google.protobuf.Struct.Builder subBuilder = null; - if (additionalAttributes_ != null) { - subBuilder = additionalAttributes_.toBuilder(); - } - additionalAttributes_ = - input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(additionalAttributes_); - additionalAttributes_ = subBuilder.buildPartial(); - } - - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - - kmsKey_ = s; - break; - } - case 90: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 98: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 106: - { - java.lang.String s = input.readStringRequireUtf8(); - - state_ = s; - break; - } - case 130: - { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - versionedResources_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - versionedResources_.add( - input.readMessage( - com.google.cloud.asset.v1.VersionedResource.parser(), extensionRegistry)); - break; - } - case 138: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - folders_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - folders_.add(s); - break; - } - case 146: - { - java.lang.String s = input.readStringRequireUtf8(); - - organization_ = s; - break; - } - case 154: - { - java.lang.String s = input.readStringRequireUtf8(); - - parentFullResourceName_ = s; - break; - } - case 162: - { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - attachedResources_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - attachedResources_.add( - input.readMessage( - com.google.cloud.asset.v1.AttachedResource.parser(), extensionRegistry)); - break; - } - case 170: - { - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - relationships_ = - com.google.protobuf.MapField.newMapField( - RelationshipsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000020; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.asset.v1.RelatedResources> - relationships__ = - input.readMessage( - RelationshipsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - relationships_ - .getMutableMap() - .put(relationships__.getKey(), relationships__.getValue()); - break; - } - case 186: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000040) != 0)) { - tagKeys_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000040; - } - tagKeys_.add(s); - break; - } - case 202: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000080) != 0)) { - tagValues_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000080; - } - tagValues_.add(s); - break; - } - case 210: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000100) != 0)) { - tagValueIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000100; - } - tagValueIds_.add(s); - break; - } - case 826: - { - java.lang.String s = input.readStringRequireUtf8(); - - parentAssetType_ = 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 { - if (((mutable_bitField0_ & 0x00000004) != 0)) { - networkTags_ = networkTags_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - versionedResources_ = java.util.Collections.unmodifiableList(versionedResources_); - } - if (((mutable_bitField0_ & 0x00000001) != 0)) { - folders_ = folders_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - attachedResources_ = java.util.Collections.unmodifiableList(attachedResources_); - } - if (((mutable_bitField0_ & 0x00000040) != 0)) { - tagKeys_ = tagKeys_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000080) != 0)) { - tagValues_ = tagValues_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000100) != 0)) { - tagValueIds_ = tagValueIds_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetProto .internal_static_google_cloud_asset_v1_ResourceSearchResult_descriptor; @@ -2279,7 +1990,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentAssetType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 103, parentAssetType_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2400,7 +2111,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentAssetType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(103, parentAssetType_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2448,7 +2159,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTagValuesList().equals(other.getTagValuesList())) return false; if (!getTagValueIdsList().equals(other.getTagValueIdsList())) return false; if (!getParentAssetType().equals(other.getParentAssetType())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2529,7 +2240,7 @@ public int hashCode() { } hash = (37 * hash) + PARENT_ASSET_TYPE_FIELD_NUMBER; hash = (53 * hash) + getParentAssetType().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2683,20 +2394,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.asset.v1.ResourceSearchResult.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) { - getVersionedResourcesFieldBuilder(); - getAttachedResourcesFieldBuilder(); - } } @java.lang.Override @@ -2747,16 +2448,18 @@ public Builder clear() { if (versionedResourcesBuilder_ == null) { versionedResources_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); } else { + versionedResources_ = null; versionedResourcesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); if (attachedResourcesBuilder_ == null) { attachedResources_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); } else { + attachedResources_ = null; attachedResourcesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000010); internalGetMutableRelationships().clear(); tagKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000040); @@ -3075,7 +2778,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.ResourceSearchResult other) { parentAssetType_ = other.parentAssetType_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3090,17 +2793,201 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.ResourceSearchResult 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: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + assetType_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + displayName_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + location_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 58: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 58 + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureNetworkTagsIsMutable(); + networkTags_.add(s); + break; + } // case 66 + case 74: + { + input.readMessage( + getAdditionalAttributesFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 74 + case 82: + { + kmsKey_ = input.readStringRequireUtf8(); + + break; + } // case 82 + case 90: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 90 + case 98: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 98 + case 106: + { + state_ = input.readStringRequireUtf8(); + + break; + } // case 106 + case 130: + { + com.google.cloud.asset.v1.VersionedResource m = + input.readMessage( + com.google.cloud.asset.v1.VersionedResource.parser(), extensionRegistry); + if (versionedResourcesBuilder_ == null) { + ensureVersionedResourcesIsMutable(); + versionedResources_.add(m); + } else { + versionedResourcesBuilder_.addMessage(m); + } + break; + } // case 130 + case 138: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureFoldersIsMutable(); + folders_.add(s); + break; + } // case 138 + case 146: + { + organization_ = input.readStringRequireUtf8(); + + break; + } // case 146 + case 154: + { + parentFullResourceName_ = input.readStringRequireUtf8(); + + break; + } // case 154 + case 162: + { + com.google.cloud.asset.v1.AttachedResource m = + input.readMessage( + com.google.cloud.asset.v1.AttachedResource.parser(), extensionRegistry); + if (attachedResourcesBuilder_ == null) { + ensureAttachedResourcesIsMutable(); + attachedResources_.add(m); + } else { + attachedResourcesBuilder_.addMessage(m); + } + break; + } // case 162 + case 170: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.asset.v1.RelatedResources> + relationships__ = + input.readMessage( + RelationshipsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableRelationships() + .getMutableMap() + .put(relationships__.getKey(), relationships__.getValue()); + break; + } // case 170 + case 186: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTagKeysIsMutable(); + tagKeys_.add(s); + break; + } // case 186 + case 202: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTagValuesIsMutable(); + tagValues_.add(s); + break; + } // case 202 + case 210: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTagValueIdsIsMutable(); + tagValueIds_.add(s); + break; + } // case 210 + case 826: + { + parentAssetType_ = input.readStringRequireUtf8(); + + break; + } // case 826 + default: + { + 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.cloud.asset.v1.ResourceSearchResult) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -7971,7 +7858,18 @@ public ResourceSearchResult parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ResourceSearchResult(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SavedQuery.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SavedQuery.java index 68a2b9c59..758a1e0f8 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SavedQuery.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SavedQuery.java @@ -55,134 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SavedQuery( - 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(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 26: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - creator_ = s; - break; - } - case 42: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (lastUpdateTime_ != null) { - subBuilder = lastUpdateTime_.toBuilder(); - } - lastUpdateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(lastUpdateTime_); - lastUpdateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - lastUpdater_ = s; - break; - } - case 58: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - break; - } - case 66: - { - com.google.cloud.asset.v1.SavedQuery.QueryContent.Builder subBuilder = null; - if (content_ != null) { - subBuilder = content_.toBuilder(); - } - content_ = - input.readMessage( - com.google.cloud.asset.v1.SavedQuery.QueryContent.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(content_); - content_ = 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 com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_SavedQuery_descriptor; @@ -298,65 +170,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private QueryContent( - 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: - { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder subBuilder = null; - if (queryContentCase_ == 1) { - subBuilder = - ((com.google.cloud.asset.v1.IamPolicyAnalysisQuery) queryContent_) - .toBuilder(); - } - queryContent_ = - input.readMessage( - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.asset.v1.IamPolicyAnalysisQuery) queryContent_); - queryContent_ = subBuilder.buildPartial(); - } - queryContentCase_ = 1; - 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.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_SavedQuery_QueryContent_descriptor; @@ -500,7 +313,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (queryContentCase_ == 1) { output.writeMessage(1, (com.google.cloud.asset.v1.IamPolicyAnalysisQuery) queryContent_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -514,7 +327,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 1, (com.google.cloud.asset.v1.IamPolicyAnalysisQuery) queryContent_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -538,7 +351,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -557,7 +370,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -688,22 +501,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.SavedQuery.QueryContent.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 public Builder clear() { super.clear(); + if (iamPolicyAnalysisQueryBuilder_ != null) { + iamPolicyAnalysisQueryBuilder_.clear(); + } queryContentCase_ = 0; queryContent_ = null; return this; @@ -804,7 +613,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.SavedQuery.QueryContent other break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -819,18 +628,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.SavedQuery.QueryContent 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: + { + input.readMessage( + getIamPolicyAnalysisQueryFieldBuilder().getBuilder(), extensionRegistry); + queryContentCase_ = 1; + 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.cloud.asset.v1.SavedQuery.QueryContent) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1141,7 +970,19 @@ public QueryContent parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new QueryContent(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(); } }; @@ -1660,7 +1501,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (content_ != null) { output.writeMessage(8, getContent()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1700,7 +1541,7 @@ public int getSerializedSize() { if (content_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getContent()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1732,7 +1573,7 @@ public boolean equals(final java.lang.Object obj) { if (hasContent()) { if (!getContent().equals(other.getContent())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1767,7 +1608,7 @@ public int hashCode() { hash = (37 * hash) + CONTENT_FIELD_NUMBER; hash = (53 * hash) + getContent().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1915,17 +1756,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.asset.v1.SavedQuery.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 @@ -2081,7 +1915,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.SavedQuery other) { if (other.hasContent()) { mergeContent(other.getContent()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2096,17 +1930,84 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.SavedQuery 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: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + creator_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + input.readMessage(getLastUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 50: + { + lastUpdater_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 58: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 58 + case 66: + { + input.readMessage(getContentFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.SavedQuery) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3355,7 +3256,18 @@ public SavedQuery parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SavedQuery(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequest.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequest.java index bc161aa45..b4573fa33 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequest.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequest.java @@ -56,92 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SearchAllIamPoliciesRequest( - 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(); - - scope_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - query_ = s; - break; - } - case 24: - { - pageSize_ = input.readInt32(); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - assetTypes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assetTypes_.add(s); - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - assetTypes_ = assetTypes_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_SearchAllIamPoliciesRequest_descriptor; @@ -640,7 +554,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, orderBy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -672,7 +586,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, orderBy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -694,7 +608,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPageToken().equals(other.getPageToken())) return false; if (!getAssetTypesList().equals(other.getAssetTypesList())) return false; if (!getOrderBy().equals(other.getOrderBy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -719,7 +633,7 @@ public int hashCode() { } hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; hash = (53 * hash) + getOrderBy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -849,17 +763,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.SearchAllIamPoliciesRequest.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 @@ -994,7 +901,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.SearchAllIamPoliciesRequest o orderBy_ = other.orderBy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1009,18 +916,68 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.SearchAllIamPoliciesRequest 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: + { + scope_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + query_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + pageSize_ = input.readInt32(); + + break; + } // case 24 + case 34: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAssetTypesIsMutable(); + assetTypes_.add(s); + break; + } // case 42 + case 58: + { + orderBy_ = input.readStringRequireUtf8(); + + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1.SearchAllIamPoliciesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2131,7 +2088,18 @@ public SearchAllIamPoliciesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SearchAllIamPoliciesRequest(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesResponse.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesResponse.java index c8ed054de..fec542c8f 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesResponse.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesResponse.java @@ -53,68 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SearchAllIamPoliciesResponse( - 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)) { - results_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - results_.add( - input.readMessage( - com.google.cloud.asset.v1.IamPolicySearchResult.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_SearchAllIamPoliciesResponse_descriptor; @@ -277,7 +215,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -292,7 +230,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -310,7 +248,7 @@ public boolean equals(final java.lang.Object obj) { if (!getResultsList().equals(other.getResultsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -327,7 +265,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -457,19 +395,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.SearchAllIamPoliciesResponse.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) { - getResultsFieldBuilder(); - } } @java.lang.Override @@ -477,10 +406,11 @@ public Builder clear() { super.clear(); if (resultsBuilder_ == null) { results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + results_ = null; resultsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -602,7 +532,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.SearchAllIamPoliciesResponse nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -617,18 +547,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.SearchAllIamPoliciesResponse 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.cloud.asset.v1.IamPolicySearchResult m = + input.readMessage( + com.google.cloud.asset.v1.IamPolicySearchResult.parser(), + extensionRegistry); + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(m); + } else { + resultsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = 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.cloud.asset.v1.SearchAllIamPoliciesResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1151,7 +1114,18 @@ public SearchAllIamPoliciesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SearchAllIamPoliciesResponse(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesRequest.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesRequest.java index 4aabc0485..b41f79816 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesRequest.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesRequest.java @@ -56,107 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SearchAllResourcesRequest( - 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(); - - scope_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - query_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - assetTypes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assetTypes_.add(s); - break; - } - case 32: - { - pageSize_ = input.readInt32(); - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - case 66: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (readMask_ != null) { - subBuilder = readMask_.toBuilder(); - } - readMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(readMask_); - readMask_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - assetTypes_ = assetTypes_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_SearchAllResourcesRequest_descriptor; @@ -808,7 +707,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (readMask_ != null) { output.writeMessage(8, getReadMask()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -843,7 +742,7 @@ public int getSerializedSize() { if (readMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getReadMask()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -869,7 +768,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReadMask()) { if (!getReadMask().equals(other.getReadMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -898,7 +797,7 @@ public int hashCode() { hash = (37 * hash) + READ_MASK_FIELD_NUMBER; hash = (53 * hash) + getReadMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1027,17 +926,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.SearchAllResourcesRequest.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 @@ -1186,7 +1078,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.SearchAllResourcesRequest oth if (other.hasReadMask()) { mergeReadMask(other.getReadMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1201,18 +1093,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.SearchAllResourcesRequest 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: + { + scope_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + query_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAssetTypesIsMutable(); + assetTypes_.add(s); + break; + } // case 26 + case 32: + { + pageSize_ = input.readInt32(); + + break; + } // case 32 + case 42: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + orderBy_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 66: + { + input.readMessage(getReadMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1.SearchAllResourcesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2807,7 +2755,18 @@ public SearchAllResourcesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SearchAllResourcesRequest(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesResponse.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesResponse.java index a5e70696e..da48ddded 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesResponse.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesResponse.java @@ -53,68 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SearchAllResourcesResponse( - 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)) { - results_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - results_.add( - input.readMessage( - com.google.cloud.asset.v1.ResourceSearchResult.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_SearchAllResourcesResponse_descriptor; @@ -277,7 +215,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -292,7 +230,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -310,7 +248,7 @@ public boolean equals(final java.lang.Object obj) { if (!getResultsList().equals(other.getResultsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -327,7 +265,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -456,19 +394,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.SearchAllResourcesResponse.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) { - getResultsFieldBuilder(); - } } @java.lang.Override @@ -476,10 +405,11 @@ public Builder clear() { super.clear(); if (resultsBuilder_ == null) { results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + results_ = null; resultsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -601,7 +531,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.SearchAllResourcesResponse ot nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -616,18 +546,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.SearchAllResourcesResponse 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.cloud.asset.v1.ResourceSearchResult m = + input.readMessage( + com.google.cloud.asset.v1.ResourceSearchResult.parser(), extensionRegistry); + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(m); + } else { + resultsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = 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.cloud.asset.v1.SearchAllResourcesResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1150,7 +1112,18 @@ public SearchAllResourcesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SearchAllResourcesResponse(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableFieldSchema.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableFieldSchema.java index 65693385b..9acb834fb 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableFieldSchema.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableFieldSchema.java @@ -55,81 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TableFieldSchema( - 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(); - - field_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - type_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - mode_ = s; - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - fields_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - fields_.add( - input.readMessage( - com.google.cloud.asset.v1.TableFieldSchema.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)) { - fields_ = java.util.Collections.unmodifiableList(fields_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_TableFieldSchema_descriptor; @@ -426,7 +351,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < fields_.size(); i++) { output.writeMessage(4, fields_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -447,7 +372,7 @@ public int getSerializedSize() { for (int i = 0; i < fields_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, fields_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -467,7 +392,7 @@ public boolean equals(final java.lang.Object obj) { if (!getType().equals(other.getType())) return false; if (!getMode().equals(other.getMode())) return false; if (!getFieldsList().equals(other.getFieldsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -488,7 +413,7 @@ public int hashCode() { hash = (37 * hash) + FIELDS_FIELD_NUMBER; hash = (53 * hash) + getFieldsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -617,19 +542,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.TableFieldSchema.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) { - getFieldsFieldBuilder(); - } } @java.lang.Override @@ -643,10 +559,11 @@ public Builder clear() { if (fieldsBuilder_ == null) { fields_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + fields_ = null; fieldsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -775,7 +692,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.TableFieldSchema other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -790,17 +707,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.TableFieldSchema 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: + { + field_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + type_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + mode_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + com.google.cloud.asset.v1.TableFieldSchema m = + input.readMessage( + com.google.cloud.asset.v1.TableFieldSchema.parser(), extensionRegistry); + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.add(m); + } else { + fieldsBuilder_.addMessage(m); + } + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.TableFieldSchema) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1608,7 +1570,18 @@ public TableFieldSchema parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TableFieldSchema(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableSchema.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableSchema.java index 1a4036a85..3561b44fc 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableSchema.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableSchema.java @@ -52,60 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TableSchema( - 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)) { - fields_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - fields_.add( - input.readMessage( - com.google.cloud.asset.v1.TableFieldSchema.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)) { - fields_ = java.util.Collections.unmodifiableList(fields_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_TableSchema_descriptor; @@ -207,7 +153,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < fields_.size(); i++) { output.writeMessage(1, fields_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -219,7 +165,7 @@ public int getSerializedSize() { for (int i = 0; i < fields_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, fields_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -235,7 +181,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.asset.v1.TableSchema other = (com.google.cloud.asset.v1.TableSchema) obj; if (!getFieldsList().equals(other.getFieldsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -250,7 +196,7 @@ public int hashCode() { hash = (37 * hash) + FIELDS_FIELD_NUMBER; hash = (53 * hash) + getFieldsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -378,19 +324,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.TableSchema.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) { - getFieldsFieldBuilder(); - } } @java.lang.Override @@ -398,10 +335,11 @@ public Builder clear() { super.clear(); if (fieldsBuilder_ == null) { fields_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + fields_ = null; fieldsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -515,7 +453,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.TableSchema other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -530,17 +468,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.TableSchema 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.cloud.asset.v1.TableFieldSchema m = + input.readMessage( + com.google.cloud.asset.v1.TableFieldSchema.parser(), extensionRegistry); + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.add(m); + } else { + fieldsBuilder_.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.cloud.asset.v1.TableSchema) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -927,7 +892,18 @@ public TableSchema parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TableSchema(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TemporalAsset.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TemporalAsset.java index 7b1a93540..eadbba5e6 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TemporalAsset.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TemporalAsset.java @@ -53,103 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TemporalAsset( - 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: - { - com.google.cloud.asset.v1.TimeWindow.Builder subBuilder = null; - if (window_ != null) { - subBuilder = window_.toBuilder(); - } - window_ = - input.readMessage( - com.google.cloud.asset.v1.TimeWindow.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(window_); - window_ = subBuilder.buildPartial(); - } - - break; - } - case 16: - { - deleted_ = input.readBool(); - break; - } - case 26: - { - com.google.cloud.asset.v1.Asset.Builder subBuilder = null; - if (asset_ != null) { - subBuilder = asset_.toBuilder(); - } - asset_ = - input.readMessage(com.google.cloud.asset.v1.Asset.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(asset_); - asset_ = subBuilder.buildPartial(); - } - - break; - } - case 32: - { - int rawValue = input.readEnum(); - - priorAssetState_ = rawValue; - break; - } - case 42: - { - com.google.cloud.asset.v1.Asset.Builder subBuilder = null; - if (priorAsset_ != null) { - subBuilder = priorAsset_.toBuilder(); - } - priorAsset_ = - input.readMessage(com.google.cloud.asset.v1.Asset.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(priorAsset_); - priorAsset_ = 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 com.google.cloud.asset.v1.AssetProto .internal_static_google_cloud_asset_v1_TemporalAsset_descriptor; @@ -596,7 +499,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (priorAsset_ != null) { output.writeMessage(5, getPriorAsset()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -622,7 +525,7 @@ public int getSerializedSize() { if (priorAsset_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getPriorAsset()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -651,7 +554,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPriorAsset()) { if (!getPriorAsset().equals(other.getPriorAsset())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -678,7 +581,7 @@ public int hashCode() { hash = (37 * hash) + PRIOR_ASSET_FIELD_NUMBER; hash = (53 * hash) + getPriorAsset().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -808,17 +711,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.TemporalAsset.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 @@ -954,7 +850,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.TemporalAsset other) { if (other.hasPriorAsset()) { mergePriorAsset(other.getPriorAsset()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -969,17 +865,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.TemporalAsset 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: + { + input.readMessage(getWindowFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 16: + { + deleted_ = input.readBool(); + + break; + } // case 16 + case 26: + { + input.readMessage(getAssetFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 32: + { + priorAssetState_ = input.readEnum(); + + break; + } // case 32 + case 42: + { + input.readMessage(getPriorAssetFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.TemporalAsset) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1719,7 +1659,18 @@ public TemporalAsset parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TemporalAsset(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TimeWindow.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TimeWindow.java index c38445e5f..ce73781a4 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TimeWindow.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TimeWindow.java @@ -50,75 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TimeWindow( - 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: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (startTime_ != null) { - subBuilder = startTime_.toBuilder(); - } - startTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(startTime_); - startTime_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (endTime_ != null) { - subBuilder = endTime_.toBuilder(); - } - endTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTime_); - endTime_ = 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 com.google.cloud.asset.v1.AssetProto .internal_static_google_cloud_asset_v1_TimeWindow_descriptor; @@ -249,7 +180,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (endTime_ != null) { output.writeMessage(2, getEndTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -264,7 +195,7 @@ public int getSerializedSize() { if (endTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -287,7 +218,7 @@ public boolean equals(final java.lang.Object obj) { if (hasEndTime()) { if (!getEndTime().equals(other.getEndTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -306,7 +237,7 @@ public int hashCode() { hash = (37 * hash) + END_TIME_FIELD_NUMBER; hash = (53 * hash) + getEndTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -434,17 +365,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.TimeWindow.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 @@ -553,7 +477,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.TimeWindow other) { if (other.hasEndTime()) { mergeEndTime(other.getEndTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -568,17 +492,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.TimeWindow 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: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + 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.cloud.asset.v1.TimeWindow) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -981,7 +931,18 @@ public TimeWindow parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TimeWindow(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateFeedRequest.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateFeedRequest.java index 1131722a8..f856fc9af 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateFeedRequest.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateFeedRequest.java @@ -50,74 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateFeedRequest( - 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: - { - com.google.cloud.asset.v1.Feed.Builder subBuilder = null; - if (feed_ != null) { - subBuilder = feed_.toBuilder(); - } - feed_ = input.readMessage(com.google.cloud.asset.v1.Feed.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(feed_); - feed_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = 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 com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_UpdateFeedRequest_descriptor; @@ -266,7 +198,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateMask_ != null) { output.writeMessage(2, getUpdateMask()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -281,7 +213,7 @@ public int getSerializedSize() { if (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -305,7 +237,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateMask()) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -324,7 +256,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; hash = (53 * hash) + getUpdateMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -453,17 +385,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.UpdateFeedRequest.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 @@ -573,7 +498,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.UpdateFeedRequest other) { if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -588,17 +513,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.UpdateFeedRequest 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: + { + input.readMessage(getFeedFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + 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.cloud.asset.v1.UpdateFeedRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1058,7 +1009,18 @@ public UpdateFeedRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateFeedRequest(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateSavedQueryRequest.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateSavedQueryRequest.java index 5723995e0..d922bb788 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateSavedQueryRequest.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateSavedQueryRequest.java @@ -50,76 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateSavedQueryRequest( - 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: - { - com.google.cloud.asset.v1.SavedQuery.Builder subBuilder = null; - if (savedQuery_ != null) { - subBuilder = savedQuery_.toBuilder(); - } - savedQuery_ = - input.readMessage( - com.google.cloud.asset.v1.SavedQuery.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(savedQuery_); - savedQuery_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = 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 com.google.cloud.asset.v1.AssetServiceProto .internal_static_google_cloud_asset_v1_UpdateSavedQueryRequest_descriptor; @@ -273,7 +203,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateMask_ != null) { output.writeMessage(2, getUpdateMask()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -288,7 +218,7 @@ public int getSerializedSize() { if (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -312,7 +242,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateMask()) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -331,7 +261,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; hash = (53 * hash) + getUpdateMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -460,17 +390,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.UpdateSavedQueryRequest.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 @@ -581,7 +504,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.UpdateSavedQueryRequest other if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -596,18 +519,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.UpdateSavedQueryRequest 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: + { + input.readMessage(getSavedQueryFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + 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.cloud.asset.v1.UpdateSavedQueryRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1083,7 +1031,18 @@ public UpdateSavedQueryRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateSavedQueryRequest(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/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/VersionedResource.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/VersionedResource.java index 3e263497a..59377941f 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/VersionedResource.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/VersionedResource.java @@ -53,66 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private VersionedResource( - 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(); - - version_ = s; - break; - } - case 18: - { - com.google.protobuf.Struct.Builder subBuilder = null; - if (resource_ != null) { - subBuilder = resource_.toBuilder(); - } - resource_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(resource_); - resource_ = 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 com.google.cloud.asset.v1.AssetProto .internal_static_google_cloud_asset_v1_VersionedResource_descriptor; @@ -278,7 +218,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (resource_ != null) { output.writeMessage(2, getResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -293,7 +233,7 @@ public int getSerializedSize() { if (resource_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -314,7 +254,7 @@ public boolean equals(final java.lang.Object obj) { if (hasResource()) { if (!getResource().equals(other.getResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -331,7 +271,7 @@ public int hashCode() { hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -461,17 +401,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1.VersionedResource.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 @@ -574,7 +507,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1.VersionedResource other) { if (other.hasResource()) { mergeResource(other.getResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -589,17 +522,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1.VersionedResource 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: + { + version_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getResourceFieldBuilder().getBuilder(), extensionRegistry); + + 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.cloud.asset.v1.VersionedResource) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1021,7 +980,18 @@ public VersionedResource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new VersionedResource(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/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/IamPolicySearchResult.java b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/IamPolicySearchResult.java index 674f16a22..42810c37d 100644 --- a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/IamPolicySearchResult.java +++ b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/IamPolicySearchResult.java @@ -53,91 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private IamPolicySearchResult( - 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(); - - resource_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 34: - { - com.google.iam.v1.Policy.Builder subBuilder = null; - if (policy_ != null) { - subBuilder = policy_.toBuilder(); - } - policy_ = input.readMessage(com.google.iam.v1.Policy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(policy_); - policy_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.Builder - subBuilder = null; - if (explanation_ != null) { - subBuilder = explanation_.toBuilder(); - } - explanation_ = - input.readMessage( - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(explanation_); - explanation_ = 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 com.google.cloud.asset.v1p1beta1.AssetProto .internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_descriptor; @@ -276,65 +191,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Explanation( - 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)) { - matchedPermissions_ = - com.google.protobuf.MapField.newMapField( - MatchedPermissionsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.asset.v1p1beta1.Permissions> - matchedPermissions__ = - input.readMessage( - MatchedPermissionsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - matchedPermissions_ - .getMutableMap() - .put(matchedPermissions__.getKey(), matchedPermissions__.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 com.google.cloud.asset.v1p1beta1.AssetProto .internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_descriptor; @@ -513,7 +369,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io internalGetMatchedPermissions(), MatchedPermissionsDefaultEntryHolder.defaultEntry, 1); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -533,7 +389,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, matchedPermissions__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -551,7 +407,7 @@ public boolean equals(final java.lang.Object obj) { if (!internalGetMatchedPermissions().equals(other.internalGetMatchedPermissions())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -566,7 +422,7 @@ public int hashCode() { hash = (37 * hash) + MATCHED_PERMISSIONS_FIELD_NUMBER; hash = (53 * hash) + internalGetMatchedPermissions().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -720,17 +576,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { // Construct using // com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.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 @@ -825,7 +674,7 @@ public Builder mergeFrom( == com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation .getDefaultInstance()) return this; internalGetMutableMatchedPermissions().mergeFrom(other.internalGetMatchedPermissions()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -840,19 +689,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation 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.protobuf.MapEntry< + java.lang.String, com.google.cloud.asset.v1p1beta1.Permissions> + matchedPermissions__ = + input.readMessage( + MatchedPermissionsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableMatchedPermissions() + .getMutableMap() + .put(matchedPermissions__.getKey(), matchedPermissions__.getValue()); + 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.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1102,7 +976,19 @@ public Explanation parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Explanation(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(); } }; @@ -1365,7 +1251,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (explanation_ != null) { output.writeMessage(5, getExplanation()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1386,7 +1272,7 @@ public int getSerializedSize() { if (explanation_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getExplanation()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1412,7 +1298,7 @@ public boolean equals(final java.lang.Object obj) { if (hasExplanation()) { if (!getExplanation().equals(other.getExplanation())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1435,7 +1321,7 @@ public int hashCode() { hash = (37 * hash) + EXPLANATION_FIELD_NUMBER; hash = (53 * hash) + getExplanation().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1565,17 +1451,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.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 @@ -1700,7 +1579,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p1beta1.IamPolicySearchResult if (other.hasExplanation()) { mergeExplanation(other.getExplanation()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1715,18 +1594,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult 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: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 26: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + input.readMessage(getPolicyFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 42: + { + input.readMessage(getExplanationFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1p1beta1.IamPolicySearchResult) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2411,7 +2327,18 @@ public IamPolicySearchResult parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new IamPolicySearchResult(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/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/Permissions.java b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/Permissions.java index 46891f376..8d6661e4d 100644 --- a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/Permissions.java +++ b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/Permissions.java @@ -52,59 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Permissions( - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - permissions_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - permissions_.add(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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - permissions_ = permissions_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1p1beta1.AssetProto .internal_static_google_cloud_asset_v1p1beta1_Permissions_descriptor; @@ -198,7 +145,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < permissions_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, permissions_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -215,7 +162,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getPermissionsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -232,7 +179,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.asset.v1p1beta1.Permissions) obj; if (!getPermissionsList().equals(other.getPermissionsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -247,7 +194,7 @@ public int hashCode() { hash = (37 * hash) + PERMISSIONS_FIELD_NUMBER; hash = (53 * hash) + getPermissionsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -376,17 +323,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p1beta1.Permissions.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 @@ -486,7 +426,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p1beta1.Permissions other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -501,17 +441,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p1beta1.Permissions 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: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePermissionsIsMutable(); + permissions_.add(s); + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p1beta1.Permissions) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -717,7 +678,18 @@ public Permissions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Permissions(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/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesRequest.java b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesRequest.java index 5a6167667..c87b27cc8 100644 --- a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesRequest.java +++ b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesRequest.java @@ -54,71 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SearchAllIamPoliciesRequest( - 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(); - - scope_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - query_ = s; - break; - } - case 24: - { - pageSize_ = input.readInt32(); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = 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.cloud.asset.v1p1beta1.AssetServiceProto .internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesRequest_descriptor; @@ -350,7 +285,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -371,7 +306,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -391,7 +326,7 @@ public boolean equals(final java.lang.Object obj) { if (!getQuery().equals(other.getQuery())) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -410,7 +345,7 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -540,17 +475,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest.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 @@ -662,7 +590,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRe pageToken_ = other.pageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -677,18 +605,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest 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: + { + scope_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + query_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + pageSize_ = input.readInt32(); + + break; + } // case 24 + case 34: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1159,7 +1124,18 @@ public SearchAllIamPoliciesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SearchAllIamPoliciesRequest(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/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesResponse.java b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesResponse.java index 7893f7cc7..90bf5add9 100644 --- a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesResponse.java +++ b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesResponse.java @@ -53,70 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SearchAllIamPoliciesResponse( - 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)) { - results_ = - new java.util.ArrayList< - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult>(); - mutable_bitField0_ |= 0x00000001; - } - results_.add( - input.readMessage( - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.parser(), - extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1p1beta1.AssetServiceProto .internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesResponse_descriptor; @@ -280,7 +216,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -295,7 +231,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -313,7 +249,7 @@ public boolean equals(final java.lang.Object obj) { if (!getResultsList().equals(other.getResultsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -330,7 +266,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -460,19 +396,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse.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) { - getResultsFieldBuilder(); - } } @java.lang.Override @@ -480,10 +407,11 @@ public Builder clear() { super.clear(); if (resultsBuilder_ == null) { results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + results_ = null; resultsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -607,7 +535,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRe nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -622,19 +550,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse 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.cloud.asset.v1p1beta1.IamPolicySearchResult m = + input.readMessage( + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.parser(), + extensionRegistry); + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(m); + } else { + resultsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = 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.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1166,7 +1126,18 @@ public SearchAllIamPoliciesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SearchAllIamPoliciesResponse(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/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesRequest.java b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesRequest.java index c872d832f..190b04f38 100644 --- a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesRequest.java +++ b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesRequest.java @@ -56,92 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SearchAllResourcesRequest( - 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(); - - scope_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - query_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - assetTypes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assetTypes_.add(s); - break; - } - case 32: - { - pageSize_ = input.readInt32(); - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - assetTypes_ = assetTypes_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1p1beta1.AssetServiceProto .internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesRequest_descriptor; @@ -493,7 +407,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 10, orderBy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -525,7 +439,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, orderBy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -547,7 +461,7 @@ public boolean equals(final java.lang.Object obj) { if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; if (!getOrderBy().equals(other.getOrderBy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -572,7 +486,7 @@ public int hashCode() { hash = (53 * hash) + getPageToken().hashCode(); hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; hash = (53 * hash) + getOrderBy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -702,17 +616,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest.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 @@ -847,7 +754,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequ orderBy_ = other.orderBy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -862,18 +769,68 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest 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: + { + scope_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + query_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAssetTypesIsMutable(); + assetTypes_.add(s); + break; + } // case 26 + case 32: + { + pageSize_ = input.readInt32(); + + break; + } // case 32 + case 42: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 82: + { + orderBy_ = input.readStringRequireUtf8(); + + break; + } // case 82 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1628,7 +1585,18 @@ public SearchAllResourcesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SearchAllResourcesRequest(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/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesResponse.java b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesResponse.java index 4e85d5501..fb5e99395 100644 --- a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesResponse.java +++ b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesResponse.java @@ -53,70 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SearchAllResourcesResponse( - 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)) { - results_ = - new java.util.ArrayList< - com.google.cloud.asset.v1p1beta1.StandardResourceMetadata>(); - mutable_bitField0_ |= 0x00000001; - } - results_.add( - input.readMessage( - com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.parser(), - extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1p1beta1.AssetServiceProto .internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesResponse_descriptor; @@ -277,7 +213,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -292,7 +228,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -310,7 +246,7 @@ public boolean equals(final java.lang.Object obj) { if (!getResultsList().equals(other.getResultsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -327,7 +263,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -457,19 +393,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse.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) { - getResultsFieldBuilder(); - } } @java.lang.Override @@ -477,10 +404,11 @@ public Builder clear() { super.clear(); if (resultsBuilder_ == null) { results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + results_ = null; resultsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -602,7 +530,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p1beta1.SearchAllResourcesResp nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -617,18 +545,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse 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.cloud.asset.v1p1beta1.StandardResourceMetadata m = + input.readMessage( + com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.parser(), + extensionRegistry); + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(m); + } else { + resultsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = 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.cloud.asset.v1p1beta1.SearchAllResourcesResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1147,7 +1108,18 @@ public SearchAllResourcesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SearchAllResourcesResponse(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/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/StandardResourceMetadata.java b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/StandardResourceMetadata.java index 670f18077..c0e711d3c 100644 --- a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/StandardResourceMetadata.java +++ b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/StandardResourceMetadata.java @@ -59,127 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private StandardResourceMetadata( - 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(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - assetType_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - additionalAttributes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - additionalAttributes_.add(s); - break; - } - case 90: - { - java.lang.String s = input.readStringRequireUtf8(); - - location_ = s; - break; - } - case 98: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - break; - } - case 106: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - networkTags_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - networkTags_.add(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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - additionalAttributes_ = additionalAttributes_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - networkTags_ = networkTags_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1p1beta1.AssetProto .internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_descriptor; @@ -805,7 +684,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < networkTags_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 13, networkTags_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -858,7 +737,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getNetworkTagsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -883,7 +762,7 @@ public boolean equals(final java.lang.Object obj) { if (!getLocation().equals(other.getLocation())) return false; if (!internalGetLabels().equals(other.internalGetLabels())) return false; if (!getNetworkTagsList().equals(other.getNetworkTagsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -918,7 +797,7 @@ public int hashCode() { hash = (37 * hash) + NETWORK_TAGS_FIELD_NUMBER; hash = (53 * hash) + getNetworkTagsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1068,17 +947,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.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 @@ -1242,7 +1114,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p1beta1.StandardResourceMetada } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1257,18 +1129,92 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p1beta1.StandardResourceMetadata 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: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + assetType_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + displayName_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAdditionalAttributesIsMutable(); + additionalAttributes_.add(s); + break; + } // case 82 + case 90: + { + location_ = input.readStringRequireUtf8(); + + break; + } // case 90 + case 98: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 98 + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureNetworkTagsIsMutable(); + networkTags_.add(s); + break; + } // case 106 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1p1beta1.StandardResourceMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2535,7 +2481,18 @@ public StandardResourceMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new StandardResourceMetadata(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/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Asset.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Asset.java index 704e28ff5..f49ec7068 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Asset.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Asset.java @@ -55,103 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Asset( - 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(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - assetType_ = s; - break; - } - case 26: - { - com.google.cloud.asset.v1p2beta1.Resource.Builder subBuilder = null; - if (resource_ != null) { - subBuilder = resource_.toBuilder(); - } - resource_ = - input.readMessage( - com.google.cloud.asset.v1p2beta1.Resource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(resource_); - resource_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - com.google.iam.v1.Policy.Builder subBuilder = null; - if (iamPolicy_ != null) { - subBuilder = iamPolicy_.toBuilder(); - } - iamPolicy_ = input.readMessage(com.google.iam.v1.Policy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(iamPolicy_); - iamPolicy_ = subBuilder.buildPartial(); - } - - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - ancestors_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - ancestors_.add(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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - ancestors_ = ancestors_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1p2beta1.AssetProto .internal_static_google_cloud_asset_v1p2beta1_Asset_descriptor; @@ -476,7 +379,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < ancestors_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, ancestors_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -505,7 +408,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getAncestorsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -531,7 +434,7 @@ public boolean equals(final java.lang.Object obj) { if (!getIamPolicy().equals(other.getIamPolicy())) return false; } if (!getAncestorsList().equals(other.getAncestorsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -558,7 +461,7 @@ public int hashCode() { hash = (37 * hash) + ANCESTORS_FIELD_NUMBER; hash = (53 * hash) + getAncestorsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -688,17 +591,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p2beta1.Asset.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 @@ -840,7 +736,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.Asset other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -855,17 +751,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.Asset 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: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + assetType_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + input.readMessage(getIamPolicyFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAncestorsIsMutable(); + ancestors_.add(s); + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p2beta1.Asset) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1712,7 +1653,18 @@ public Asset parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Asset(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/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/CreateFeedRequest.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/CreateFeedRequest.java index bac9e67c1..dbe32425d 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/CreateFeedRequest.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/CreateFeedRequest.java @@ -53,75 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateFeedRequest( - 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(); - - feedId_ = s; - break; - } - case 26: - { - com.google.cloud.asset.v1p2beta1.Feed.Builder subBuilder = null; - if (feed_ != null) { - subBuilder = feed_.toBuilder(); - } - feed_ = - input.readMessage( - com.google.cloud.asset.v1p2beta1.Feed.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(feed_); - feed_ = 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 com.google.cloud.asset.v1p2beta1.AssetServiceProto .internal_static_google_cloud_asset_v1p2beta1_CreateFeedRequest_descriptor; @@ -329,7 +260,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (feed_ != null) { output.writeMessage(3, getFeed()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -347,7 +278,7 @@ public int getSerializedSize() { if (feed_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getFeed()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -369,7 +300,7 @@ public boolean equals(final java.lang.Object obj) { if (hasFeed()) { if (!getFeed().equals(other.getFeed())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -388,7 +319,7 @@ public int hashCode() { hash = (37 * hash) + FEED_FIELD_NUMBER; hash = (53 * hash) + getFeed().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -517,17 +448,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p2beta1.CreateFeedRequest.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 @@ -638,7 +562,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.CreateFeedRequest othe if (other.hasFeed()) { mergeFeed(other.getFeed()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -653,18 +577,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.CreateFeedRequest 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: + { + feedId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getFeedFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1p2beta1.CreateFeedRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1163,7 +1118,18 @@ public CreateFeedRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateFeedRequest(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/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/DeleteFeedRequest.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/DeleteFeedRequest.java index efbf7b40d..6fedeb098 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/DeleteFeedRequest.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/DeleteFeedRequest.java @@ -44,52 +44,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteFeedRequest( - 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(); - - name_ = 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.cloud.asset.v1p2beta1.AssetServiceProto .internal_static_google_cloud_asset_v1p2beta1_DeleteFeedRequest_descriptor; @@ -181,7 +135,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -193,7 +147,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -210,7 +164,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.asset.v1p2beta1.DeleteFeedRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -223,7 +177,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -344,17 +298,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p2beta1.DeleteFeedRequest.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 @@ -444,7 +391,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.DeleteFeedRequest othe name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -459,18 +406,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.DeleteFeedRequest 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: + { + name_ = input.readStringRequireUtf8(); + + 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.cloud.asset.v1p2beta1.DeleteFeedRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -637,7 +603,18 @@ public DeleteFeedRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteFeedRequest(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/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Feed.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Feed.java index 44085428c..dc4c7d01a 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Feed.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Feed.java @@ -59,103 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Feed( - 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(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - assetNames_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assetNames_.add(s); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - assetTypes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - assetTypes_.add(s); - break; - } - case 32: - { - int rawValue = input.readEnum(); - - contentType_ = rawValue; - break; - } - case 42: - { - com.google.cloud.asset.v1p2beta1.FeedOutputConfig.Builder subBuilder = null; - if (feedOutputConfig_ != null) { - subBuilder = feedOutputConfig_.toBuilder(); - } - feedOutputConfig_ = - input.readMessage( - com.google.cloud.asset.v1p2beta1.FeedOutputConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(feedOutputConfig_); - feedOutputConfig_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - assetNames_ = assetNames_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - assetTypes_ = assetTypes_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1p2beta1.AssetServiceProto .internal_static_google_cloud_asset_v1p2beta1_Feed_descriptor; @@ -529,7 +432,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (feedOutputConfig_ != null) { output.writeMessage(5, getFeedOutputConfig()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -564,7 +467,7 @@ public int getSerializedSize() { if (feedOutputConfig_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getFeedOutputConfig()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -587,7 +490,7 @@ public boolean equals(final java.lang.Object obj) { if (hasFeedOutputConfig()) { if (!getFeedOutputConfig().equals(other.getFeedOutputConfig())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -614,7 +517,7 @@ public int hashCode() { hash = (37 * hash) + FEED_OUTPUT_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getFeedOutputConfig().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -746,17 +649,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p2beta1.Feed.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 @@ -900,7 +796,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.Feed other) { if (other.hasFeedOutputConfig()) { mergeFeedOutputConfig(other.getFeedOutputConfig()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -915,17 +811,64 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.Feed 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: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAssetNamesIsMutable(); + assetNames_.add(s); + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAssetTypesIsMutable(); + assetTypes_.add(s); + break; + } // case 26 + case 32: + { + contentType_ = input.readEnum(); + + break; + } // case 32 + case 42: + { + input.readMessage( + getFeedOutputConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p2beta1.Feed) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1857,7 +1800,18 @@ public Feed parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Feed(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/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedOutputConfig.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedOutputConfig.java index ee1dfa076..2ff65d94b 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedOutputConfig.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedOutputConfig.java @@ -50,64 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FeedOutputConfig( - 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: - { - com.google.cloud.asset.v1p2beta1.PubsubDestination.Builder subBuilder = null; - if (destinationCase_ == 1) { - subBuilder = - ((com.google.cloud.asset.v1p2beta1.PubsubDestination) destination_).toBuilder(); - } - destination_ = - input.readMessage( - com.google.cloud.asset.v1p2beta1.PubsubDestination.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.asset.v1p2beta1.PubsubDestination) destination_); - destination_ = subBuilder.buildPartial(); - } - destinationCase_ = 1; - 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.cloud.asset.v1p2beta1.AssetServiceProto .internal_static_google_cloud_asset_v1p2beta1_FeedOutputConfig_descriptor; @@ -236,7 +178,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (destinationCase_ == 1) { output.writeMessage(1, (com.google.cloud.asset.v1p2beta1.PubsubDestination) destination_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -250,7 +192,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 1, (com.google.cloud.asset.v1p2beta1.PubsubDestination) destination_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -274,7 +216,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -293,7 +235,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -422,22 +364,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p2beta1.FeedOutputConfig.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 public Builder clear() { super.clear(); + if (pubsubDestinationBuilder_ != null) { + pubsubDestinationBuilder_.clear(); + } destinationCase_ = 0; destination_ = null; return this; @@ -536,7 +474,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.FeedOutputConfig other break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -551,18 +489,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.FeedOutputConfig 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: + { + input.readMessage( + getPubsubDestinationFieldBuilder().getBuilder(), extensionRegistry); + destinationCase_ = 1; + 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.cloud.asset.v1p2beta1.FeedOutputConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -826,7 +784,18 @@ public FeedOutputConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FeedOutputConfig(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/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GcsDestination.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GcsDestination.java index 614e99188..2dfab0e23 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GcsDestination.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GcsDestination.java @@ -50,52 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GcsDestination( - 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(); - objectUriCase_ = 1; - objectUri_ = 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.cloud.asset.v1p2beta1.AssetServiceProto .internal_static_google_cloud_asset_v1p2beta1_GcsDestination_descriptor; @@ -254,7 +208,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (objectUriCase_ == 1) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, objectUri_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -266,7 +220,7 @@ public int getSerializedSize() { if (objectUriCase_ == 1) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, objectUri_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -290,7 +244,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -309,7 +263,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -438,17 +392,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p2beta1.GcsDestination.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 @@ -550,7 +497,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.GcsDestination other) break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -565,17 +512,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.GcsDestination 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: + { + java.lang.String s = input.readStringRequireUtf8(); + objectUriCase_ = 1; + objectUri_ = s; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p2beta1.GcsDestination) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -783,7 +751,18 @@ public GcsDestination parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GcsDestination(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/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GetFeedRequest.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GetFeedRequest.java index 3540a81af..bce71c013 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GetFeedRequest.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GetFeedRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetFeedRequest( - 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(); - - name_ = 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.cloud.asset.v1p2beta1.AssetServiceProto .internal_static_google_cloud_asset_v1p2beta1_GetFeedRequest_descriptor; @@ -189,7 +143,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -201,7 +155,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -218,7 +172,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.asset.v1p2beta1.GetFeedRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -231,7 +185,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -360,17 +314,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p2beta1.GetFeedRequest.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 @@ -460,7 +407,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.GetFeedRequest other) name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -475,17 +422,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.GetFeedRequest 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: + { + name_ = input.readStringRequireUtf8(); + + 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.cloud.asset.v1p2beta1.GetFeedRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -652,7 +619,18 @@ public GetFeedRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetFeedRequest(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/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsRequest.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsRequest.java index 3c4df6dd0..cdcf0600a 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsRequest.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListFeedsRequest( - 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; - } - 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.cloud.asset.v1p2beta1.AssetServiceProto .internal_static_google_cloud_asset_v1p2beta1_ListFeedsRequest_descriptor; @@ -183,7 +137,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -195,7 +149,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -212,7 +166,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.asset.v1p2beta1.ListFeedsRequest) obj; if (!getParent().equals(other.getParent())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -225,7 +179,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PARENT_FIELD_NUMBER; hash = (53 * hash) + getParent().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -354,17 +308,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p2beta1.ListFeedsRequest.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 @@ -454,7 +401,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.ListFeedsRequest other parent_ = other.parent_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -469,18 +416,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.ListFeedsRequest 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 + default: + { + 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.cloud.asset.v1p2beta1.ListFeedsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -632,7 +598,18 @@ public ListFeedsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListFeedsRequest(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/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsResponse.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsResponse.java index 84c147ebf..c816df074 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsResponse.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsResponse.java @@ -44,60 +44,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListFeedsResponse( - 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)) { - feeds_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - feeds_.add( - input.readMessage( - com.google.cloud.asset.v1p2beta1.Feed.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)) { - feeds_ = java.util.Collections.unmodifiableList(feeds_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1p2beta1.AssetServiceProto .internal_static_google_cloud_asset_v1p2beta1_ListFeedsResponse_descriptor; @@ -199,7 +145,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < feeds_.size(); i++) { output.writeMessage(1, feeds_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -211,7 +157,7 @@ public int getSerializedSize() { for (int i = 0; i < feeds_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, feeds_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -228,7 +174,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.asset.v1p2beta1.ListFeedsResponse) obj; if (!getFeedsList().equals(other.getFeedsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -243,7 +189,7 @@ public int hashCode() { hash = (37 * hash) + FEEDS_FIELD_NUMBER; hash = (53 * hash) + getFeedsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -364,19 +310,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p2beta1.ListFeedsResponse.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) { - getFeedsFieldBuilder(); - } } @java.lang.Override @@ -384,10 +321,11 @@ public Builder clear() { super.clear(); if (feedsBuilder_ == null) { feeds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + feeds_ = null; feedsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -502,7 +440,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.ListFeedsResponse othe } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -517,18 +455,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.ListFeedsResponse 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.cloud.asset.v1p2beta1.Feed m = + input.readMessage( + com.google.cloud.asset.v1p2beta1.Feed.parser(), extensionRegistry); + if (feedsBuilder_ == null) { + ensureFeedsIsMutable(); + feeds_.add(m); + } else { + feedsBuilder_.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.cloud.asset.v1p2beta1.ListFeedsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -914,7 +878,18 @@ public ListFeedsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListFeedsResponse(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/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/OutputConfig.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/OutputConfig.java index f2ed4e0bb..dea082679 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/OutputConfig.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/OutputConfig.java @@ -50,63 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private OutputConfig( - 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: - { - com.google.cloud.asset.v1p2beta1.GcsDestination.Builder subBuilder = null; - if (destinationCase_ == 1) { - subBuilder = - ((com.google.cloud.asset.v1p2beta1.GcsDestination) destination_).toBuilder(); - } - destination_ = - input.readMessage( - com.google.cloud.asset.v1p2beta1.GcsDestination.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.asset.v1p2beta1.GcsDestination) destination_); - destination_ = subBuilder.buildPartial(); - } - destinationCase_ = 1; - 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.cloud.asset.v1p2beta1.AssetServiceProto .internal_static_google_cloud_asset_v1p2beta1_OutputConfig_descriptor; @@ -234,7 +177,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (destinationCase_ == 1) { output.writeMessage(1, (com.google.cloud.asset.v1p2beta1.GcsDestination) destination_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -248,7 +191,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 1, (com.google.cloud.asset.v1p2beta1.GcsDestination) destination_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -272,7 +215,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -291,7 +234,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -420,22 +363,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p2beta1.OutputConfig.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 public Builder clear() { super.clear(); + if (gcsDestinationBuilder_ != null) { + gcsDestinationBuilder_.clear(); + } destinationCase_ = 0; destination_ = null; return this; @@ -533,7 +472,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.OutputConfig other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -548,17 +487,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.OutputConfig 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: + { + input.readMessage(getGcsDestinationFieldBuilder().getBuilder(), extensionRegistry); + destinationCase_ = 1; + 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.cloud.asset.v1p2beta1.OutputConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -819,7 +778,18 @@ public OutputConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OutputConfig(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/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/PubsubDestination.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/PubsubDestination.java index 5f5caea81..8481f47ac 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/PubsubDestination.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/PubsubDestination.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PubsubDestination( - 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(); - - topic_ = 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.cloud.asset.v1p2beta1.AssetServiceProto .internal_static_google_cloud_asset_v1p2beta1_PubsubDestination_descriptor; @@ -181,7 +135,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, topic_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -193,7 +147,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, topic_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -210,7 +164,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.asset.v1p2beta1.PubsubDestination) obj; if (!getTopic().equals(other.getTopic())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -223,7 +177,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TOPIC_FIELD_NUMBER; hash = (53 * hash) + getTopic().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -352,17 +306,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p2beta1.PubsubDestination.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 @@ -452,7 +399,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.PubsubDestination othe topic_ = other.topic_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -467,18 +414,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.PubsubDestination 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: + { + topic_ = input.readStringRequireUtf8(); + + 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.cloud.asset.v1p2beta1.PubsubDestination) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -625,7 +591,18 @@ public PubsubDestination parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PubsubDestination(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/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Resource.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Resource.java index 8de2f53df..b2091f4fb 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Resource.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Resource.java @@ -56,94 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Resource( - 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(); - - version_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - discoveryDocumentUri_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - discoveryName_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - resourceUrl_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 50: - { - com.google.protobuf.Struct.Builder subBuilder = null; - if (data_ != null) { - subBuilder = data_.toBuilder(); - } - data_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(data_); - data_ = 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 com.google.cloud.asset.v1p2beta1.AssetProto .internal_static_google_cloud_asset_v1p2beta1_Resource_descriptor; @@ -521,7 +433,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (data_ != null) { output.writeMessage(6, getData()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -548,7 +460,7 @@ public int getSerializedSize() { if (data_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getData()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -573,7 +485,7 @@ public boolean equals(final java.lang.Object obj) { if (hasData()) { if (!getData().equals(other.getData())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -598,7 +510,7 @@ public int hashCode() { hash = (37 * hash) + DATA_FIELD_NUMBER; hash = (53 * hash) + getData().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -727,17 +639,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p2beta1.Resource.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 @@ -868,7 +773,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.Resource other) { if (other.hasData()) { mergeData(other.getData()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -883,17 +788,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.Resource 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: + { + version_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + discoveryDocumentUri_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + discoveryName_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + resourceUrl_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + input.readMessage(getDataFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p2beta1.Resource) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1735,7 +1690,18 @@ public Resource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Resource(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/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TemporalAsset.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TemporalAsset.java index 10b8a416d..9851bfadf 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TemporalAsset.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TemporalAsset.java @@ -51,82 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TemporalAsset( - 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: - { - com.google.cloud.asset.v1p2beta1.TimeWindow.Builder subBuilder = null; - if (window_ != null) { - subBuilder = window_.toBuilder(); - } - window_ = - input.readMessage( - com.google.cloud.asset.v1p2beta1.TimeWindow.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(window_); - window_ = subBuilder.buildPartial(); - } - - break; - } - case 16: - { - deleted_ = input.readBool(); - break; - } - case 26: - { - com.google.cloud.asset.v1p2beta1.Asset.Builder subBuilder = null; - if (asset_ != null) { - subBuilder = asset_.toBuilder(); - } - asset_ = - input.readMessage( - com.google.cloud.asset.v1p2beta1.Asset.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(asset_); - asset_ = 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 com.google.cloud.asset.v1p2beta1.AssetProto .internal_static_google_cloud_asset_v1p2beta1_TemporalAsset_descriptor; @@ -277,7 +201,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (asset_ != null) { output.writeMessage(3, getAsset()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -295,7 +219,7 @@ public int getSerializedSize() { if (asset_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAsset()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -320,7 +244,7 @@ public boolean equals(final java.lang.Object obj) { if (hasAsset()) { if (!getAsset().equals(other.getAsset())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -341,7 +265,7 @@ public int hashCode() { hash = (37 * hash) + ASSET_FIELD_NUMBER; hash = (53 * hash) + getAsset().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -471,17 +395,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p2beta1.TemporalAsset.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 @@ -597,7 +514,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.TemporalAsset other) { if (other.hasAsset()) { mergeAsset(other.getAsset()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -612,17 +529,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.TemporalAsset 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: + { + input.readMessage(getWindowFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 16: + { + deleted_ = input.readBool(); + + break; + } // case 16 + case 26: + { + input.readMessage(getAssetFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p2beta1.TemporalAsset) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1080,7 +1029,18 @@ public TemporalAsset parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TemporalAsset(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/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TimeWindow.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TimeWindow.java index af7ed1677..a169a8f49 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TimeWindow.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TimeWindow.java @@ -50,75 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TimeWindow( - 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: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (startTime_ != null) { - subBuilder = startTime_.toBuilder(); - } - startTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(startTime_); - startTime_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (endTime_ != null) { - subBuilder = endTime_.toBuilder(); - } - endTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTime_); - endTime_ = 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 com.google.cloud.asset.v1p2beta1.AssetProto .internal_static_google_cloud_asset_v1p2beta1_TimeWindow_descriptor; @@ -249,7 +180,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (endTime_ != null) { output.writeMessage(2, getEndTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -264,7 +195,7 @@ public int getSerializedSize() { if (endTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -288,7 +219,7 @@ public boolean equals(final java.lang.Object obj) { if (hasEndTime()) { if (!getEndTime().equals(other.getEndTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -307,7 +238,7 @@ public int hashCode() { hash = (37 * hash) + END_TIME_FIELD_NUMBER; hash = (53 * hash) + getEndTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -436,17 +367,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p2beta1.TimeWindow.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 @@ -556,7 +480,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.TimeWindow other) { if (other.hasEndTime()) { mergeEndTime(other.getEndTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -571,17 +495,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.TimeWindow 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: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + 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.cloud.asset.v1p2beta1.TimeWindow) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -984,7 +934,18 @@ public TimeWindow parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TimeWindow(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/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/UpdateFeedRequest.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/UpdateFeedRequest.java index 040fd53d6..698bef635 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/UpdateFeedRequest.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/UpdateFeedRequest.java @@ -50,76 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateFeedRequest( - 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: - { - com.google.cloud.asset.v1p2beta1.Feed.Builder subBuilder = null; - if (feed_ != null) { - subBuilder = feed_.toBuilder(); - } - feed_ = - input.readMessage( - com.google.cloud.asset.v1p2beta1.Feed.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(feed_); - feed_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = 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 com.google.cloud.asset.v1p2beta1.AssetServiceProto .internal_static_google_cloud_asset_v1p2beta1_UpdateFeedRequest_descriptor; @@ -271,7 +201,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateMask_ != null) { output.writeMessage(2, getUpdateMask()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -286,7 +216,7 @@ public int getSerializedSize() { if (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -310,7 +240,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateMask()) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -329,7 +259,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; hash = (53 * hash) + getUpdateMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -458,17 +388,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p2beta1.UpdateFeedRequest.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 @@ -579,7 +502,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.UpdateFeedRequest othe if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -594,18 +517,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.UpdateFeedRequest 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: + { + input.readMessage(getFeedFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + 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.cloud.asset.v1p2beta1.UpdateFeedRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1077,7 +1025,18 @@ public UpdateFeedRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateFeedRequest(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/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/Asset.java b/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/Asset.java index 47f349745..2e171f14a 100644 --- a/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/Asset.java +++ b/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/Asset.java @@ -56,182 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Asset( - 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(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - assetType_ = s; - break; - } - case 26: - { - com.google.cloud.asset.v1p5beta1.Resource.Builder subBuilder = null; - if (resource_ != null) { - subBuilder = resource_.toBuilder(); - } - resource_ = - input.readMessage( - com.google.cloud.asset.v1p5beta1.Resource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(resource_); - resource_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - com.google.iam.v1.Policy.Builder subBuilder = null; - if (iamPolicy_ != null) { - subBuilder = iamPolicy_.toBuilder(); - } - iamPolicy_ = input.readMessage(com.google.iam.v1.Policy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(iamPolicy_); - iamPolicy_ = subBuilder.buildPartial(); - } - - break; - } - case 50: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - orgPolicy_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - orgPolicy_.add( - input.readMessage( - com.google.cloud.orgpolicy.v1.Policy.parser(), extensionRegistry)); - break; - } - case 58: - { - com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder subBuilder = null; - if (accessContextPolicyCase_ == 7) { - subBuilder = - ((com.google.identity.accesscontextmanager.v1.AccessPolicy) - accessContextPolicy_) - .toBuilder(); - } - accessContextPolicy_ = - input.readMessage( - com.google.identity.accesscontextmanager.v1.AccessPolicy.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.identity.accesscontextmanager.v1.AccessPolicy) - accessContextPolicy_); - accessContextPolicy_ = subBuilder.buildPartial(); - } - accessContextPolicyCase_ = 7; - break; - } - case 66: - { - com.google.identity.accesscontextmanager.v1.AccessLevel.Builder subBuilder = null; - if (accessContextPolicyCase_ == 8) { - subBuilder = - ((com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_) - .toBuilder(); - } - accessContextPolicy_ = - input.readMessage( - com.google.identity.accesscontextmanager.v1.AccessLevel.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_); - accessContextPolicy_ = subBuilder.buildPartial(); - } - accessContextPolicyCase_ = 8; - break; - } - case 74: - { - com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder subBuilder = - null; - if (accessContextPolicyCase_ == 9) { - subBuilder = - ((com.google.identity.accesscontextmanager.v1.ServicePerimeter) - accessContextPolicy_) - .toBuilder(); - } - accessContextPolicy_ = - input.readMessage( - com.google.identity.accesscontextmanager.v1.ServicePerimeter.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.identity.accesscontextmanager.v1.ServicePerimeter) - accessContextPolicy_); - accessContextPolicy_ = subBuilder.buildPartial(); - } - accessContextPolicyCase_ = 9; - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - ancestors_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - ancestors_.add(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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - orgPolicy_ = java.util.Collections.unmodifiableList(orgPolicy_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - ancestors_ = ancestors_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1p5beta1.AssetProto .internal_static_google_cloud_asset_v1p5beta1_Asset_descriptor; @@ -798,7 +622,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < ancestors_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 10, ancestors_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -846,7 +670,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getAncestorsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -887,7 +711,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -934,7 +758,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1064,19 +888,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p5beta1.Asset.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) { - getOrgPolicyFieldBuilder(); - } } @java.lang.Override @@ -1100,10 +915,20 @@ public Builder clear() { } if (orgPolicyBuilder_ == null) { orgPolicy_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + orgPolicy_ = null; orgPolicyBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); + if (accessPolicyBuilder_ != null) { + accessPolicyBuilder_.clear(); + } + if (accessLevelBuilder_ != null) { + accessLevelBuilder_.clear(); + } + if (servicePerimeterBuilder_ != null) { + servicePerimeterBuilder_.clear(); + } ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); accessContextPolicyCase_ = 0; @@ -1305,7 +1130,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p5beta1.Asset other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1320,17 +1145,94 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p5beta1.Asset 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: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + assetType_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + input.readMessage(getIamPolicyFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 50: + { + com.google.cloud.orgpolicy.v1.Policy m = + input.readMessage( + com.google.cloud.orgpolicy.v1.Policy.parser(), extensionRegistry); + if (orgPolicyBuilder_ == null) { + ensureOrgPolicyIsMutable(); + orgPolicy_.add(m); + } else { + orgPolicyBuilder_.addMessage(m); + } + break; + } // case 50 + case 58: + { + input.readMessage(getAccessPolicyFieldBuilder().getBuilder(), extensionRegistry); + accessContextPolicyCase_ = 7; + break; + } // case 58 + case 66: + { + input.readMessage(getAccessLevelFieldBuilder().getBuilder(), extensionRegistry); + accessContextPolicyCase_ = 8; + break; + } // case 66 + case 74: + { + input.readMessage( + getServicePerimeterFieldBuilder().getBuilder(), extensionRegistry); + accessContextPolicyCase_ = 9; + break; + } // case 74 + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAncestorsIsMutable(); + ancestors_.add(s); + break; + } // case 82 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p5beta1.Asset) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3035,7 +2937,18 @@ public Asset parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Asset(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/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsRequest.java b/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsRequest.java index ae570bd57..614da13ab 100644 --- a/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsRequest.java +++ b/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsRequest.java @@ -55,100 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListAssetsRequest( - 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(); - - parent_ = s; - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (readTime_ != null) { - subBuilder = readTime_.toBuilder(); - } - readTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(readTime_); - readTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - assetTypes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assetTypes_.add(s); - break; - } - case 32: - { - int rawValue = input.readEnum(); - - contentType_ = rawValue; - break; - } - case 40: - { - pageSize_ = input.readInt32(); - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - assetTypes_ = assetTypes_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1p5beta1.AssetServiceProto .internal_static_google_cloud_asset_v1p5beta1_ListAssetsRequest_descriptor; @@ -497,7 +403,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, pageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -530,7 +436,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, pageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -555,7 +461,7 @@ public boolean equals(final java.lang.Object obj) { if (contentType_ != other.contentType_) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -582,7 +488,7 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -711,17 +617,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p5beta1.ListAssetsRequest.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 @@ -862,7 +761,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p5beta1.ListAssetsRequest othe pageToken_ = other.pageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -877,18 +776,68 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p5beta1.ListAssetsRequest 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: + { + input.readMessage(getReadTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAssetTypesIsMutable(); + assetTypes_.add(s); + break; + } // case 26 + case 32: + { + contentType_ = input.readEnum(); + + break; + } // case 32 + case 40: + { + pageSize_ = input.readInt32(); + + break; + } // case 40 + case 50: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1p5beta1.ListAssetsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1733,7 +1682,18 @@ public ListAssetsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListAssetsRequest(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/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsResponse.java b/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsResponse.java index c7122683d..986a57608 100644 --- a/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsResponse.java +++ b/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsResponse.java @@ -53,82 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListAssetsResponse( - 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: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (readTime_ != null) { - subBuilder = readTime_.toBuilder(); - } - readTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(readTime_); - readTime_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - assets_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assets_.add( - input.readMessage( - com.google.cloud.asset.v1p5beta1.Asset.parser(), extensionRegistry)); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - assets_ = java.util.Collections.unmodifiableList(assets_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1p5beta1.AssetServiceProto .internal_static_google_cloud_asset_v1p5beta1_ListAssetsResponse_descriptor; @@ -333,7 +257,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -351,7 +275,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -373,7 +297,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getAssetsList().equals(other.getAssetsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -394,7 +318,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -523,19 +447,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p5beta1.ListAssetsResponse.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) { - getAssetsFieldBuilder(); - } } @java.lang.Override @@ -549,10 +464,11 @@ public Builder clear() { } if (assetsBuilder_ == null) { assets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + assets_ = null; assetsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -682,7 +598,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p5beta1.ListAssetsResponse oth nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -697,18 +613,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p5beta1.ListAssetsResponse 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: + { + input.readMessage(getReadTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + com.google.cloud.asset.v1p5beta1.Asset m = + input.readMessage( + com.google.cloud.asset.v1p5beta1.Asset.parser(), extensionRegistry); + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.add(m); + } else { + assetsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1p5beta1.ListAssetsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1384,7 +1338,18 @@ public ListAssetsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListAssetsResponse(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/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/Resource.java b/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/Resource.java index f77c0ca6a..4fa82289c 100644 --- a/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/Resource.java +++ b/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/Resource.java @@ -56,94 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Resource( - 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(); - - version_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - discoveryDocumentUri_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - discoveryName_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - resourceUrl_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 50: - { - com.google.protobuf.Struct.Builder subBuilder = null; - if (data_ != null) { - subBuilder = data_.toBuilder(); - } - data_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(data_); - data_ = 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 com.google.cloud.asset.v1p5beta1.AssetProto .internal_static_google_cloud_asset_v1p5beta1_Resource_descriptor; @@ -521,7 +433,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (data_ != null) { output.writeMessage(6, getData()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -548,7 +460,7 @@ public int getSerializedSize() { if (data_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getData()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -573,7 +485,7 @@ public boolean equals(final java.lang.Object obj) { if (hasData()) { if (!getData().equals(other.getData())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -598,7 +510,7 @@ public int hashCode() { hash = (37 * hash) + DATA_FIELD_NUMBER; hash = (53 * hash) + getData().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -727,17 +639,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p5beta1.Resource.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 @@ -868,7 +773,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p5beta1.Resource other) { if (other.hasData()) { mergeData(other.getData()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -883,17 +788,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p5beta1.Resource 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: + { + version_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + discoveryDocumentUri_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + discoveryName_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + resourceUrl_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + input.readMessage(getDataFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p5beta1.Resource) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1735,7 +1690,18 @@ public Resource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Resource(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/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/Asset.java b/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/Asset.java index 522926d21..61ba975a6 100644 --- a/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/Asset.java +++ b/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/Asset.java @@ -62,213 +62,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Asset( - 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(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - assetType_ = s; - break; - } - case 26: - { - com.google.cloud.asset.v1p7beta1.Resource.Builder subBuilder = null; - if (resource_ != null) { - subBuilder = resource_.toBuilder(); - } - resource_ = - input.readMessage( - com.google.cloud.asset.v1p7beta1.Resource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(resource_); - resource_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - com.google.iam.v1.Policy.Builder subBuilder = null; - if (iamPolicy_ != null) { - subBuilder = iamPolicy_.toBuilder(); - } - iamPolicy_ = input.readMessage(com.google.iam.v1.Policy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(iamPolicy_); - iamPolicy_ = subBuilder.buildPartial(); - } - - break; - } - case 50: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - orgPolicy_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - orgPolicy_.add( - input.readMessage( - com.google.cloud.orgpolicy.v1.Policy.parser(), extensionRegistry)); - break; - } - case 58: - { - com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder subBuilder = null; - if (accessContextPolicyCase_ == 7) { - subBuilder = - ((com.google.identity.accesscontextmanager.v1.AccessPolicy) - accessContextPolicy_) - .toBuilder(); - } - accessContextPolicy_ = - input.readMessage( - com.google.identity.accesscontextmanager.v1.AccessPolicy.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.identity.accesscontextmanager.v1.AccessPolicy) - accessContextPolicy_); - accessContextPolicy_ = subBuilder.buildPartial(); - } - accessContextPolicyCase_ = 7; - break; - } - case 66: - { - com.google.identity.accesscontextmanager.v1.AccessLevel.Builder subBuilder = null; - if (accessContextPolicyCase_ == 8) { - subBuilder = - ((com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_) - .toBuilder(); - } - accessContextPolicy_ = - input.readMessage( - com.google.identity.accesscontextmanager.v1.AccessLevel.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_); - accessContextPolicy_ = subBuilder.buildPartial(); - } - accessContextPolicyCase_ = 8; - break; - } - case 74: - { - com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder subBuilder = - null; - if (accessContextPolicyCase_ == 9) { - subBuilder = - ((com.google.identity.accesscontextmanager.v1.ServicePerimeter) - accessContextPolicy_) - .toBuilder(); - } - accessContextPolicy_ = - input.readMessage( - com.google.identity.accesscontextmanager.v1.ServicePerimeter.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.identity.accesscontextmanager.v1.ServicePerimeter) - accessContextPolicy_); - accessContextPolicy_ = subBuilder.buildPartial(); - } - accessContextPolicyCase_ = 9; - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - ancestors_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - ancestors_.add(s); - break; - } - case 90: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 106: - { - com.google.cloud.asset.v1p7beta1.RelatedAssets.Builder subBuilder = null; - if (relatedAssets_ != null) { - subBuilder = relatedAssets_.toBuilder(); - } - relatedAssets_ = - input.readMessage( - com.google.cloud.asset.v1p7beta1.RelatedAssets.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(relatedAssets_); - relatedAssets_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - orgPolicy_ = java.util.Collections.unmodifiableList(orgPolicy_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - ancestors_ = ancestors_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1p7beta1.AssetProto .internal_static_google_cloud_asset_v1p7beta1_Asset_descriptor; @@ -1048,7 +841,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (relatedAssets_ != null) { output.writeMessage(13, getRelatedAssets()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1102,7 +895,7 @@ public int getSerializedSize() { if (relatedAssets_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getRelatedAssets()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1151,7 +944,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1206,7 +999,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1342,19 +1135,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p7beta1.Asset.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) { - getOrgPolicyFieldBuilder(); - } } @java.lang.Override @@ -1384,10 +1168,20 @@ public Builder clear() { } if (orgPolicyBuilder_ == null) { orgPolicy_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + orgPolicy_ = null; orgPolicyBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); + if (accessPolicyBuilder_ != null) { + accessPolicyBuilder_.clear(); + } + if (accessLevelBuilder_ != null) { + accessLevelBuilder_.clear(); + } + if (servicePerimeterBuilder_ != null) { + servicePerimeterBuilder_.clear(); + } if (relatedAssetsBuilder_ == null) { relatedAssets_ = null; } else { @@ -1611,7 +1405,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.Asset other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1626,17 +1420,106 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p7beta1.Asset 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: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + assetType_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + input.readMessage(getIamPolicyFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 50: + { + com.google.cloud.orgpolicy.v1.Policy m = + input.readMessage( + com.google.cloud.orgpolicy.v1.Policy.parser(), extensionRegistry); + if (orgPolicyBuilder_ == null) { + ensureOrgPolicyIsMutable(); + orgPolicy_.add(m); + } else { + orgPolicyBuilder_.addMessage(m); + } + break; + } // case 50 + case 58: + { + input.readMessage(getAccessPolicyFieldBuilder().getBuilder(), extensionRegistry); + accessContextPolicyCase_ = 7; + break; + } // case 58 + case 66: + { + input.readMessage(getAccessLevelFieldBuilder().getBuilder(), extensionRegistry); + accessContextPolicyCase_ = 8; + break; + } // case 66 + case 74: + { + input.readMessage( + getServicePerimeterFieldBuilder().getBuilder(), extensionRegistry); + accessContextPolicyCase_ = 9; + break; + } // case 74 + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAncestorsIsMutable(); + ancestors_.add(s); + break; + } // case 82 + case 90: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 90 + case 106: + { + input.readMessage(getRelatedAssetsFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 106 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p7beta1.Asset) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4059,7 +3942,18 @@ public Asset parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Asset(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/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/BigQueryDestination.java b/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/BigQueryDestination.java index e9f66396e..e4e0cb57d 100644 --- a/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/BigQueryDestination.java +++ b/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/BigQueryDestination.java @@ -53,85 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BigQueryDestination( - 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(); - - dataset_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - table_ = s; - break; - } - case 24: - { - force_ = input.readBool(); - break; - } - case 34: - { - com.google.cloud.asset.v1p7beta1.PartitionSpec.Builder subBuilder = null; - if (partitionSpec_ != null) { - subBuilder = partitionSpec_.toBuilder(); - } - partitionSpec_ = - input.readMessage( - com.google.cloud.asset.v1p7beta1.PartitionSpec.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(partitionSpec_); - partitionSpec_ = subBuilder.buildPartial(); - } - - break; - } - case 40: - { - separateTablesPerAssetType_ = 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 com.google.cloud.asset.v1p7beta1.AssetServiceProto .internal_static_google_cloud_asset_v1p7beta1_BigQueryDestination_descriptor; @@ -436,7 +357,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (separateTablesPerAssetType_ != false) { output.writeBool(5, separateTablesPerAssetType_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -460,7 +381,7 @@ public int getSerializedSize() { if (separateTablesPerAssetType_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, separateTablesPerAssetType_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -484,7 +405,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPartitionSpec().equals(other.getPartitionSpec())) return false; } if (getSeparateTablesPerAssetType() != other.getSeparateTablesPerAssetType()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -507,7 +428,7 @@ public int hashCode() { } hash = (37 * hash) + SEPARATE_TABLES_PER_ASSET_TYPE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSeparateTablesPerAssetType()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -636,17 +557,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p7beta1.BigQueryDestination.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 @@ -769,7 +683,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.BigQueryDestination ot if (other.getSeparateTablesPerAssetType() != false) { setSeparateTablesPerAssetType(other.getSeparateTablesPerAssetType()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -784,18 +698,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p7beta1.BigQueryDestination 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: + { + dataset_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + table_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + force_ = input.readBool(); + + break; + } // case 24 + case 34: + { + input.readMessage(getPartitionSpecFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 40: + { + separateTablesPerAssetType_ = input.readBool(); + + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1p7beta1.BigQueryDestination) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1562,7 +1519,18 @@ public BigQueryDestination parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BigQueryDestination(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/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsRequest.java b/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsRequest.java index 9ef4c9d0c..3ad35b195 100644 --- a/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsRequest.java +++ b/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsRequest.java @@ -55,117 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ExportAssetsRequest( - 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(); - - parent_ = s; - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (readTime_ != null) { - subBuilder = readTime_.toBuilder(); - } - readTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(readTime_); - readTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - assetTypes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assetTypes_.add(s); - break; - } - case 32: - { - int rawValue = input.readEnum(); - - contentType_ = rawValue; - break; - } - case 42: - { - com.google.cloud.asset.v1p7beta1.OutputConfig.Builder subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = - input.readMessage( - com.google.cloud.asset.v1p7beta1.OutputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputConfig_); - outputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - relationshipTypes_.add(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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - assetTypes_ = assetTypes_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - relationshipTypes_ = relationshipTypes_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1p7beta1.AssetServiceProto .internal_static_google_cloud_asset_v1p7beta1_ExportAssetsRequest_descriptor; @@ -636,7 +525,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < relationshipTypes_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, relationshipTypes_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -674,7 +563,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getRelationshipTypesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -702,7 +591,7 @@ public boolean equals(final java.lang.Object obj) { if (!getOutputConfig().equals(other.getOutputConfig())) return false; } if (!getRelationshipTypesList().equals(other.getRelationshipTypesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -733,7 +622,7 @@ public int hashCode() { hash = (37 * hash) + RELATIONSHIP_TYPES_FIELD_NUMBER; hash = (53 * hash) + getRelationshipTypesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -862,17 +751,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p7beta1.ExportAssetsRequest.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 @@ -1031,7 +913,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.ExportAssetsRequest ot } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1046,18 +928,69 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p7beta1.ExportAssetsRequest 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: + { + input.readMessage(getReadTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAssetTypesIsMutable(); + assetTypes_.add(s); + break; + } // case 26 + case 32: + { + contentType_ = input.readEnum(); + + break; + } // case 32 + case 42: + { + input.readMessage(getOutputConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRelationshipTypesIsMutable(); + relationshipTypes_.add(s); + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1p7beta1.ExportAssetsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2284,7 +2217,18 @@ public ExportAssetsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ExportAssetsRequest(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/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsResponse.java b/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsResponse.java index bcfa574a7..b7d844e38 100644 --- a/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsResponse.java +++ b/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsResponse.java @@ -54,92 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ExportAssetsResponse( - 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: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (readTime_ != null) { - subBuilder = readTime_.toBuilder(); - } - readTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(readTime_); - readTime_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.cloud.asset.v1p7beta1.OutputConfig.Builder subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = - input.readMessage( - com.google.cloud.asset.v1p7beta1.OutputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputConfig_); - outputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.cloud.asset.v1p7beta1.OutputResult.Builder subBuilder = null; - if (outputResult_ != null) { - subBuilder = outputResult_.toBuilder(); - } - outputResult_ = - input.readMessage( - com.google.cloud.asset.v1p7beta1.OutputResult.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputResult_); - outputResult_ = 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 com.google.cloud.asset.v1p7beta1.AssetServiceProto .internal_static_google_cloud_asset_v1p7beta1_ExportAssetsResponse_descriptor; @@ -332,7 +246,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (outputResult_ != null) { output.writeMessage(3, getOutputResult()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -350,7 +264,7 @@ public int getSerializedSize() { if (outputResult_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOutputResult()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -378,7 +292,7 @@ public boolean equals(final java.lang.Object obj) { if (hasOutputResult()) { if (!getOutputResult().equals(other.getOutputResult())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -401,7 +315,7 @@ public int hashCode() { hash = (37 * hash) + OUTPUT_RESULT_FIELD_NUMBER; hash = (53 * hash) + getOutputResult().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -535,17 +449,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p7beta1.ExportAssetsResponse.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 @@ -670,7 +577,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.ExportAssetsResponse o if (other.hasOutputResult()) { mergeOutputResult(other.getOutputResult()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -685,18 +592,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p7beta1.ExportAssetsResponse 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: + { + input.readMessage(getReadTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getOutputConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getOutputResultFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1p7beta1.ExportAssetsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1319,7 +1257,18 @@ public ExportAssetsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ExportAssetsResponse(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/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsDestination.java b/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsDestination.java index a388e716f..90bf2d64b 100644 --- a/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsDestination.java +++ b/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsDestination.java @@ -50,59 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GcsDestination( - 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(); - objectUriCase_ = 1; - objectUri_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - objectUriCase_ = 2; - objectUri_ = 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.cloud.asset.v1p7beta1.AssetServiceProto .internal_static_google_cloud_asset_v1p7beta1_GcsDestination_descriptor; @@ -361,7 +308,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (objectUriCase_ == 2) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, objectUri_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -376,7 +323,7 @@ public int getSerializedSize() { if (objectUriCase_ == 2) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, objectUri_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -403,7 +350,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -426,7 +373,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -555,17 +502,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p7beta1.GcsDestination.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 @@ -677,7 +617,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.GcsDestination other) break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -692,17 +632,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p7beta1.GcsDestination 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: + { + java.lang.String s = input.readStringRequireUtf8(); + objectUriCase_ = 1; + objectUri_ = s; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + objectUriCase_ = 2; + objectUri_ = s; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p7beta1.GcsDestination) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1092,7 +1060,18 @@ public GcsDestination parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GcsDestination(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/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsOutputResult.java b/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsOutputResult.java index 9e5a05ad2..468dcb870 100644 --- a/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsOutputResult.java +++ b/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsOutputResult.java @@ -52,59 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GcsOutputResult( - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - uris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - uris_.add(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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - uris_ = uris_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1p7beta1.AssetServiceProto .internal_static_google_cloud_asset_v1p7beta1_GcsOutputResult_descriptor; @@ -202,7 +149,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < uris_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uris_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -219,7 +166,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getUrisList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -236,7 +183,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.asset.v1p7beta1.GcsOutputResult) obj; if (!getUrisList().equals(other.getUrisList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -251,7 +198,7 @@ public int hashCode() { hash = (37 * hash) + URIS_FIELD_NUMBER; hash = (53 * hash) + getUrisList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -380,17 +327,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p7beta1.GcsOutputResult.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 @@ -491,7 +431,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.GcsOutputResult other) } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -506,17 +446,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p7beta1.GcsOutputResult 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: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUrisIsMutable(); + uris_.add(s); + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p7beta1.GcsOutputResult) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -731,7 +692,18 @@ public GcsOutputResult parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GcsOutputResult(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/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputConfig.java b/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputConfig.java index 7caec96d9..a15a6ffbc 100644 --- a/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputConfig.java +++ b/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputConfig.java @@ -50,83 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private OutputConfig( - 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: - { - com.google.cloud.asset.v1p7beta1.GcsDestination.Builder subBuilder = null; - if (destinationCase_ == 1) { - subBuilder = - ((com.google.cloud.asset.v1p7beta1.GcsDestination) destination_).toBuilder(); - } - destination_ = - input.readMessage( - com.google.cloud.asset.v1p7beta1.GcsDestination.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.asset.v1p7beta1.GcsDestination) destination_); - destination_ = subBuilder.buildPartial(); - } - destinationCase_ = 1; - break; - } - case 18: - { - com.google.cloud.asset.v1p7beta1.BigQueryDestination.Builder subBuilder = null; - if (destinationCase_ == 2) { - subBuilder = - ((com.google.cloud.asset.v1p7beta1.BigQueryDestination) destination_) - .toBuilder(); - } - destination_ = - input.readMessage( - com.google.cloud.asset.v1p7beta1.BigQueryDestination.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.asset.v1p7beta1.BigQueryDestination) destination_); - destination_ = subBuilder.buildPartial(); - } - destinationCase_ = 2; - 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.cloud.asset.v1p7beta1.AssetServiceProto .internal_static_google_cloud_asset_v1p7beta1_OutputConfig_descriptor; @@ -315,7 +238,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (destinationCase_ == 2) { output.writeMessage(2, (com.google.cloud.asset.v1p7beta1.BigQueryDestination) destination_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -334,7 +257,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 2, (com.google.cloud.asset.v1p7beta1.BigQueryDestination) destination_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -361,7 +284,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -384,7 +307,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -513,22 +436,21 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p7beta1.OutputConfig.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 public Builder clear() { super.clear(); + if (gcsDestinationBuilder_ != null) { + gcsDestinationBuilder_.clear(); + } + if (bigqueryDestinationBuilder_ != null) { + bigqueryDestinationBuilder_.clear(); + } destinationCase_ = 0; destination_ = null; return this; @@ -638,7 +560,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.OutputConfig other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -653,17 +575,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p7beta1.OutputConfig 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: + { + input.readMessage(getGcsDestinationFieldBuilder().getBuilder(), extensionRegistry); + destinationCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + getBigqueryDestinationFieldBuilder().getBuilder(), extensionRegistry); + destinationCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p7beta1.OutputConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1148,7 +1097,18 @@ public OutputConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OutputConfig(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/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputResult.java b/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputResult.java index cc21d39b3..16fdc48ab 100644 --- a/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputResult.java +++ b/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputResult.java @@ -50,62 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private OutputResult( - 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: - { - com.google.cloud.asset.v1p7beta1.GcsOutputResult.Builder subBuilder = null; - if (resultCase_ == 1) { - subBuilder = - ((com.google.cloud.asset.v1p7beta1.GcsOutputResult) result_).toBuilder(); - } - result_ = - input.readMessage( - com.google.cloud.asset.v1p7beta1.GcsOutputResult.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.asset.v1p7beta1.GcsOutputResult) result_); - result_ = subBuilder.buildPartial(); - } - resultCase_ = 1; - 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.cloud.asset.v1p7beta1.AssetServiceProto .internal_static_google_cloud_asset_v1p7beta1_OutputResult_descriptor; @@ -233,7 +177,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (resultCase_ == 1) { output.writeMessage(1, (com.google.cloud.asset.v1p7beta1.GcsOutputResult) result_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -247,7 +191,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 1, (com.google.cloud.asset.v1p7beta1.GcsOutputResult) result_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -271,7 +215,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -290,7 +234,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -419,22 +363,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p7beta1.OutputResult.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 public Builder clear() { super.clear(); + if (gcsResultBuilder_ != null) { + gcsResultBuilder_.clear(); + } resultCase_ = 0; result_ = null; return this; @@ -532,7 +472,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.OutputResult other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -547,17 +487,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p7beta1.OutputResult 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: + { + input.readMessage(getGcsResultFieldBuilder().getBuilder(), extensionRegistry); + resultCase_ = 1; + 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.cloud.asset.v1p7beta1.OutputResult) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -817,7 +777,18 @@ public OutputResult parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OutputResult(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/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/PartitionSpec.java b/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/PartitionSpec.java index d1af80305..1e0d5eb26 100644 --- a/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/PartitionSpec.java +++ b/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/PartitionSpec.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PartitionSpec( - 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: - { - int rawValue = input.readEnum(); - - partitionKey_ = rawValue; - 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.cloud.asset.v1p7beta1.AssetServiceProto .internal_static_google_cloud_asset_v1p7beta1_PartitionSpec_descriptor; @@ -345,7 +299,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(1, partitionKey_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -359,7 +313,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, partitionKey_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -376,7 +330,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.asset.v1p7beta1.PartitionSpec) obj; if (partitionKey_ != other.partitionKey_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -389,7 +343,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PARTITION_KEY_FIELD_NUMBER; hash = (53 * hash) + partitionKey_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -518,17 +472,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p7beta1.PartitionSpec.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 @@ -616,7 +563,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.PartitionSpec other) { if (other.partitionKey_ != 0) { setPartitionKeyValue(other.getPartitionKeyValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -631,17 +578,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p7beta1.PartitionSpec 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 8: + { + partitionKey_ = input.readEnum(); + + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p7beta1.PartitionSpec) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -771,7 +738,18 @@ public PartitionSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PartitionSpec(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/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAsset.java b/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAsset.java index a1c69ec63..b7cd47f20 100644 --- a/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAsset.java +++ b/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAsset.java @@ -61,73 +61,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RelatedAsset( - 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(); - - asset_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - assetType_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - ancestors_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - ancestors_.add(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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - ancestors_ = ancestors_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1p7beta1.AssetProto .internal_static_google_cloud_asset_v1p7beta1_RelatedAsset_descriptor; @@ -355,7 +288,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < ancestors_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, ancestors_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -378,7 +311,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getAncestorsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -397,7 +330,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAsset().equals(other.getAsset())) return false; if (!getAssetType().equals(other.getAssetType())) return false; if (!getAncestorsList().equals(other.getAncestorsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -416,7 +349,7 @@ public int hashCode() { hash = (37 * hash) + ANCESTORS_FIELD_NUMBER; hash = (53 * hash) + getAncestorsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -552,17 +485,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p7beta1.RelatedAsset.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 @@ -676,7 +602,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.RelatedAsset other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -691,17 +617,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p7beta1.RelatedAsset 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: + { + asset_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + assetType_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAncestorsIsMutable(); + ancestors_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p7beta1.RelatedAsset) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1190,7 +1149,18 @@ public RelatedAsset parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RelatedAsset(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/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAssets.java b/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAssets.java index 6425e4f84..7c3346af2 100644 --- a/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAssets.java +++ b/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAssets.java @@ -52,77 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RelatedAssets( - 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: - { - com.google.cloud.asset.v1p7beta1.RelationshipAttributes.Builder subBuilder = null; - if (relationshipAttributes_ != null) { - subBuilder = relationshipAttributes_.toBuilder(); - } - relationshipAttributes_ = - input.readMessage( - com.google.cloud.asset.v1p7beta1.RelationshipAttributes.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(relationshipAttributes_); - relationshipAttributes_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - assets_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assets_.add( - input.readMessage( - com.google.cloud.asset.v1p7beta1.RelatedAsset.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)) { - assets_ = java.util.Collections.unmodifiableList(assets_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.asset.v1p7beta1.AssetProto .internal_static_google_cloud_asset_v1p7beta1_RelatedAssets_descriptor; @@ -276,7 +205,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < assets_.size(); i++) { output.writeMessage(2, assets_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -292,7 +221,7 @@ public int getSerializedSize() { for (int i = 0; i < assets_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, assets_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -313,7 +242,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRelationshipAttributes().equals(other.getRelationshipAttributes())) return false; } if (!getAssetsList().equals(other.getAssetsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -332,7 +261,7 @@ public int hashCode() { hash = (37 * hash) + ASSETS_FIELD_NUMBER; hash = (53 * hash) + getAssetsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -461,19 +390,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p7beta1.RelatedAssets.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) { - getAssetsFieldBuilder(); - } } @java.lang.Override @@ -487,10 +407,11 @@ public Builder clear() { } if (assetsBuilder_ == null) { assets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + assets_ = null; assetsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -612,7 +533,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.RelatedAssets other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -627,17 +548,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p7beta1.RelatedAssets 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: + { + input.readMessage( + getRelationshipAttributesFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + com.google.cloud.asset.v1p7beta1.RelatedAsset m = + input.readMessage( + com.google.cloud.asset.v1p7beta1.RelatedAsset.parser(), extensionRegistry); + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.add(m); + } else { + assetsBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p7beta1.RelatedAssets) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1225,7 +1180,18 @@ public RelatedAssets parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RelatedAssets(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/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelationshipAttributes.java b/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelationshipAttributes.java index 927a7ae58..be4ee6043 100644 --- a/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelationshipAttributes.java +++ b/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelationshipAttributes.java @@ -56,73 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RelationshipAttributes( - 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(); - - sourceResourceType_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetResourceType_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - action_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - type_ = 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.cloud.asset.v1p7beta1.AssetProto .internal_static_google_cloud_asset_v1p7beta1_RelationshipAttributes_descriptor; @@ -362,7 +295,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, type_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -383,7 +316,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, type_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -403,7 +336,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSourceResourceType().equals(other.getSourceResourceType())) return false; if (!getTargetResourceType().equals(other.getTargetResourceType())) return false; if (!getAction().equals(other.getAction())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -422,7 +355,7 @@ public int hashCode() { hash = (53 * hash) + getTargetResourceType().hashCode(); hash = (37 * hash) + ACTION_FIELD_NUMBER; hash = (53 * hash) + getAction().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -553,17 +486,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p7beta1.RelationshipAttributes.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 @@ -674,7 +600,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.RelationshipAttributes action_ = other.action_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -689,18 +615,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p7beta1.RelationshipAttributes 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: + { + sourceResourceType_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + targetResourceType_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + action_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + type_ = input.readStringRequireUtf8(); + + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1p7beta1.RelationshipAttributes) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1165,7 +1128,18 @@ public RelationshipAttributes parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RelationshipAttributes(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/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/Resource.java b/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/Resource.java index c4bc5825f..f606f90e1 100644 --- a/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/Resource.java +++ b/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/Resource.java @@ -57,101 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Resource( - 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(); - - version_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - discoveryDocumentUri_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - discoveryName_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - resourceUrl_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 50: - { - com.google.protobuf.Struct.Builder subBuilder = null; - if (data_ != null) { - subBuilder = data_.toBuilder(); - } - data_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(data_); - data_ = subBuilder.buildPartial(); - } - - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - location_ = 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.cloud.asset.v1p7beta1.AssetProto .internal_static_google_cloud_asset_v1p7beta1_Resource_descriptor; @@ -585,7 +490,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, location_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -615,7 +520,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, location_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -641,7 +546,7 @@ public boolean equals(final java.lang.Object obj) { if (!getData().equals(other.getData())) return false; } if (!getLocation().equals(other.getLocation())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -668,7 +573,7 @@ public int hashCode() { } hash = (37 * hash) + LOCATION_FIELD_NUMBER; hash = (53 * hash) + getLocation().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -797,17 +702,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.asset.v1p7beta1.Resource.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 @@ -945,7 +843,7 @@ public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.Resource other) { location_ = other.location_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -960,17 +858,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.asset.v1p7beta1.Resource 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: + { + version_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + discoveryDocumentUri_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + discoveryName_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + resourceUrl_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + input.readMessage(getDataFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 50 + case 66: + { + location_ = input.readStringRequireUtf8(); + + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p7beta1.Resource) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1928,7 +1882,18 @@ public Resource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Resource(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(); } };