From 3b7dfe323127e42e3ef7e6fb96b278c79976eaf4 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 18:46:24 +0000 Subject: [PATCH] chore(bazel): update protobuf to v3.21.7 (#720) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 477955264 Source-Link: https://togithub.com/googleapis/googleapis/commit/a724450af76d0001f23602684c49cd6a4b3a5654 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/4abcbcaec855e74a0b22a4988cf9e0eb61a83094 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGFiY2JjYWVjODU1ZTc0YTBiMjJhNDk4OGNmOWUwZWI2MWE4MzA5NCJ9 --- java-game-servers/README.md | 6 +- .../v1/CreateGameServerClusterRequest.java | 149 ++--- .../v1/CreateGameServerConfigRequest.java | 149 ++--- .../v1/CreateGameServerDeploymentRequest.java | 149 ++--- .../cloud/gaming/v1/CreateRealmRequest.java | 146 ++-- .../v1/DeleteGameServerClusterRequest.java | 113 ++-- .../v1/DeleteGameServerConfigRequest.java | 113 ++-- .../v1/DeleteGameServerDeploymentRequest.java | 113 ++-- .../cloud/gaming/v1/DeleteRealmRequest.java | 112 ++-- .../cloud/gaming/v1/DeployedFleetDetails.java | 624 +++++++---------- .../v1/FetchDeploymentStateRequest.java | 113 ++-- .../v1/FetchDeploymentStateResponse.java | 312 ++++----- .../google/cloud/gaming/v1/FleetConfig.java | 125 ++-- .../cloud/gaming/v1/GameServerCluster.java | 251 +++---- .../v1/GameServerClusterConnectionInfo.java | 142 ++-- .../cloud/gaming/v1/GameServerConfig.java | 256 +++---- .../gaming/v1/GameServerConfigOverride.java | 139 ++-- .../cloud/gaming/v1/GameServerDeployment.java | 205 +++--- .../v1/GameServerDeploymentRollout.java | 218 +++--- .../v1/GetGameServerClusterRequest.java | 126 ++-- .../gaming/v1/GetGameServerConfigRequest.java | 113 ++-- .../v1/GetGameServerDeploymentRequest.java | 113 ++-- ...GetGameServerDeploymentRolloutRequest.java | 114 ++-- .../cloud/gaming/v1/GetRealmRequest.java | 112 ++-- .../cloud/gaming/v1/GkeClusterReference.java | 112 ++-- .../gaming/v1/KubernetesClusterState.java | 178 +++-- .../google/cloud/gaming/v1/LabelSelector.java | 124 ++-- .../v1/ListGameServerClustersRequest.java | 176 +++-- .../v1/ListGameServerClustersResponse.java | 167 ++--- .../v1/ListGameServerConfigsRequest.java | 163 ++--- .../v1/ListGameServerConfigsResponse.java | 167 ++--- .../v1/ListGameServerDeploymentsRequest.java | 163 ++--- .../v1/ListGameServerDeploymentsResponse.java | 168 ++--- .../cloud/gaming/v1/ListRealmsRequest.java | 162 ++--- .../cloud/gaming/v1/ListRealmsResponse.java | 163 ++--- .../cloud/gaming/v1/OperationMetadata.java | 257 +++---- .../cloud/gaming/v1/OperationStatus.java | 136 ++-- ...PreviewCreateGameServerClusterRequest.java | 184 ++--- ...reviewCreateGameServerClusterResponse.java | 159 ++--- ...PreviewDeleteGameServerClusterRequest.java | 135 ++-- ...reviewDeleteGameServerClusterResponse.java | 136 ++-- ...iewGameServerDeploymentRolloutRequest.java | 167 ++--- ...ewGameServerDeploymentRolloutResponse.java | 158 ++--- .../gaming/v1/PreviewRealmUpdateRequest.java | 163 ++--- .../gaming/v1/PreviewRealmUpdateResponse.java | 135 ++-- ...PreviewUpdateGameServerClusterRequest.java | 166 ++--- ...reviewUpdateGameServerClusterResponse.java | 136 ++-- .../com/google/cloud/gaming/v1/Realm.java | 218 +++--- .../google/cloud/gaming/v1/RealmSelector.java | 120 ++-- .../google/cloud/gaming/v1/ScalingConfig.java | 189 +++--- .../com/google/cloud/gaming/v1/Schedule.java | 175 ++--- .../google/cloud/gaming/v1/SpecSource.java | 125 ++-- .../google/cloud/gaming/v1/TargetDetails.java | 593 +++++++---------- .../google/cloud/gaming/v1/TargetState.java | 132 ++-- .../v1/UpdateGameServerClusterRequest.java | 144 ++-- .../v1/UpdateGameServerDeploymentRequest.java | 144 ++-- ...ateGameServerDeploymentRolloutRequest.java | 145 ++-- .../cloud/gaming/v1/UpdateRealmRequest.java | 141 ++-- .../CreateGameServerClusterRequest.java | 150 ++--- .../v1beta/CreateGameServerConfigRequest.java | 149 ++--- .../CreateGameServerDeploymentRequest.java | 151 ++--- .../gaming/v1beta/CreateRealmRequest.java | 148 ++--- .../DeleteGameServerClusterRequest.java | 114 ++-- .../v1beta/DeleteGameServerConfigRequest.java | 113 ++-- .../DeleteGameServerDeploymentRequest.java | 114 ++-- .../gaming/v1beta/DeleteRealmRequest.java | 113 ++-- .../gaming/v1beta/DeployedFleetDetails.java | 626 +++++++----------- .../v1beta/FetchDeploymentStateRequest.java | 113 ++-- .../v1beta/FetchDeploymentStateResponse.java | 313 ++++----- .../cloud/gaming/v1beta/FleetConfig.java | 125 ++-- .../gaming/v1beta/GameServerCluster.java | 229 +++---- .../GameServerClusterConnectionInfo.java | 144 ++-- .../cloud/gaming/v1beta/GameServerConfig.java | 257 +++---- .../v1beta/GameServerConfigOverride.java | 139 ++-- .../gaming/v1beta/GameServerDeployment.java | 206 +++--- .../v1beta/GameServerDeploymentRollout.java | 219 +++--- .../v1beta/GetGameServerClusterRequest.java | 113 ++-- .../v1beta/GetGameServerConfigRequest.java | 113 ++-- .../GetGameServerDeploymentRequest.java | 114 ++-- ...GetGameServerDeploymentRolloutRequest.java | 114 ++-- .../cloud/gaming/v1beta/GetRealmRequest.java | 112 ++-- .../gaming/v1beta/GkeClusterReference.java | 113 ++-- .../cloud/gaming/v1beta/LabelSelector.java | 124 ++-- .../v1beta/ListGameServerClustersRequest.java | 163 ++--- .../ListGameServerClustersResponse.java | 170 ++--- .../v1beta/ListGameServerConfigsRequest.java | 163 ++--- .../v1beta/ListGameServerConfigsResponse.java | 168 ++--- .../ListGameServerDeploymentsRequest.java | 164 ++--- .../ListGameServerDeploymentsResponse.java | 170 ++--- .../gaming/v1beta/ListRealmsRequest.java | 162 ++--- .../gaming/v1beta/ListRealmsResponse.java | 166 ++--- .../gaming/v1beta/OperationMetadata.java | 257 +++---- .../cloud/gaming/v1beta/OperationStatus.java | 136 ++-- ...PreviewCreateGameServerClusterRequest.java | 171 ++--- ...reviewCreateGameServerClusterResponse.java | 136 ++-- ...PreviewDeleteGameServerClusterRequest.java | 135 ++-- ...reviewDeleteGameServerClusterResponse.java | 136 ++-- ...iewGameServerDeploymentRolloutRequest.java | 167 ++--- ...ewGameServerDeploymentRolloutResponse.java | 159 ++--- .../v1beta/PreviewRealmUpdateRequest.java | 164 ++--- .../v1beta/PreviewRealmUpdateResponse.java | 135 ++-- ...PreviewUpdateGameServerClusterRequest.java | 166 ++--- ...reviewUpdateGameServerClusterResponse.java | 136 ++-- .../com/google/cloud/gaming/v1beta/Realm.java | 218 +++--- .../cloud/gaming/v1beta/RealmSelector.java | 120 ++-- .../cloud/gaming/v1beta/ScalingConfig.java | 190 +++--- .../google/cloud/gaming/v1beta/Schedule.java | 175 ++--- .../cloud/gaming/v1beta/SpecSource.java | 125 ++-- .../cloud/gaming/v1beta/TargetDetails.java | 594 +++++++---------- .../cloud/gaming/v1beta/TargetState.java | 132 ++-- .../UpdateGameServerClusterRequest.java | 145 ++-- .../UpdateGameServerDeploymentRequest.java | 146 ++-- ...ateGameServerDeploymentRolloutRequest.java | 145 ++-- .../gaming/v1beta/UpdateRealmRequest.java | 143 ++-- 114 files changed, 7547 insertions(+), 11850 deletions(-) diff --git a/java-game-servers/README.md b/java-game-servers/README.md index 4f1dd56c51c5..e0aa7bb35744 100644 --- a/java-game-servers/README.md +++ b/java-game-servers/README.md @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-game-servers - 2.3.3 + 2.3.4 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-game-servers:2.3.3' +implementation 'com.google.cloud:google-cloud-game-servers:2.3.4' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-game-servers" % "2.3.3" +libraryDependencies += "com.google.cloud" % "google-cloud-game-servers" % "2.3.4" ``` ## Authentication diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/CreateGameServerClusterRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/CreateGameServerClusterRequest.java index a42c0949660c..9b4c6e9e191a 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/CreateGameServerClusterRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/CreateGameServerClusterRequest.java @@ -54,75 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateGameServerClusterRequest( - 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(); - - gameServerClusterId_ = s; - break; - } - case 26: - { - com.google.cloud.gaming.v1.GameServerCluster.Builder subBuilder = null; - if (gameServerCluster_ != null) { - subBuilder = gameServerCluster_.toBuilder(); - } - gameServerCluster_ = - input.readMessage( - com.google.cloud.gaming.v1.GameServerCluster.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(gameServerCluster_); - gameServerCluster_ = 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.gaming.v1.GameServerClusters .internal_static_google_cloud_gaming_v1_CreateGameServerClusterRequest_descriptor; @@ -319,7 +250,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (gameServerCluster_ != null) { output.writeMessage(3, getGameServerCluster()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -337,7 +268,7 @@ public int getSerializedSize() { if (gameServerCluster_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getGameServerCluster()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -359,7 +290,7 @@ public boolean equals(final java.lang.Object obj) { if (hasGameServerCluster()) { if (!getGameServerCluster().equals(other.getGameServerCluster())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -378,7 +309,7 @@ public int hashCode() { hash = (37 * hash) + GAME_SERVER_CLUSTER_FIELD_NUMBER; hash = (53 * hash) + getGameServerCluster().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -508,17 +439,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.CreateGameServerClusterRequest.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 +553,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.CreateGameServerClusterReque if (other.hasGameServerCluster()) { mergeGameServerCluster(other.getGameServerCluster()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -644,18 +568,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.CreateGameServerClusterRequest 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: + { + gameServerClusterId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage( + getGameServerClusterFieldBuilder().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.gaming.v1.CreateGameServerClusterRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1122,7 +1078,18 @@ public CreateGameServerClusterRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateGameServerClusterRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/CreateGameServerConfigRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/CreateGameServerConfigRequest.java index d945279d272b..bfda873967c6 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/CreateGameServerConfigRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/CreateGameServerConfigRequest.java @@ -53,75 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateGameServerConfigRequest( - 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(); - - configId_ = s; - break; - } - case 26: - { - com.google.cloud.gaming.v1.GameServerConfig.Builder subBuilder = null; - if (gameServerConfig_ != null) { - subBuilder = gameServerConfig_.toBuilder(); - } - gameServerConfig_ = - input.readMessage( - com.google.cloud.gaming.v1.GameServerConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(gameServerConfig_); - gameServerConfig_ = 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.gaming.v1.GameServerConfigs .internal_static_google_cloud_gaming_v1_CreateGameServerConfigRequest_descriptor; @@ -318,7 +249,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (gameServerConfig_ != null) { output.writeMessage(3, getGameServerConfig()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -336,7 +267,7 @@ public int getSerializedSize() { if (gameServerConfig_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getGameServerConfig()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -358,7 +289,7 @@ public boolean equals(final java.lang.Object obj) { if (hasGameServerConfig()) { if (!getGameServerConfig().equals(other.getGameServerConfig())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -377,7 +308,7 @@ public int hashCode() { hash = (37 * hash) + GAME_SERVER_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getGameServerConfig().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -507,17 +438,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.CreateGameServerConfigRequest.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 +552,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.CreateGameServerConfigReques if (other.hasGameServerConfig()) { mergeGameServerConfig(other.getGameServerConfig()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -643,18 +567,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.CreateGameServerConfigRequest 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: + { + configId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage( + getGameServerConfigFieldBuilder().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.gaming.v1.CreateGameServerConfigRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1121,7 +1077,18 @@ public CreateGameServerConfigRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateGameServerConfigRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/CreateGameServerDeploymentRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/CreateGameServerDeploymentRequest.java index 80df061d258d..8eb2ac675def 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/CreateGameServerDeploymentRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/CreateGameServerDeploymentRequest.java @@ -54,75 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateGameServerDeploymentRequest( - 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(); - - deploymentId_ = s; - break; - } - case 26: - { - com.google.cloud.gaming.v1.GameServerDeployment.Builder subBuilder = null; - if (gameServerDeployment_ != null) { - subBuilder = gameServerDeployment_.toBuilder(); - } - gameServerDeployment_ = - input.readMessage( - com.google.cloud.gaming.v1.GameServerDeployment.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(gameServerDeployment_); - gameServerDeployment_ = 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.gaming.v1.GameServerDeployments .internal_static_google_cloud_gaming_v1_CreateGameServerDeploymentRequest_descriptor; @@ -320,7 +251,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (gameServerDeployment_ != null) { output.writeMessage(3, getGameServerDeployment()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -339,7 +270,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getGameServerDeployment()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -361,7 +292,7 @@ public boolean equals(final java.lang.Object obj) { if (hasGameServerDeployment()) { if (!getGameServerDeployment().equals(other.getGameServerDeployment())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -380,7 +311,7 @@ public int hashCode() { hash = (37 * hash) + GAME_SERVER_DEPLOYMENT_FIELD_NUMBER; hash = (53 * hash) + getGameServerDeployment().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -510,17 +441,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.CreateGameServerDeploymentRequest.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 @@ -633,7 +557,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.CreateGameServerDeploymentRe if (other.hasGameServerDeployment()) { mergeGameServerDeployment(other.getGameServerDeployment()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -648,18 +572,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.CreateGameServerDeploymentRequest 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: + { + deploymentId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage( + getGameServerDeploymentFieldBuilder().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.gaming.v1.CreateGameServerDeploymentRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1130,7 +1086,18 @@ public CreateGameServerDeploymentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateGameServerDeploymentRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/CreateRealmRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/CreateRealmRequest.java index 0673b14cfc23..a94292ce6373 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/CreateRealmRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/CreateRealmRequest.java @@ -53,74 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateRealmRequest( - 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(); - - realmId_ = s; - break; - } - case 26: - { - com.google.cloud.gaming.v1.Realm.Builder subBuilder = null; - if (realm_ != null) { - subBuilder = realm_.toBuilder(); - } - realm_ = - input.readMessage(com.google.cloud.gaming.v1.Realm.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(realm_); - realm_ = 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.gaming.v1.Realms .internal_static_google_cloud_gaming_v1_CreateRealmRequest_descriptor; @@ -309,7 +241,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (realm_ != null) { output.writeMessage(3, getRealm()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -327,7 +259,7 @@ public int getSerializedSize() { if (realm_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getRealm()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -349,7 +281,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRealm()) { if (!getRealm().equals(other.getRealm())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -368,7 +300,7 @@ public int hashCode() { hash = (37 * hash) + REALM_FIELD_NUMBER; hash = (53 * hash) + getRealm().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -497,17 +429,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.CreateRealmRequest.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 @@ -617,7 +542,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.CreateRealmRequest other) { if (other.hasRealm()) { mergeRealm(other.getRealm()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -632,17 +557,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.CreateRealmRequest 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: + { + realmId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getRealmFieldBuilder().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.gaming.v1.CreateRealmRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1093,7 +1050,18 @@ public CreateRealmRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateRealmRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/DeleteGameServerClusterRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/DeleteGameServerClusterRequest.java index aa8cc262f002..886b15eb26ca 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/DeleteGameServerClusterRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/DeleteGameServerClusterRequest.java @@ -53,52 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteGameServerClusterRequest( - 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.gaming.v1.GameServerClusters .internal_static_google_cloud_gaming_v1_DeleteGameServerClusterRequest_descriptor; @@ -186,7 +140,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 @@ -198,7 +152,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; } @@ -215,7 +169,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.gaming.v1.DeleteGameServerClusterRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -228,7 +182,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; } @@ -358,17 +312,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.DeleteGameServerClusterRequest.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.gaming.v1.DeleteGameServerClusterReque name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -473,18 +420,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.DeleteGameServerClusterRequest 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.gaming.v1.DeleteGameServerClusterRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -641,7 +607,18 @@ public DeleteGameServerClusterRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteGameServerClusterRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/DeleteGameServerConfigRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/DeleteGameServerConfigRequest.java index 1a1ef493eb4a..35063e11a0f1 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/DeleteGameServerConfigRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/DeleteGameServerConfigRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteGameServerConfigRequest( - 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.gaming.v1.GameServerConfigs .internal_static_google_cloud_gaming_v1_DeleteGameServerConfigRequest_descriptor; @@ -185,7 +139,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 @@ -197,7 +151,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; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.gaming.v1.DeleteGameServerConfigRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,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; } @@ -357,17 +311,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.DeleteGameServerConfigRequest.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 @@ -457,7 +404,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.DeleteGameServerConfigReques name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -472,18 +419,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.DeleteGameServerConfigRequest 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.gaming.v1.DeleteGameServerConfigRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -640,7 +606,18 @@ public DeleteGameServerConfigRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteGameServerConfigRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/DeleteGameServerDeploymentRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/DeleteGameServerDeploymentRequest.java index 8fcffa1e0755..6d736df0695c 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/DeleteGameServerDeploymentRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/DeleteGameServerDeploymentRequest.java @@ -53,52 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteGameServerDeploymentRequest( - 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.gaming.v1.GameServerDeployments .internal_static_google_cloud_gaming_v1_DeleteGameServerDeploymentRequest_descriptor; @@ -186,7 +140,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 @@ -198,7 +152,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; } @@ -215,7 +169,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.gaming.v1.DeleteGameServerDeploymentRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -228,7 +182,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; } @@ -358,17 +312,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.DeleteGameServerDeploymentRequest.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.gaming.v1.DeleteGameServerDeploymentRe name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -475,18 +422,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.DeleteGameServerDeploymentRequest 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.gaming.v1.DeleteGameServerDeploymentRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -644,7 +610,18 @@ public DeleteGameServerDeploymentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteGameServerDeploymentRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/DeleteRealmRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/DeleteRealmRequest.java index 8ac8915514e6..21cd8eee1ecc 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/DeleteRealmRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/DeleteRealmRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteRealmRequest( - 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.gaming.v1.Realms .internal_static_google_cloud_gaming_v1_DeleteRealmRequest_descriptor; @@ -185,7 +139,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 @@ -197,7 +151,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; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.gaming.v1.DeleteRealmRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,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; } @@ -356,17 +310,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.DeleteRealmRequest.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 @@ -455,7 +402,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.DeleteRealmRequest other) { name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -470,17 +417,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.DeleteRealmRequest 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.gaming.v1.DeleteRealmRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -637,7 +604,18 @@ public DeleteRealmRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteRealmRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/DeployedFleetDetails.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/DeployedFleetDetails.java index 0a28cef35edd..27441905ed11 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/DeployedFleetDetails.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/DeployedFleetDetails.java @@ -50,82 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeployedFleetDetails( - 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.gaming.v1.DeployedFleetDetails.DeployedFleet.Builder subBuilder = - null; - if (deployedFleet_ != null) { - subBuilder = deployedFleet_.toBuilder(); - } - deployedFleet_ = - input.readMessage( - com.google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleet.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deployedFleet_); - deployedFleet_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleetAutoscaler.Builder - subBuilder = null; - if (deployedAutoscaler_ != null) { - subBuilder = deployedAutoscaler_.toBuilder(); - } - deployedAutoscaler_ = - input.readMessage( - com.google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleetAutoscaler - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deployedAutoscaler_); - deployedAutoscaler_ = 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.gaming.v1.Common .internal_static_google_cloud_gaming_v1_DeployedFleetDetails_descriptor; @@ -314,95 +238,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeployedFleet( - 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(); - - fleet_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - fleetSpec_ = s; - break; - } - case 26: - { - com.google.cloud.gaming.v1.SpecSource.Builder subBuilder = null; - if (specSource_ != null) { - subBuilder = specSource_.toBuilder(); - } - specSource_ = - input.readMessage( - com.google.cloud.gaming.v1.SpecSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(specSource_); - specSource_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - com.google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleet.DeployedFleetStatus - .Builder - subBuilder = null; - if (status_ != null) { - subBuilder = status_.toBuilder(); - } - status_ = - input.readMessage( - com.google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleet - .DeployedFleetStatus.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(status_); - status_ = 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.gaming.v1.Common .internal_static_google_cloud_gaming_v1_DeployedFleetDetails_DeployedFleet_descriptor; @@ -511,66 +346,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeployedFleetStatus( - 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: - { - readyReplicas_ = input.readInt64(); - break; - } - case 16: - { - allocatedReplicas_ = input.readInt64(); - break; - } - case 24: - { - reservedReplicas_ = input.readInt64(); - break; - } - case 32: - { - replicas_ = input.readInt64(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1.Common .internal_static_google_cloud_gaming_v1_DeployedFleetDetails_DeployedFleet_DeployedFleetStatus_descriptor; @@ -688,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (replicas_ != 0L) { output.writeInt64(4, replicas_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -709,7 +484,7 @@ public int getSerializedSize() { if (replicas_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, replicas_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -731,7 +506,7 @@ public boolean equals(final java.lang.Object obj) { if (getAllocatedReplicas() != other.getAllocatedReplicas()) return false; if (getReservedReplicas() != other.getReservedReplicas()) return false; if (getReplicas() != other.getReplicas()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -750,7 +525,7 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getReservedReplicas()); hash = (37 * hash) + REPLICAS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getReplicas()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -909,17 +684,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleet.DeployedFleetStatus.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 @@ -1041,7 +809,7 @@ public Builder mergeFrom( if (other.getReplicas() != 0L) { setReplicas(other.getReplicas()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1056,20 +824,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleet.DeployedFleetStatus - 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: + { + readyReplicas_ = input.readInt64(); + + break; + } // case 8 + case 16: + { + allocatedReplicas_ = input.readInt64(); + + break; + } // case 16 + case 24: + { + reservedReplicas_ = input.readInt64(); + + break; + } // case 24 + case 32: + { + replicas_ = 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.gaming.v1.DeployedFleetDetails.DeployedFleet.DeployedFleetStatus) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1325,7 +1128,19 @@ public DeployedFleetStatus parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeployedFleetStatus(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(); } }; @@ -1582,7 +1397,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (status_ != null) { output.writeMessage(5, getStatus()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1603,7 +1418,7 @@ public int getSerializedSize() { if (status_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getStatus()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1629,7 +1444,7 @@ public boolean equals(final java.lang.Object obj) { if (hasStatus()) { if (!getStatus().equals(other.getStatus())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1652,7 +1467,7 @@ public int hashCode() { hash = (37 * hash) + STATUS_FIELD_NUMBER; hash = (53 * hash) + getStatus().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1784,17 +1599,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleet.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 @@ -1924,7 +1732,7 @@ public Builder mergeFrom( if (other.hasStatus()) { mergeStatus(other.getStatus()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1939,19 +1747,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleet 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: + { + fleet_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + fleetSpec_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getSpecSourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 42: + { + input.readMessage(getStatusFieldBuilder().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.gaming.v1.DeployedFleetDetails.DeployedFleet) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2627,7 +2471,19 @@ public DeployedFleet parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeployedFleet(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(); } }; @@ -2775,75 +2631,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeployedFleetAutoscaler( - 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(); - - autoscaler_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - fleetAutoscalerSpec_ = s; - break; - } - case 34: - { - com.google.cloud.gaming.v1.SpecSource.Builder subBuilder = null; - if (specSource_ != null) { - subBuilder = specSource_.toBuilder(); - } - specSource_ = - input.readMessage( - com.google.cloud.gaming.v1.SpecSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(specSource_); - specSource_ = 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.gaming.v1.Common .internal_static_google_cloud_gaming_v1_DeployedFleetDetails_DeployedFleetAutoscaler_descriptor; @@ -3032,7 +2819,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (specSource_ != null) { output.writeMessage(4, getSpecSource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3050,7 +2837,7 @@ public int getSerializedSize() { if (specSource_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getSpecSource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3073,7 +2860,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSpecSource().equals(other.getSpecSource())) return false; } if (!getFleetAutoscalerSpec().equals(other.getFleetAutoscalerSpec())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3092,7 +2879,7 @@ public int hashCode() { } hash = (37 * hash) + FLEET_AUTOSCALER_SPEC_FIELD_NUMBER; hash = (53 * hash) + getFleetAutoscalerSpec().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3227,17 +3014,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleetAutoscaler.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 @@ -3358,7 +3138,7 @@ public Builder mergeFrom( fleetAutoscalerSpec_ = other.fleetAutoscalerSpec_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3373,20 +3153,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleetAutoscaler 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: + { + autoscaler_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 26: + { + fleetAutoscalerSpec_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + input.readMessage(getSpecSourceFieldBuilder().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.gaming.v1.DeployedFleetDetails.DeployedFleetAutoscaler) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3832,7 +3641,19 @@ public DeployedFleetAutoscaler parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeployedFleetAutoscaler(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(); } }; @@ -3979,7 +3800,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (deployedAutoscaler_ != null) { output.writeMessage(2, getDeployedAutoscaler()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3994,7 +3815,7 @@ public int getSerializedSize() { if (deployedAutoscaler_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDeployedAutoscaler()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4018,7 +3839,7 @@ public boolean equals(final java.lang.Object obj) { if (hasDeployedAutoscaler()) { if (!getDeployedAutoscaler().equals(other.getDeployedAutoscaler())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4037,7 +3858,7 @@ public int hashCode() { hash = (37 * hash) + DEPLOYED_AUTOSCALER_FIELD_NUMBER; hash = (53 * hash) + getDeployedAutoscaler().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4166,17 +3987,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.DeployedFleetDetails.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 @@ -4287,7 +4101,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.DeployedFleetDetails other) if (other.hasDeployedAutoscaler()) { mergeDeployedAutoscaler(other.getDeployedAutoscaler()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4302,17 +4116,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.DeployedFleetDetails 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(getDeployedFleetFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage( + getDeployedAutoscalerFieldBuilder().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.gaming.v1.DeployedFleetDetails) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4753,7 +4594,18 @@ public DeployedFleetDetails parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeployedFleetDetails(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/FetchDeploymentStateRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/FetchDeploymentStateRequest.java index 84b8a268a4c9..e8bcbaf31f51 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/FetchDeploymentStateRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/FetchDeploymentStateRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FetchDeploymentStateRequest( - 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.gaming.v1.GameServerDeployments .internal_static_google_cloud_gaming_v1_FetchDeploymentStateRequest_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.gaming.v1.FetchDeploymentStateRequest) 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; } @@ -353,17 +307,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.FetchDeploymentStateRequest.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.gaming.v1.FetchDeploymentStateRequest name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -468,18 +415,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.FetchDeploymentStateRequest 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.gaming.v1.FetchDeploymentStateRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -626,7 +592,18 @@ public FetchDeploymentStateRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FetchDeploymentStateRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/FetchDeploymentStateResponse.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/FetchDeploymentStateResponse.java index dbd29ccacbd8..52b0b7a316ae 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/FetchDeploymentStateResponse.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/FetchDeploymentStateResponse.java @@ -53,78 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FetchDeploymentStateResponse( - 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)) { - clusterState_ = - new java.util.ArrayList< - com.google.cloud.gaming.v1.FetchDeploymentStateResponse - .DeployedClusterState>(); - mutable_bitField0_ |= 0x00000001; - } - clusterState_.add( - input.readMessage( - com.google.cloud.gaming.v1.FetchDeploymentStateResponse.DeployedClusterState - .parser(), - extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - unavailable_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - unavailable_.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)) { - clusterState_ = java.util.Collections.unmodifiableList(clusterState_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - unavailable_ = unavailable_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1.GameServerDeployments .internal_static_google_cloud_gaming_v1_FetchDeploymentStateResponse_descriptor; @@ -262,69 +190,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeployedClusterState( - 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(); - - cluster_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - fleetDetails_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - fleetDetails_.add( - input.readMessage( - com.google.cloud.gaming.v1.DeployedFleetDetails.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)) { - fleetDetails_ = java.util.Collections.unmodifiableList(fleetDetails_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1.GameServerDeployments .internal_static_google_cloud_gaming_v1_FetchDeploymentStateResponse_DeployedClusterState_descriptor; @@ -485,7 +350,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < fleetDetails_.size(); i++) { output.writeMessage(2, fleetDetails_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -500,7 +365,7 @@ public int getSerializedSize() { for (int i = 0; i < fleetDetails_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, fleetDetails_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -520,7 +385,7 @@ public boolean equals(final java.lang.Object obj) { if (!getCluster().equals(other.getCluster())) return false; if (!getFleetDetailsList().equals(other.getFleetDetailsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -537,7 +402,7 @@ public int hashCode() { hash = (37 * hash) + FLEET_DETAILS_FIELD_NUMBER; hash = (53 * hash) + getFleetDetailsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -678,19 +543,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.gaming.v1.FetchDeploymentStateResponse.DeployedClusterState.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) { - getFleetDetailsFieldBuilder(); - } } @java.lang.Override @@ -700,10 +556,11 @@ public Builder clear() { if (fleetDetailsBuilder_ == null) { fleetDetails_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + fleetDetails_ = null; fleetDetailsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -834,7 +691,7 @@ public Builder mergeFrom( } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -849,20 +706,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.FetchDeploymentStateResponse.DeployedClusterState 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: + { + cluster_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + com.google.cloud.gaming.v1.DeployedFleetDetails m = + input.readMessage( + com.google.cloud.gaming.v1.DeployedFleetDetails.parser(), + extensionRegistry); + if (fleetDetailsBuilder_ == null) { + ensureFleetDetailsIsMutable(); + fleetDetails_.add(m); + } else { + fleetDetailsBuilder_.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.gaming.v1.FetchDeploymentStateResponse.DeployedClusterState) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1390,7 +1278,19 @@ public DeployedClusterState parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeployedClusterState(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(); } }; @@ -1578,7 +1478,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < unavailable_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, unavailable_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1598,7 +1498,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getUnavailableList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1616,7 +1516,7 @@ public boolean equals(final java.lang.Object obj) { if (!getClusterStateList().equals(other.getClusterStateList())) return false; if (!getUnavailableList().equals(other.getUnavailableList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1635,7 +1535,7 @@ public int hashCode() { hash = (37 * hash) + UNAVAILABLE_FIELD_NUMBER; hash = (53 * hash) + getUnavailableList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1765,19 +1665,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.FetchDeploymentStateResponse.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) { - getClusterStateFieldBuilder(); - } } @java.lang.Override @@ -1785,10 +1676,11 @@ public Builder clear() { super.clear(); if (clusterStateBuilder_ == null) { clusterState_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + clusterState_ = null; clusterStateBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); unavailable_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); return this; @@ -1920,7 +1812,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.FetchDeploymentStateResponse } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1935,18 +1827,53 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.FetchDeploymentStateResponse 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.gaming.v1.FetchDeploymentStateResponse.DeployedClusterState m = + input.readMessage( + com.google.cloud.gaming.v1.FetchDeploymentStateResponse.DeployedClusterState + .parser(), + extensionRegistry); + if (clusterStateBuilder_ == null) { + ensureClusterStateIsMutable(); + clusterState_.add(m); + } else { + clusterStateBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnavailableIsMutable(); + unavailable_.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.gaming.v1.FetchDeploymentStateResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2573,7 +2500,18 @@ public FetchDeploymentStateResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FetchDeploymentStateResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/FleetConfig.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/FleetConfig.java index c9441099f12a..5c03d46bd3dc 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/FleetConfig.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/FleetConfig.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FleetConfig( - 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(); - - fleetSpec_ = s; - break; - } - case 18: - { - 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.gaming.v1.GameServerConfigs .internal_static_google_cloud_gaming_v1_FleetConfig_descriptor; @@ -241,7 +188,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, 2, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -256,7 +203,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -273,7 +220,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFleetSpec().equals(other.getFleetSpec())) return false; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -288,7 +235,7 @@ public int hashCode() { hash = (53 * hash) + getFleetSpec().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; } @@ -417,17 +364,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.FleetConfig.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 @@ -523,7 +463,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.FleetConfig other) { name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -538,17 +478,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.FleetConfig 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: + { + fleetSpec_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + name_ = 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.gaming.v1.FleetConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -801,7 +767,18 @@ public FleetConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FleetConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GameServerCluster.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GameServerCluster.java index aec5c2c1f615..b4a56d83a7cc 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GameServerCluster.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GameServerCluster.java @@ -54,144 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GameServerCluster( - 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: - { - 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 26: - { - 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 34: - { - 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 42: - { - com.google.cloud.gaming.v1.GameServerClusterConnectionInfo.Builder subBuilder = null; - if (connectionInfo_ != null) { - subBuilder = connectionInfo_.toBuilder(); - } - connectionInfo_ = - input.readMessage( - com.google.cloud.gaming.v1.GameServerClusterConnectionInfo.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(connectionInfo_); - connectionInfo_ = subBuilder.buildPartial(); - } - - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 90: - { - com.google.cloud.gaming.v1.KubernetesClusterState.Builder subBuilder = null; - if (clusterState_ != null) { - subBuilder = clusterState_.toBuilder(); - } - clusterState_ = - input.readMessage( - com.google.cloud.gaming.v1.KubernetesClusterState.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(clusterState_); - clusterState_ = 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.gaming.v1.GameServerClusters .internal_static_google_cloud_gaming_v1_GameServerCluster_descriptor; @@ -717,7 +579,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (clusterState_ != null) { output.writeMessage(11, getClusterState()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -757,7 +619,7 @@ public int getSerializedSize() { if (clusterState_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getClusterState()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -793,7 +655,7 @@ public boolean equals(final java.lang.Object obj) { if (hasClusterState()) { if (!getClusterState().equals(other.getClusterState())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -830,7 +692,7 @@ public int hashCode() { hash = (37 * hash) + CLUSTER_STATE_FIELD_NUMBER; hash = (53 * hash) + getClusterState().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -979,17 +841,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.gaming.v1.GameServerCluster.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 @@ -1153,7 +1008,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.GameServerCluster other) { if (other.hasClusterState()) { mergeClusterState(other.getClusterState()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1168,17 +1023,84 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.GameServerCluster 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(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 34 + case 42: + { + input.readMessage(getConnectionInfoFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 50: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 58: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 58 + case 90: + { + input.readMessage(getClusterStateFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 90 + default: + { + 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.gaming.v1.GameServerCluster) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2528,7 +2450,18 @@ public GameServerCluster parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GameServerCluster(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GameServerClusterConnectionInfo.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GameServerClusterConnectionInfo.java index 891015b7f827..08de382d4bba 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GameServerClusterConnectionInfo.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GameServerClusterConnectionInfo.java @@ -53,71 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GameServerClusterConnectionInfo( - 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 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - namespace_ = s; - break; - } - case 58: - { - com.google.cloud.gaming.v1.GkeClusterReference.Builder subBuilder = null; - if (clusterReferenceCase_ == 7) { - subBuilder = - ((com.google.cloud.gaming.v1.GkeClusterReference) clusterReference_) - .toBuilder(); - } - clusterReference_ = - input.readMessage( - com.google.cloud.gaming.v1.GkeClusterReference.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.gaming.v1.GkeClusterReference) clusterReference_); - clusterReference_ = subBuilder.buildPartial(); - } - clusterReferenceCase_ = 7; - 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.gaming.v1.GameServerClusters .internal_static_google_cloud_gaming_v1_GameServerClusterConnectionInfo_descriptor; @@ -301,7 +236,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (clusterReferenceCase_ == 7) { output.writeMessage(7, (com.google.cloud.gaming.v1.GkeClusterReference) clusterReference_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -318,7 +253,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 7, (com.google.cloud.gaming.v1.GkeClusterReference) clusterReference_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -343,7 +278,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; } @@ -364,7 +299,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -494,22 +429,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.GameServerClusterConnectionInfo.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 (gkeClusterReferenceBuilder_ != null) { + gkeClusterReferenceBuilder_.clear(); + } namespace_ = ""; clusterReferenceCase_ = 0; @@ -615,7 +546,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.GameServerClusterConnectionI break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -630,18 +561,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.GameServerClusterConnectionInfo 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 42: + { + namespace_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 58: + { + input.readMessage( + getGkeClusterReferenceFieldBuilder().getBuilder(), extensionRegistry); + clusterReferenceCase_ = 7; + 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.gaming.v1.GameServerClusterConnectionInfo) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1019,7 +976,18 @@ public GameServerClusterConnectionInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GameServerClusterConnectionInfo(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GameServerConfig.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GameServerConfig.java index 3f9282f8d0ea..8cb90652c53a 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GameServerConfig.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GameServerConfig.java @@ -55,132 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GameServerConfig( - 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: - { - 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 26: - { - 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 34: - { - 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 42: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - fleetConfigs_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - fleetConfigs_.add( - input.readMessage( - com.google.cloud.gaming.v1.FleetConfig.parser(), extensionRegistry)); - break; - } - case 50: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - scalingConfigs_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - scalingConfigs_.add( - input.readMessage( - com.google.cloud.gaming.v1.ScalingConfig.parser(), extensionRegistry)); - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = 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_ & 0x00000002) != 0)) { - fleetConfigs_ = java.util.Collections.unmodifiableList(fleetConfigs_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - scalingConfigs_ = java.util.Collections.unmodifiableList(scalingConfigs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1.GameServerConfigs .internal_static_google_cloud_gaming_v1_GameServerConfig_descriptor; @@ -688,7 +562,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, description_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -725,7 +599,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, description_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -754,7 +628,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFleetConfigsList().equals(other.getFleetConfigsList())) return false; if (!getScalingConfigsList().equals(other.getScalingConfigsList())) return false; if (!getDescription().equals(other.getDescription())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -789,7 +663,7 @@ public int hashCode() { } hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -938,20 +812,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.gaming.v1.GameServerConfig.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) { - getFleetConfigsFieldBuilder(); - getScalingConfigsFieldBuilder(); - } } @java.lang.Override @@ -974,16 +838,18 @@ public Builder clear() { internalGetMutableLabels().clear(); if (fleetConfigsBuilder_ == null) { fleetConfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + fleetConfigs_ = null; fleetConfigsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); if (scalingConfigsBuilder_ == null) { scalingConfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + scalingConfigs_ = null; scalingConfigsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); description_ = ""; return this; @@ -1164,7 +1030,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.GameServerConfig other) { description_ = other.description_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1179,17 +1045,92 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.GameServerConfig 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(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 34 + case 42: + { + com.google.cloud.gaming.v1.FleetConfig m = + input.readMessage( + com.google.cloud.gaming.v1.FleetConfig.parser(), extensionRegistry); + if (fleetConfigsBuilder_ == null) { + ensureFleetConfigsIsMutable(); + fleetConfigs_.add(m); + } else { + fleetConfigsBuilder_.addMessage(m); + } + break; + } // case 42 + case 50: + { + com.google.cloud.gaming.v1.ScalingConfig m = + input.readMessage( + com.google.cloud.gaming.v1.ScalingConfig.parser(), extensionRegistry); + if (scalingConfigsBuilder_ == null) { + ensureScalingConfigsIsMutable(); + scalingConfigs_.add(m); + } else { + scalingConfigsBuilder_.addMessage(m); + } + break; + } // case 50 + case 58: + { + description_ = 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.gaming.v1.GameServerConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2743,7 +2684,18 @@ public GameServerConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GameServerConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GameServerConfigOverride.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GameServerConfigOverride.java index 06ea7b98e4d9..a407bb078210 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GameServerConfigOverride.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GameServerConfigOverride.java @@ -50,68 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GameServerConfigOverride( - 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.gaming.v1.RealmSelector.Builder subBuilder = null; - if (selectorCase_ == 1) { - subBuilder = ((com.google.cloud.gaming.v1.RealmSelector) selector_).toBuilder(); - } - selector_ = - input.readMessage( - com.google.cloud.gaming.v1.RealmSelector.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.gaming.v1.RealmSelector) selector_); - selector_ = subBuilder.buildPartial(); - } - selectorCase_ = 1; - break; - } - case 802: - { - java.lang.String s = input.readStringRequireUtf8(); - changeCase_ = 100; - change_ = 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.gaming.v1.GameServerDeployments .internal_static_google_cloud_gaming_v1_GameServerConfigOverride_descriptor; @@ -356,7 +294,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (changeCase_ == 100) { com.google.protobuf.GeneratedMessageV3.writeString(output, 100, change_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -373,7 +311,7 @@ public int getSerializedSize() { if (changeCase_ == 100) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(100, change_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -405,7 +343,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; } @@ -432,7 +370,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -561,22 +499,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.GameServerConfigOverride.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 (realmsSelectorBuilder_ != null) { + realmsSelectorBuilder_.clear(); + } selectorCase_ = 0; selector_ = null; changeCase_ = 0; @@ -694,7 +628,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.GameServerConfigOverride oth break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -709,18 +643,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.GameServerConfigOverride 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(getRealmsSelectorFieldBuilder().getBuilder(), extensionRegistry); + selectorCase_ = 1; + break; + } // case 10 + case 802: + { + java.lang.String s = input.readStringRequireUtf8(); + changeCase_ = 100; + change_ = s; + break; + } // case 802 + default: + { + 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.gaming.v1.GameServerConfigOverride) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1128,7 +1088,18 @@ public GameServerConfigOverride parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GameServerConfigOverride(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GameServerDeployment.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GameServerDeployment.java index 58e997874324..834cdceccadc 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GameServerDeployment.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GameServerDeployment.java @@ -54,110 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GameServerDeployment( - 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: - { - 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 26: - { - 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 34: - { - 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 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = 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.gaming.v1.GameServerDeployments .internal_static_google_cloud_gaming_v1_GameServerDeployment_descriptor; @@ -568,7 +464,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, description_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -602,7 +498,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, description_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -630,7 +526,7 @@ public boolean equals(final java.lang.Object obj) { if (!internalGetLabels().equals(other.internalGetLabels())) return false; if (!getEtag().equals(other.getEtag())) return false; if (!getDescription().equals(other.getDescription())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -659,7 +555,7 @@ public int hashCode() { hash = (53 * hash) + getEtag().hashCode(); hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -808,17 +704,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.gaming.v1.GameServerDeployment.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 @@ -955,7 +844,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.GameServerDeployment other) description_ = other.description_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -970,17 +859,72 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.GameServerDeployment 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(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 34 + case 58: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 58 + case 66: + { + description_ = 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.gaming.v1.GameServerDeployment) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1918,7 +1862,18 @@ public GameServerDeployment parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GameServerDeployment(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GameServerDeploymentRollout.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GameServerDeploymentRollout.java index 8bdc344aaa35..30602d46af5e 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GameServerDeploymentRollout.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GameServerDeploymentRollout.java @@ -56,114 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GameServerDeploymentRollout( - 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: - { - 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 26: - { - 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 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - defaultGameServerConfig_ = s; - break; - } - case 42: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - gameServerConfigOverrides_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - gameServerConfigOverrides_.add( - input.readMessage( - com.google.cloud.gaming.v1.GameServerConfigOverride.parser(), - extensionRegistry)); - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = 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)) { - gameServerConfigOverrides_ = - java.util.Collections.unmodifiableList(gameServerConfigOverrides_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1.GameServerDeployments .internal_static_google_cloud_gaming_v1_GameServerDeploymentRollout_descriptor; @@ -561,7 +453,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, etag_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -590,7 +482,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, etag_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -619,7 +511,7 @@ public boolean equals(final java.lang.Object obj) { if (!getGameServerConfigOverridesList().equals(other.getGameServerConfigOverridesList())) return false; if (!getEtag().equals(other.getEtag())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -648,7 +540,7 @@ public int hashCode() { } hash = (37 * hash) + ETAG_FIELD_NUMBER; hash = (53 * hash) + getEtag().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -779,19 +671,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.GameServerDeploymentRollout.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) { - getGameServerConfigOverridesFieldBuilder(); - } } @java.lang.Override @@ -815,10 +698,11 @@ public Builder clear() { if (gameServerConfigOverridesBuilder_ == null) { gameServerConfigOverrides_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + gameServerConfigOverrides_ = null; gameServerConfigOverridesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); etag_ = ""; return this; @@ -967,7 +851,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.GameServerDeploymentRollout etag_ = other.etag_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -982,18 +866,75 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.GameServerDeploymentRollout 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(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + defaultGameServerConfig_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + com.google.cloud.gaming.v1.GameServerConfigOverride m = + input.readMessage( + com.google.cloud.gaming.v1.GameServerConfigOverride.parser(), + extensionRegistry); + if (gameServerConfigOverridesBuilder_ == null) { + ensureGameServerConfigOverridesIsMutable(); + gameServerConfigOverrides_.add(m); + } else { + gameServerConfigOverridesBuilder_.addMessage(m); + } + break; + } // case 42 + case 50: + { + etag_ = 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.gaming.v1.GameServerDeploymentRollout) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2218,7 +2159,18 @@ public GameServerDeploymentRollout parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GameServerDeploymentRollout(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GetGameServerClusterRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GetGameServerClusterRequest.java index 6a34c325065b..523bb7f8b38b 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GetGameServerClusterRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GetGameServerClusterRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetGameServerClusterRequest( - 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 48: - { - 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.gaming.v1.GameServerClusters .internal_static_google_cloud_gaming_v1_GetGameServerClusterRequest_descriptor; @@ -248,7 +195,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(6, view_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -265,7 +212,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, view_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -283,7 +230,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (view_ != other.view_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -298,7 +245,7 @@ public int hashCode() { hash = (53 * hash) + getName().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; } @@ -428,17 +375,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.GetGameServerClusterRequest.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 @@ -534,7 +474,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.GetGameServerClusterRequest if (other.view_ != 0) { setViewValue(other.getViewValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -549,18 +489,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.GetGameServerClusterRequest 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 48: + { + view_ = input.readEnum(); + + 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.gaming.v1.GetGameServerClusterRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -845,7 +810,18 @@ public GetGameServerClusterRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetGameServerClusterRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GetGameServerConfigRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GetGameServerConfigRequest.java index 5d35537395f7..715f73f27406 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GetGameServerConfigRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GetGameServerConfigRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetGameServerConfigRequest( - 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.gaming.v1.GameServerConfigs .internal_static_google_cloud_gaming_v1_GetGameServerConfigRequest_descriptor; @@ -185,7 +139,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 @@ -197,7 +151,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; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.gaming.v1.GetGameServerConfigRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,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; } @@ -357,17 +311,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.GetGameServerConfigRequest.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 @@ -457,7 +404,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.GetGameServerConfigRequest o name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -472,18 +419,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.GetGameServerConfigRequest 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.gaming.v1.GetGameServerConfigRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -640,7 +606,18 @@ public GetGameServerConfigRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetGameServerConfigRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GetGameServerDeploymentRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GetGameServerDeploymentRequest.java index 5fd46523242c..3e92d4eaf025 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GetGameServerDeploymentRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GetGameServerDeploymentRequest.java @@ -53,52 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetGameServerDeploymentRequest( - 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.gaming.v1.GameServerDeployments .internal_static_google_cloud_gaming_v1_GetGameServerDeploymentRequest_descriptor; @@ -186,7 +140,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 @@ -198,7 +152,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; } @@ -215,7 +169,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.gaming.v1.GetGameServerDeploymentRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -228,7 +182,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; } @@ -358,17 +312,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.GetGameServerDeploymentRequest.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.gaming.v1.GetGameServerDeploymentReque name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -473,18 +420,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.GetGameServerDeploymentRequest 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.gaming.v1.GetGameServerDeploymentRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -641,7 +607,18 @@ public GetGameServerDeploymentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetGameServerDeploymentRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GetGameServerDeploymentRolloutRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GetGameServerDeploymentRolloutRequest.java index aefa4ce52493..f59a1e24ea31 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GetGameServerDeploymentRolloutRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GetGameServerDeploymentRolloutRequest.java @@ -55,52 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetGameServerDeploymentRolloutRequest( - 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.gaming.v1.GameServerDeployments .internal_static_google_cloud_gaming_v1_GetGameServerDeploymentRolloutRequest_descriptor; @@ -188,7 +142,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 @@ -200,7 +154,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.gaming.v1.GetGameServerDeploymentRolloutRequest) 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; } @@ -361,17 +315,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.GetGameServerDeploymentRolloutRequest.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 @@ -464,7 +411,7 @@ public Builder mergeFrom( name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -479,19 +426,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.GetGameServerDeploymentRolloutRequest 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.gaming.v1.GetGameServerDeploymentRolloutRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -650,7 +615,18 @@ public GetGameServerDeploymentRolloutRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetGameServerDeploymentRolloutRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GetRealmRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GetRealmRequest.java index e40367da55b9..c63bf411cce1 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GetRealmRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GetRealmRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetRealmRequest( - 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.gaming.v1.Realms .internal_static_google_cloud_gaming_v1_GetRealmRequest_descriptor; @@ -185,7 +139,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 @@ -197,7 +151,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; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.gaming.v1.GetRealmRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,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; } @@ -356,17 +310,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.GetRealmRequest.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 @@ -455,7 +402,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.GetRealmRequest other) { name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -470,17 +417,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.GetRealmRequest 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.gaming.v1.GetRealmRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -637,7 +604,18 @@ public GetRealmRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetRealmRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GkeClusterReference.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GkeClusterReference.java index 148625d996ad..5d42d6b7cb20 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GkeClusterReference.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/GkeClusterReference.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GkeClusterReference( - 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(); - - cluster_ = 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.gaming.v1.GameServerClusters .internal_static_google_cloud_gaming_v1_GkeClusterReference_descriptor; @@ -193,7 +147,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cluster_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cluster_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -205,7 +159,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cluster_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cluster_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -222,7 +176,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.gaming.v1.GkeClusterReference) obj; if (!getCluster().equals(other.getCluster())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -235,7 +189,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + CLUSTER_FIELD_NUMBER; hash = (53 * hash) + getCluster().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -364,17 +318,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.GkeClusterReference.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 @@ -463,7 +410,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.GkeClusterReference other) { cluster_ = other.cluster_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -478,17 +425,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.GkeClusterReference 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: + { + cluster_ = 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.gaming.v1.GkeClusterReference) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -665,7 +632,18 @@ public GkeClusterReference parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GkeClusterReference(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/KubernetesClusterState.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/KubernetesClusterState.java index 95353282f256..125d188a2b52 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/KubernetesClusterState.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/KubernetesClusterState.java @@ -57,87 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private KubernetesClusterState( - 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(); - - agonesVersionInstalled_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - kubernetesVersionInstalled_ = s; - break; - } - case 24: - { - int rawValue = input.readEnum(); - - installationState_ = rawValue; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - versionInstalledErrorMessage_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - provider_ = s; - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - agonesVersionTargeted_ = 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.gaming.v1.GameServerClusters .internal_static_google_cloud_gaming_v1_KubernetesClusterState_descriptor; @@ -778,7 +697,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agonesVersionTargeted_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, agonesVersionTargeted_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -811,7 +730,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agonesVersionTargeted_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, agonesVersionTargeted_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -835,7 +754,7 @@ public boolean equals(final java.lang.Object obj) { return false; if (!getProvider().equals(other.getProvider())) return false; if (!getAgonesVersionTargeted().equals(other.getAgonesVersionTargeted())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -858,7 +777,7 @@ public int hashCode() { hash = (53 * hash) + getProvider().hashCode(); hash = (37 * hash) + AGONES_VERSION_TARGETED_FIELD_NUMBER; hash = (53 * hash) + getAgonesVersionTargeted().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -987,17 +906,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.KubernetesClusterState.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 @@ -1121,7 +1033,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.KubernetesClusterState other agonesVersionTargeted_ = other.agonesVersionTargeted_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1136,18 +1048,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.KubernetesClusterState 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: + { + agonesVersionInstalled_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + kubernetesVersionInstalled_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + installationState_ = input.readEnum(); + + break; + } // case 24 + case 34: + { + versionInstalledErrorMessage_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + provider_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + agonesVersionTargeted_ = 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.gaming.v1.KubernetesClusterState) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1859,7 +1820,18 @@ public KubernetesClusterState parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new KubernetesClusterState(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/LabelSelector.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/LabelSelector.java index 07188de4e866..daa8ef2e49bc 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/LabelSelector.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/LabelSelector.java @@ -50,59 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private LabelSelector( - 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)) { - 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; - } - 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.gaming.v1.Common .internal_static_google_cloud_gaming_v1_LabelSelector_descriptor; @@ -243,7 +190,7 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 1); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -262,7 +209,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, labels__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -278,7 +225,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.gaming.v1.LabelSelector other = (com.google.cloud.gaming.v1.LabelSelector) obj; if (!internalGetLabels().equals(other.internalGetLabels())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -293,7 +240,7 @@ public int hashCode() { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -442,17 +389,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.gaming.v1.LabelSelector.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 @@ -539,7 +479,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.gaming.v1.LabelSelector other) { if (other == com.google.cloud.gaming.v1.LabelSelector.getDefaultInstance()) return this; internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -554,17 +494,42 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.LabelSelector 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 labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.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.gaming.v1.LabelSelector) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -760,7 +725,18 @@ public LabelSelector parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new LabelSelector(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ListGameServerClustersRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ListGameServerClustersRequest.java index e0f10326ed89..05d77925a223 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ListGameServerClustersRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ListGameServerClustersRequest.java @@ -56,85 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListGameServerClustersRequest( - 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; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - case 48: - { - 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.gaming.v1.GameServerClusters .internal_static_google_cloud_gaming_v1_ListGameServerClustersRequest_descriptor; @@ -460,7 +381,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(6, view_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -489,7 +410,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, view_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -511,7 +432,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFilter().equals(other.getFilter())) return false; if (!getOrderBy().equals(other.getOrderBy())) return false; if (view_ != other.view_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -534,7 +455,7 @@ public int hashCode() { hash = (53 * hash) + getOrderBy().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; } @@ -664,17 +585,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.ListGameServerClustersRequest.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 @@ -797,7 +711,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.ListGameServerClustersReques if (other.view_ != 0) { setViewValue(other.getViewValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -812,18 +726,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.ListGameServerClustersRequest 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 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 48: + { + view_ = input.readEnum(); + + 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.gaming.v1.ListGameServerClustersRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1495,7 +1458,18 @@ public ListGameServerClustersRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListGameServerClustersRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ListGameServerClustersResponse.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ListGameServerClustersResponse.java index c29cf3d51374..0a17dab01021 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ListGameServerClustersResponse.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ListGameServerClustersResponse.java @@ -55,81 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListGameServerClustersResponse( - 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)) { - gameServerClusters_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - gameServerClusters_.add( - input.readMessage( - com.google.cloud.gaming.v1.GameServerCluster.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - unreachable_.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)) { - gameServerClusters_ = java.util.Collections.unmodifiableList(gameServerClusters_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1.GameServerClusters .internal_static_google_cloud_gaming_v1_ListGameServerClustersResponse_descriptor; @@ -350,7 +275,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < unreachable_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, unreachable_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -374,7 +299,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getUnreachableList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -393,7 +318,7 @@ public boolean equals(final java.lang.Object obj) { if (!getGameServerClustersList().equals(other.getGameServerClustersList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; if (!getUnreachableList().equals(other.getUnreachableList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -414,7 +339,7 @@ public int hashCode() { hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; hash = (53 * hash) + getUnreachableList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -544,19 +469,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.ListGameServerClustersResponse.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) { - getGameServerClustersFieldBuilder(); - } } @java.lang.Override @@ -564,10 +480,11 @@ public Builder clear() { super.clear(); if (gameServerClustersBuilder_ == null) { gameServerClusters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + gameServerClusters_ = null; gameServerClustersBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; @@ -706,7 +623,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.ListGameServerClustersRespon } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -721,18 +638,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.ListGameServerClustersResponse 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.gaming.v1.GameServerCluster m = + input.readMessage( + com.google.cloud.gaming.v1.GameServerCluster.parser(), extensionRegistry); + if (gameServerClustersBuilder_ == null) { + ensureGameServerClustersIsMutable(); + gameServerClusters_.add(m); + } else { + gameServerClustersBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.gaming.v1.ListGameServerClustersResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1410,7 +1366,18 @@ public ListGameServerClustersResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListGameServerClustersResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ListGameServerConfigsRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ListGameServerConfigsRequest.java index 3372b2902117..5af8d0940fa7 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ListGameServerConfigsRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ListGameServerConfigsRequest.java @@ -55,78 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListGameServerConfigsRequest( - 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; - } - case 42: - { - 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 { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1.GameServerConfigs .internal_static_google_cloud_gaming_v1_ListGameServerConfigsRequest_descriptor; @@ -397,7 +325,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, 5, orderBy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -421,7 +349,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -442,7 +370,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPageToken().equals(other.getPageToken())) return false; if (!getFilter().equals(other.getFilter())) 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; } @@ -463,7 +391,7 @@ public int hashCode() { hash = (53 * hash) + getFilter().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; } @@ -593,17 +521,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.ListGameServerConfigsRequest.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 @@ -720,7 +641,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.ListGameServerConfigsRequest orderBy_ = other.orderBy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -735,18 +656,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.ListGameServerConfigsRequest 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 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + + 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.gaming.v1.ListGameServerConfigsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1290,7 +1254,18 @@ public ListGameServerConfigsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListGameServerConfigsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ListGameServerConfigsResponse.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ListGameServerConfigsResponse.java index 7b26ec32f967..0dc28a496106 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ListGameServerConfigsResponse.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ListGameServerConfigsResponse.java @@ -54,81 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListGameServerConfigsResponse( - 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)) { - gameServerConfigs_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - gameServerConfigs_.add( - input.readMessage( - com.google.cloud.gaming.v1.GameServerConfig.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - unreachable_.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)) { - gameServerConfigs_ = java.util.Collections.unmodifiableList(gameServerConfigs_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1.GameServerConfigs .internal_static_google_cloud_gaming_v1_ListGameServerConfigsResponse_descriptor; @@ -349,7 +274,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < unreachable_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, unreachable_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -373,7 +298,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getUnreachableList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -392,7 +317,7 @@ public boolean equals(final java.lang.Object obj) { if (!getGameServerConfigsList().equals(other.getGameServerConfigsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; if (!getUnreachableList().equals(other.getUnreachableList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -413,7 +338,7 @@ public int hashCode() { hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; hash = (53 * hash) + getUnreachableList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -543,19 +468,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.ListGameServerConfigsResponse.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) { - getGameServerConfigsFieldBuilder(); - } } @java.lang.Override @@ -563,10 +479,11 @@ public Builder clear() { super.clear(); if (gameServerConfigsBuilder_ == null) { gameServerConfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + gameServerConfigs_ = null; gameServerConfigsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; @@ -705,7 +622,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.ListGameServerConfigsRespons } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -720,18 +637,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.ListGameServerConfigsResponse 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.gaming.v1.GameServerConfig m = + input.readMessage( + com.google.cloud.gaming.v1.GameServerConfig.parser(), extensionRegistry); + if (gameServerConfigsBuilder_ == null) { + ensureGameServerConfigsIsMutable(); + gameServerConfigs_.add(m); + } else { + gameServerConfigsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.gaming.v1.ListGameServerConfigsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1408,7 +1364,18 @@ public ListGameServerConfigsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListGameServerConfigsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ListGameServerDeploymentsRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ListGameServerDeploymentsRequest.java index 155f41fd3ed2..86de144977c4 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ListGameServerDeploymentsRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ListGameServerDeploymentsRequest.java @@ -56,78 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListGameServerDeploymentsRequest( - 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; - } - case 42: - { - 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 { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1.GameServerDeployments .internal_static_google_cloud_gaming_v1_ListGameServerDeploymentsRequest_descriptor; @@ -400,7 +328,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, 5, orderBy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -424,7 +352,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -445,7 +373,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPageToken().equals(other.getPageToken())) return false; if (!getFilter().equals(other.getFilter())) 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; } @@ -466,7 +394,7 @@ public int hashCode() { hash = (53 * hash) + getFilter().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; } @@ -596,17 +524,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.ListGameServerDeploymentsRequest.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 @@ -723,7 +644,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.ListGameServerDeploymentsReq orderBy_ = other.orderBy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -738,18 +659,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.ListGameServerDeploymentsRequest 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 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + + 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.gaming.v1.ListGameServerDeploymentsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1298,7 +1262,18 @@ public ListGameServerDeploymentsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListGameServerDeploymentsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ListGameServerDeploymentsResponse.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ListGameServerDeploymentsResponse.java index 0819a85337aa..7e08c736cb39 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ListGameServerDeploymentsResponse.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ListGameServerDeploymentsResponse.java @@ -55,81 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListGameServerDeploymentsResponse( - 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)) { - gameServerDeployments_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - gameServerDeployments_.add( - input.readMessage( - com.google.cloud.gaming.v1.GameServerDeployment.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - unreachable_.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)) { - gameServerDeployments_ = java.util.Collections.unmodifiableList(gameServerDeployments_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1.GameServerDeployments .internal_static_google_cloud_gaming_v1_ListGameServerDeploymentsResponse_descriptor; @@ -351,7 +276,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < unreachable_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, unreachable_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -376,7 +301,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getUnreachableList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -395,7 +320,7 @@ public boolean equals(final java.lang.Object obj) { if (!getGameServerDeploymentsList().equals(other.getGameServerDeploymentsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; if (!getUnreachableList().equals(other.getUnreachableList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -416,7 +341,7 @@ public int hashCode() { hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; hash = (53 * hash) + getUnreachableList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -546,19 +471,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.ListGameServerDeploymentsResponse.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) { - getGameServerDeploymentsFieldBuilder(); - } } @java.lang.Override @@ -566,10 +482,11 @@ public Builder clear() { super.clear(); if (gameServerDeploymentsBuilder_ == null) { gameServerDeployments_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + gameServerDeployments_ = null; gameServerDeploymentsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; @@ -710,7 +627,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.ListGameServerDeploymentsRes } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -725,18 +642,58 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.ListGameServerDeploymentsResponse 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.gaming.v1.GameServerDeployment m = + input.readMessage( + com.google.cloud.gaming.v1.GameServerDeployment.parser(), + extensionRegistry); + if (gameServerDeploymentsBuilder_ == null) { + ensureGameServerDeploymentsIsMutable(); + gameServerDeployments_.add(m); + } else { + gameServerDeploymentsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.gaming.v1.ListGameServerDeploymentsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1434,7 +1391,18 @@ public ListGameServerDeploymentsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListGameServerDeploymentsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ListRealmsRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ListRealmsRequest.java index 47aee687d2ac..abbbbfc04d88 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ListRealmsRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ListRealmsRequest.java @@ -55,78 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRealmsRequest( - 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; - } - case 42: - { - 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 { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1.Realms .internal_static_google_cloud_gaming_v1_ListRealmsRequest_descriptor; @@ -399,7 +327,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, 5, orderBy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -423,7 +351,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -444,7 +372,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPageToken().equals(other.getPageToken())) return false; if (!getFilter().equals(other.getFilter())) 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; } @@ -465,7 +393,7 @@ public int hashCode() { hash = (53 * hash) + getFilter().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; } @@ -594,17 +522,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.ListRealmsRequest.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 @@ -720,7 +641,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.ListRealmsRequest other) { orderBy_ = other.orderBy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -735,17 +656,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.ListRealmsRequest 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 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + + 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.gaming.v1.ListRealmsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1294,7 +1259,18 @@ public ListRealmsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRealmsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ListRealmsResponse.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ListRealmsResponse.java index 232238d5523c..fe08a58b2764 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ListRealmsResponse.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ListRealmsResponse.java @@ -54,79 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRealmsResponse( - 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)) { - realms_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - realms_.add( - input.readMessage(com.google.cloud.gaming.v1.Realm.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - unreachable_.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)) { - realms_ = java.util.Collections.unmodifiableList(realms_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1.Realms .internal_static_google_cloud_gaming_v1_ListRealmsResponse_descriptor; @@ -346,7 +273,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < unreachable_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -369,7 +296,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getUnreachableList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -388,7 +315,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRealmsList().equals(other.getRealmsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; if (!getUnreachableList().equals(other.getUnreachableList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -409,7 +336,7 @@ public int hashCode() { hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; hash = (53 * hash) + getUnreachableList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -538,19 +465,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.ListRealmsResponse.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) { - getRealmsFieldBuilder(); - } } @java.lang.Override @@ -558,10 +476,11 @@ public Builder clear() { super.clear(); if (realmsBuilder_ == null) { realms_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + realms_ = null; realmsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; @@ -699,7 +618,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.ListRealmsResponse other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -714,17 +633,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.ListRealmsResponse 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.gaming.v1.Realm m = + input.readMessage(com.google.cloud.gaming.v1.Realm.parser(), extensionRegistry); + if (realmsBuilder_ == null) { + ensureRealmsIsMutable(); + realms_.add(m); + } else { + realmsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.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.gaming.v1.ListRealmsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1387,7 +1345,18 @@ public ListRealmsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRealmsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/OperationMetadata.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/OperationMetadata.java index fa5c17c0a065..e3ccaa753193 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/OperationMetadata.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/OperationMetadata.java @@ -56,141 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private OperationMetadata( - 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 (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 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; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - target_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - verb_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - statusMessage_ = s; - break; - } - case 48: - { - requestedCancellation_ = input.readBool(); - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - apiVersion_ = s; - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - unreachable_.add(s); - break; - } - case 74: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - operationStatus_ = - com.google.protobuf.MapField.newMapField( - OperationStatusDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.gaming.v1.OperationStatus> - operationStatus__ = - input.readMessage( - OperationStatusDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - operationStatus_ - .getMutableMap() - .put(operationStatus__.getKey(), operationStatus__.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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1.Common .internal_static_google_cloud_gaming_v1_OperationMetadata_descriptor; @@ -763,7 +628,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetOperationStatus(), OperationStatusDefaultEntryHolder.defaultEntry, 9); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -812,7 +677,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, operationStatus__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -843,7 +708,7 @@ public boolean equals(final java.lang.Object obj) { if (!getApiVersion().equals(other.getApiVersion())) return false; if (!getUnreachableList().equals(other.getUnreachableList())) return false; if (!internalGetOperationStatus().equals(other.internalGetOperationStatus())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -880,7 +745,7 @@ public int hashCode() { hash = (37 * hash) + OPERATION_STATUS_FIELD_NUMBER; hash = (53 * hash) + internalGetOperationStatus().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1029,17 +894,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.gaming.v1.OperationMetadata.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 @@ -1205,7 +1063,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.OperationMetadata other) { onChanged(); } internalGetMutableOperationStatus().mergeFrom(other.internalGetOperationStatus()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1220,17 +1078,93 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.OperationMetadata 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 + case 18: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + target_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + verb_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + statusMessage_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 48: + { + requestedCancellation_ = input.readBool(); + + break; + } // case 48 + case 58: + { + apiVersion_ = input.readStringRequireUtf8(); + + break; + } // case 58 + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 66 + case 74: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.gaming.v1.OperationStatus> + operationStatus__ = + input.readMessage( + OperationStatusDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableOperationStatus() + .getMutableMap() + .put(operationStatus__.getKey(), operationStatus__.getValue()); + 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.gaming.v1.OperationMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2519,7 +2453,18 @@ public OperationMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OperationMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/OperationStatus.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/OperationStatus.java index 7ba25622e917..fce10880fada 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/OperationStatus.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/OperationStatus.java @@ -45,64 +45,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private OperationStatus( - 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: - { - done_ = input.readBool(); - break; - } - case 16: - { - int rawValue = input.readEnum(); - - errorCode_ = rawValue; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - errorMessage_ = 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.gaming.v1.Common .internal_static_google_cloud_gaming_v1_OperationStatus_descriptor; @@ -355,7 +297,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorMessage_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, errorMessage_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -375,7 +317,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorMessage_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, errorMessage_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -394,7 +336,7 @@ public boolean equals(final java.lang.Object obj) { if (getDone() != other.getDone()) return false; if (errorCode_ != other.errorCode_) return false; if (!getErrorMessage().equals(other.getErrorMessage())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -411,7 +353,7 @@ public int hashCode() { hash = (53 * hash) + errorCode_; hash = (37 * hash) + ERROR_MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getErrorMessage().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -532,17 +474,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.OperationStatus.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 @@ -643,7 +578,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.OperationStatus other) { errorMessage_ = other.errorMessage_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -658,17 +593,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.OperationStatus 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: + { + done_ = input.readBool(); + + break; + } // case 8 + case 16: + { + errorCode_ = input.readEnum(); + + break; + } // case 16 + case 26: + { + errorMessage_ = 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.gaming.v1.OperationStatus) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -955,7 +922,18 @@ public OperationStatus parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OperationStatus(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewCreateGameServerClusterRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewCreateGameServerClusterRequest.java index f6cefdaef003..670b69e26de8 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewCreateGameServerClusterRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewCreateGameServerClusterRequest.java @@ -56,97 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PreviewCreateGameServerClusterRequest( - 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(); - - gameServerClusterId_ = s; - break; - } - case 26: - { - com.google.cloud.gaming.v1.GameServerCluster.Builder subBuilder = null; - if (gameServerCluster_ != null) { - subBuilder = gameServerCluster_.toBuilder(); - } - gameServerCluster_ = - input.readMessage( - com.google.cloud.gaming.v1.GameServerCluster.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(gameServerCluster_); - gameServerCluster_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (previewTime_ != null) { - subBuilder = previewTime_.toBuilder(); - } - previewTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(previewTime_); - previewTime_ = subBuilder.buildPartial(); - } - - break; - } - case 48: - { - 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.gaming.v1.GameServerClusters .internal_static_google_cloud_gaming_v1_PreviewCreateGameServerClusterRequest_descriptor; @@ -448,7 +357,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(6, view_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -474,7 +383,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, view_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -501,7 +410,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPreviewTime().equals(other.getPreviewTime())) return false; } if (view_ != other.view_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -526,7 +435,7 @@ public int 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; } @@ -656,17 +565,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.PreviewCreateGameServerClusterRequest.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 @@ -800,7 +702,7 @@ public Builder mergeFrom( if (other.view_ != 0) { setViewValue(other.getViewValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -815,19 +717,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.PreviewCreateGameServerClusterRequest 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: + { + gameServerClusterId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage( + getGameServerClusterFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + input.readMessage(getPreviewTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 48: + { + view_ = input.readEnum(); + + 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.gaming.v1.PreviewCreateGameServerClusterRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1613,7 +1558,18 @@ public PreviewCreateGameServerClusterRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PreviewCreateGameServerClusterRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewCreateGameServerClusterResponse.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewCreateGameServerClusterResponse.java index 2a532d3d80c8..91fa98dc3817 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewCreateGameServerClusterResponse.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewCreateGameServerClusterResponse.java @@ -55,85 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PreviewCreateGameServerClusterResponse( - 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 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - case 26: - { - com.google.cloud.gaming.v1.TargetState.Builder subBuilder = null; - if (targetState_ != null) { - subBuilder = targetState_.toBuilder(); - } - targetState_ = - input.readMessage( - com.google.cloud.gaming.v1.TargetState.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetState_); - targetState_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - com.google.cloud.gaming.v1.KubernetesClusterState.Builder subBuilder = null; - if (clusterState_ != null) { - subBuilder = clusterState_.toBuilder(); - } - clusterState_ = - input.readMessage( - com.google.cloud.gaming.v1.KubernetesClusterState.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(clusterState_); - clusterState_ = 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.gaming.v1.GameServerClusters .internal_static_google_cloud_gaming_v1_PreviewCreateGameServerClusterResponse_descriptor; @@ -326,7 +247,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (clusterState_ != null) { output.writeMessage(4, getClusterState()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -344,7 +265,7 @@ public int getSerializedSize() { if (clusterState_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getClusterState()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -369,7 +290,7 @@ public boolean equals(final java.lang.Object obj) { if (hasClusterState()) { if (!getClusterState().equals(other.getClusterState())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -390,7 +311,7 @@ public int hashCode() { hash = (37 * hash) + CLUSTER_STATE_FIELD_NUMBER; hash = (53 * hash) + getClusterState().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -523,17 +444,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.gaming.v1.PreviewCreateGameServerClusterResponse.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 @@ -654,7 +568,7 @@ public Builder mergeFrom( if (other.hasClusterState()) { mergeClusterState(other.getClusterState()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -669,19 +583,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.PreviewCreateGameServerClusterResponse 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: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getTargetStateFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + input.readMessage(getClusterStateFieldBuilder().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.gaming.v1.PreviewCreateGameServerClusterResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1223,7 +1167,18 @@ public PreviewCreateGameServerClusterResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PreviewCreateGameServerClusterResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewDeleteGameServerClusterRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewDeleteGameServerClusterRequest.java index 864855c4d5b7..ddaf6145946c 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewDeleteGameServerClusterRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewDeleteGameServerClusterRequest.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PreviewDeleteGameServerClusterRequest( - 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.protobuf.Timestamp.Builder subBuilder = null; - if (previewTime_ != null) { - subBuilder = previewTime_.toBuilder(); - } - previewTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(previewTime_); - previewTime_ = 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.gaming.v1.GameServerClusters .internal_static_google_cloud_gaming_v1_PreviewDeleteGameServerClusterRequest_descriptor; @@ -254,7 +193,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (previewTime_ != null) { output.writeMessage(2, getPreviewTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -269,7 +208,7 @@ public int getSerializedSize() { if (previewTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPreviewTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -290,7 +229,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPreviewTime()) { if (!getPreviewTime().equals(other.getPreviewTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -307,7 +246,7 @@ public int hashCode() { hash = (37 * hash) + PREVIEW_TIME_FIELD_NUMBER; hash = (53 * hash) + getPreviewTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -437,17 +376,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.PreviewDeleteGameServerClusterRequest.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 @@ -554,7 +486,7 @@ public Builder mergeFrom( if (other.hasPreviewTime()) { mergePreviewTime(other.getPreviewTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -569,19 +501,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.PreviewDeleteGameServerClusterRequest 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(getPreviewTimeFieldBuilder().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.gaming.v1.PreviewDeleteGameServerClusterRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -934,7 +890,18 @@ public PreviewDeleteGameServerClusterRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PreviewDeleteGameServerClusterRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewDeleteGameServerClusterResponse.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewDeleteGameServerClusterResponse.java index d003c05136de..13e415165106 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewDeleteGameServerClusterResponse.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewDeleteGameServerClusterResponse.java @@ -55,68 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PreviewDeleteGameServerClusterResponse( - 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 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - case 26: - { - com.google.cloud.gaming.v1.TargetState.Builder subBuilder = null; - if (targetState_ != null) { - subBuilder = targetState_.toBuilder(); - } - targetState_ = - input.readMessage( - com.google.cloud.gaming.v1.TargetState.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetState_); - targetState_ = 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.gaming.v1.GameServerClusters .internal_static_google_cloud_gaming_v1_PreviewDeleteGameServerClusterResponse_descriptor; @@ -249,7 +187,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (targetState_ != null) { output.writeMessage(3, getTargetState()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -264,7 +202,7 @@ public int getSerializedSize() { if (targetState_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTargetState()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -285,7 +223,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTargetState()) { if (!getTargetState().equals(other.getTargetState())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -302,7 +240,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_STATE_FIELD_NUMBER; hash = (53 * hash) + getTargetState().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -435,17 +373,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.gaming.v1.PreviewDeleteGameServerClusterResponse.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 @@ -552,7 +483,7 @@ public Builder mergeFrom( if (other.hasTargetState()) { mergeTargetState(other.getTargetState()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -567,19 +498,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.PreviewDeleteGameServerClusterResponse 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: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getTargetStateFieldBuilder().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.gaming.v1.PreviewDeleteGameServerClusterResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -908,7 +863,18 @@ public PreviewDeleteGameServerClusterResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PreviewDeleteGameServerClusterResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewGameServerDeploymentRolloutRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewGameServerDeploymentRolloutRequest.java index 2fe6e1baf08d..990becfded18 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewGameServerDeploymentRolloutRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewGameServerDeploymentRolloutRequest.java @@ -52,92 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PreviewGameServerDeploymentRolloutRequest( - 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.gaming.v1.GameServerDeploymentRollout.Builder subBuilder = null; - if (rollout_ != null) { - subBuilder = rollout_.toBuilder(); - } - rollout_ = - input.readMessage( - com.google.cloud.gaming.v1.GameServerDeploymentRollout.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(rollout_); - rollout_ = 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; - } - case 26: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (previewTime_ != null) { - subBuilder = previewTime_.toBuilder(); - } - previewTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(previewTime_); - previewTime_ = 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.gaming.v1.GameServerDeployments .internal_static_google_cloud_gaming_v1_PreviewGameServerDeploymentRolloutRequest_descriptor; @@ -340,7 +254,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (previewTime_ != null) { output.writeMessage(3, getPreviewTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -358,7 +272,7 @@ public int getSerializedSize() { if (previewTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPreviewTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -386,7 +300,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPreviewTime()) { if (!getPreviewTime().equals(other.getPreviewTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -409,7 +323,7 @@ public int hashCode() { hash = (37 * hash) + PREVIEW_TIME_FIELD_NUMBER; hash = (53 * hash) + getPreviewTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -541,17 +455,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.gaming.v1.PreviewGameServerDeploymentRolloutRequest.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 +588,7 @@ public Builder mergeFrom( if (other.hasPreviewTime()) { mergePreviewTime(other.getPreviewTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -696,19 +603,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.PreviewGameServerDeploymentRolloutRequest 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(getRolloutFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getPreviewTimeFieldBuilder().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.gaming.v1.PreviewGameServerDeploymentRolloutRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1373,7 +1310,19 @@ public PreviewGameServerDeploymentRolloutRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PreviewGameServerDeploymentRolloutRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewGameServerDeploymentRolloutResponse.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewGameServerDeploymentRolloutResponse.java index 21100aad7a07..2358ca06a3d9 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewGameServerDeploymentRolloutResponse.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewGameServerDeploymentRolloutResponse.java @@ -56,82 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PreviewGameServerDeploymentRolloutResponse( - 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: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - unavailable_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - unavailable_.add(s); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - case 34: - { - com.google.cloud.gaming.v1.TargetState.Builder subBuilder = null; - if (targetState_ != null) { - subBuilder = targetState_.toBuilder(); - } - targetState_ = - input.readMessage( - com.google.cloud.gaming.v1.TargetState.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetState_); - targetState_ = 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)) { - unavailable_ = unavailable_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1.GameServerDeployments .internal_static_google_cloud_gaming_v1_PreviewGameServerDeploymentRolloutResponse_descriptor; @@ -328,7 +252,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (targetState_ != null) { output.writeMessage(4, getTargetState()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -351,7 +275,7 @@ public int getSerializedSize() { if (targetState_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getTargetState()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -373,7 +297,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTargetState()) { if (!getTargetState().equals(other.getTargetState())) 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) + TARGET_STATE_FIELD_NUMBER; hash = (53 * hash) + getTargetState().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -527,17 +451,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.gaming.v1.PreviewGameServerDeploymentRolloutResponse.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 @@ -664,7 +581,7 @@ public Builder mergeFrom( if (other.hasTargetState()) { mergeTargetState(other.getTargetState()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -679,19 +596,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.PreviewGameServerDeploymentRolloutResponse 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: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnavailableIsMutable(); + unavailable_.add(s); + break; + } // case 18 + case 26: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + input.readMessage(getTargetStateFieldBuilder().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.gaming.v1.PreviewGameServerDeploymentRolloutResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1191,7 +1139,19 @@ public PreviewGameServerDeploymentRolloutResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PreviewGameServerDeploymentRolloutResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewRealmUpdateRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewRealmUpdateRequest.java index 0c0e66542138..623ffa4cffcf 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewRealmUpdateRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewRealmUpdateRequest.java @@ -50,90 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PreviewRealmUpdateRequest( - 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.gaming.v1.Realm.Builder subBuilder = null; - if (realm_ != null) { - subBuilder = realm_.toBuilder(); - } - realm_ = - input.readMessage(com.google.cloud.gaming.v1.Realm.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(realm_); - realm_ = 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; - } - case 26: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (previewTime_ != null) { - subBuilder = previewTime_.toBuilder(); - } - previewTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(previewTime_); - previewTime_ = 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.gaming.v1.Realms .internal_static_google_cloud_gaming_v1_PreviewRealmUpdateRequest_descriptor; @@ -325,7 +241,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (previewTime_ != null) { output.writeMessage(3, getPreviewTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -343,7 +259,7 @@ public int getSerializedSize() { if (previewTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPreviewTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -371,7 +287,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPreviewTime()) { if (!getPreviewTime().equals(other.getPreviewTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -394,7 +310,7 @@ public int hashCode() { hash = (37 * hash) + PREVIEW_TIME_FIELD_NUMBER; hash = (53 * hash) + getPreviewTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -523,17 +439,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.PreviewRealmUpdateRequest.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 +567,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.PreviewRealmUpdateRequest ot if (other.hasPreviewTime()) { mergePreviewTime(other.getPreviewTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -673,18 +582,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.PreviewRealmUpdateRequest 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(getRealmFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getPreviewTimeFieldBuilder().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.gaming.v1.PreviewRealmUpdateRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1321,7 +1261,18 @@ public PreviewRealmUpdateRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PreviewRealmUpdateRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewRealmUpdateResponse.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewRealmUpdateResponse.java index 52b6d7deea90..63699b14639e 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewRealmUpdateResponse.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewRealmUpdateResponse.java @@ -52,68 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PreviewRealmUpdateResponse( - 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 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - case 26: - { - com.google.cloud.gaming.v1.TargetState.Builder subBuilder = null; - if (targetState_ != null) { - subBuilder = targetState_.toBuilder(); - } - targetState_ = - input.readMessage( - com.google.cloud.gaming.v1.TargetState.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetState_); - targetState_ = 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.gaming.v1.Realms .internal_static_google_cloud_gaming_v1_PreviewRealmUpdateResponse_descriptor; @@ -246,7 +184,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (targetState_ != null) { output.writeMessage(3, getTargetState()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -261,7 +199,7 @@ public int getSerializedSize() { if (targetState_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTargetState()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -282,7 +220,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTargetState()) { if (!getTargetState().equals(other.getTargetState())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -299,7 +237,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_STATE_FIELD_NUMBER; hash = (53 * hash) + getTargetState().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -429,17 +367,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.PreviewRealmUpdateResponse.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 @@ -543,7 +474,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.PreviewRealmUpdateResponse o if (other.hasTargetState()) { mergeTargetState(other.getTargetState()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -558,18 +489,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.PreviewRealmUpdateResponse 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: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getTargetStateFieldBuilder().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.gaming.v1.PreviewRealmUpdateResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -896,7 +852,18 @@ public PreviewRealmUpdateResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PreviewRealmUpdateResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewUpdateGameServerClusterRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewUpdateGameServerClusterRequest.java index 5d374784a26e..d5ec1455b392 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewUpdateGameServerClusterRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewUpdateGameServerClusterRequest.java @@ -52,91 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PreviewUpdateGameServerClusterRequest( - 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.gaming.v1.GameServerCluster.Builder subBuilder = null; - if (gameServerCluster_ != null) { - subBuilder = gameServerCluster_.toBuilder(); - } - gameServerCluster_ = - input.readMessage( - com.google.cloud.gaming.v1.GameServerCluster.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(gameServerCluster_); - gameServerCluster_ = 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; - } - case 26: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (previewTime_ != null) { - subBuilder = previewTime_.toBuilder(); - } - previewTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(previewTime_); - previewTime_ = 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.gaming.v1.GameServerClusters .internal_static_google_cloud_gaming_v1_PreviewUpdateGameServerClusterRequest_descriptor; @@ -336,7 +251,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (previewTime_ != null) { output.writeMessage(3, getPreviewTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -354,7 +269,7 @@ public int getSerializedSize() { if (previewTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPreviewTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -382,7 +297,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPreviewTime()) { if (!getPreviewTime().equals(other.getPreviewTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -405,7 +320,7 @@ public int hashCode() { hash = (37 * hash) + PREVIEW_TIME_FIELD_NUMBER; hash = (53 * hash) + getPreviewTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -535,17 +450,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.PreviewUpdateGameServerClusterRequest.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 @@ -673,7 +581,7 @@ public Builder mergeFrom( if (other.hasPreviewTime()) { mergePreviewTime(other.getPreviewTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -688,19 +596,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.PreviewUpdateGameServerClusterRequest 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( + getGameServerClusterFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getPreviewTimeFieldBuilder().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.gaming.v1.PreviewUpdateGameServerClusterRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1355,7 +1294,18 @@ public PreviewUpdateGameServerClusterRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PreviewUpdateGameServerClusterRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewUpdateGameServerClusterResponse.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewUpdateGameServerClusterResponse.java index 91f0133b5ad9..a6ea5c9652d5 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewUpdateGameServerClusterResponse.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/PreviewUpdateGameServerClusterResponse.java @@ -54,68 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PreviewUpdateGameServerClusterResponse( - 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 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - case 26: - { - com.google.cloud.gaming.v1.TargetState.Builder subBuilder = null; - if (targetState_ != null) { - subBuilder = targetState_.toBuilder(); - } - targetState_ = - input.readMessage( - com.google.cloud.gaming.v1.TargetState.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetState_); - targetState_ = 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.gaming.v1.GameServerClusters .internal_static_google_cloud_gaming_v1_PreviewUpdateGameServerClusterResponse_descriptor; @@ -248,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (targetState_ != null) { output.writeMessage(3, getTargetState()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -263,7 +201,7 @@ public int getSerializedSize() { if (targetState_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTargetState()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -284,7 +222,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTargetState()) { if (!getTargetState().equals(other.getTargetState())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -301,7 +239,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_STATE_FIELD_NUMBER; hash = (53 * hash) + getTargetState().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -433,17 +371,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.gaming.v1.PreviewUpdateGameServerClusterResponse.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 +481,7 @@ public Builder mergeFrom( if (other.hasTargetState()) { mergeTargetState(other.getTargetState()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -565,19 +496,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.PreviewUpdateGameServerClusterResponse 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: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getTargetStateFieldBuilder().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.gaming.v1.PreviewUpdateGameServerClusterResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -906,7 +861,18 @@ public PreviewUpdateGameServerClusterResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PreviewUpdateGameServerClusterResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/Realm.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/Realm.java index f6f5d6c83716..e473c300772b 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/Realm.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/Realm.java @@ -55,117 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Realm( - 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: - { - 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 26: - { - 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 34: - { - 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 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - timeZone_ = s; - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = 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.gaming.v1.Realms .internal_static_google_cloud_gaming_v1_Realm_descriptor; @@ -625,7 +514,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, description_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -662,7 +551,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, description_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -690,7 +579,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTimeZone().equals(other.getTimeZone())) return false; if (!getEtag().equals(other.getEtag())) return false; if (!getDescription().equals(other.getDescription())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -721,7 +610,7 @@ public int hashCode() { hash = (53 * hash) + getEtag().hashCode(); hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -869,17 +758,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.gaming.v1.Realm.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 @@ -1021,7 +903,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.Realm other) { description_ = other.description_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1036,17 +918,78 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.Realm 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(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 34 + case 50: + { + timeZone_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 58: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 58 + case 66: + { + description_ = 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.gaming.v1.Realm) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2088,7 +2031,18 @@ public Realm parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Realm(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/RealmSelector.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/RealmSelector.java index f09bbfbb59d7..13a5498c0817 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/RealmSelector.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/RealmSelector.java @@ -52,59 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RealmSelector( - 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)) { - realms_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - realms_.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)) { - realms_ = realms_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1.Common .internal_static_google_cloud_gaming_v1_RealmSelector_descriptor; @@ -198,7 +145,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < realms_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, realms_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -215,7 +162,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getRealmsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -231,7 +178,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.gaming.v1.RealmSelector other = (com.google.cloud.gaming.v1.RealmSelector) obj; if (!getRealmsList().equals(other.getRealmsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -246,7 +193,7 @@ public int hashCode() { hash = (37 * hash) + REALMS_FIELD_NUMBER; hash = (53 * hash) + getRealmsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -375,17 +322,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.RealmSelector.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 @@ -485,7 +425,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.RealmSelector other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -500,17 +440,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.RealmSelector 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(); + ensureRealmsIsMutable(); + realms_.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.gaming.v1.RealmSelector) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -716,7 +677,18 @@ public RealmSelector parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RealmSelector(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ScalingConfig.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ScalingConfig.java index 2b6c8b6b1018..19efb2f55239 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ScalingConfig.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/ScalingConfig.java @@ -55,88 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ScalingConfig( - 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(); - - fleetAutoscalerSpec_ = s; - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - selectors_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - selectors_.add( - input.readMessage( - com.google.cloud.gaming.v1.LabelSelector.parser(), extensionRegistry)); - break; - } - case 42: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - schedules_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - schedules_.add( - input.readMessage( - com.google.cloud.gaming.v1.Schedule.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)) { - selectors_ = java.util.Collections.unmodifiableList(selectors_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - schedules_ = java.util.Collections.unmodifiableList(schedules_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1.GameServerConfigs .internal_static_google_cloud_gaming_v1_ScalingConfig_descriptor; @@ -426,7 +344,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < schedules_.size(); i++) { output.writeMessage(5, schedules_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -447,7 +365,7 @@ public int getSerializedSize() { for (int i = 0; i < schedules_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, schedules_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -466,7 +384,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFleetAutoscalerSpec().equals(other.getFleetAutoscalerSpec())) return false; if (!getSelectorsList().equals(other.getSelectorsList())) return false; if (!getSchedulesList().equals(other.getSchedulesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -489,7 +407,7 @@ public int hashCode() { hash = (37 * hash) + SCHEDULES_FIELD_NUMBER; hash = (53 * hash) + getSchedulesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -618,20 +536,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.ScalingConfig.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) { - getSelectorsFieldBuilder(); - getSchedulesFieldBuilder(); - } } @java.lang.Override @@ -643,16 +551,18 @@ public Builder clear() { if (selectorsBuilder_ == null) { selectors_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + selectors_ = null; selectorsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (schedulesBuilder_ == null) { schedules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + schedules_ = null; schedulesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -812,7 +722,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.ScalingConfig other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -827,17 +737,69 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.ScalingConfig 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: + { + fleetAutoscalerSpec_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 34: + { + com.google.cloud.gaming.v1.LabelSelector m = + input.readMessage( + com.google.cloud.gaming.v1.LabelSelector.parser(), extensionRegistry); + if (selectorsBuilder_ == null) { + ensureSelectorsIsMutable(); + selectors_.add(m); + } else { + selectorsBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + com.google.cloud.gaming.v1.Schedule m = + input.readMessage( + com.google.cloud.gaming.v1.Schedule.parser(), extensionRegistry); + if (schedulesBuilder_ == null) { + ensureSchedulesIsMutable(); + schedules_.add(m); + } else { + schedulesBuilder_.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.gaming.v1.ScalingConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1825,7 +1787,18 @@ public ScalingConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ScalingConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/Schedule.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/Schedule.java index 09d12eb70da6..b42473e7f586 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/Schedule.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/Schedule.java @@ -60,97 +60,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Schedule( - 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; - } - case 26: - { - com.google.protobuf.Duration.Builder subBuilder = null; - if (cronJobDuration_ != null) { - subBuilder = cronJobDuration_.toBuilder(); - } - cronJobDuration_ = - input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(cronJobDuration_); - cronJobDuration_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - cronSpec_ = 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.gaming.v1.Common .internal_static_google_cloud_gaming_v1_Schedule_descriptor; @@ -388,7 +297,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cronSpec_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, cronSpec_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -409,7 +318,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cronSpec_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, cronSpec_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -437,7 +346,7 @@ public boolean equals(final java.lang.Object obj) { if (!getCronJobDuration().equals(other.getCronJobDuration())) return false; } if (!getCronSpec().equals(other.getCronSpec())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -462,7 +371,7 @@ public int hashCode() { } hash = (37 * hash) + CRON_SPEC_FIELD_NUMBER; hash = (53 * hash) + getCronSpec().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -598,17 +507,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.Schedule.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 @@ -738,7 +640,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.Schedule other) { cronSpec_ = other.cronSpec_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -753,17 +655,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.Schedule 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 + case 26: + { + input.readMessage(getCronJobDurationFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + cronSpec_ = 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.gaming.v1.Schedule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1467,7 +1407,18 @@ public Schedule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Schedule(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/SpecSource.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/SpecSource.java index b21bb73d6404..f908470e53f2 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/SpecSource.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/SpecSource.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SpecSource( - 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(); - - gameServerConfigName_ = s; - break; - } - case 18: - { - 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.gaming.v1.Common .internal_static_google_cloud_gaming_v1_SpecSource_descriptor; @@ -243,7 +190,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, 2, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -258,7 +205,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -275,7 +222,7 @@ public boolean equals(final java.lang.Object obj) { if (!getGameServerConfigName().equals(other.getGameServerConfigName())) return false; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -290,7 +237,7 @@ public int hashCode() { hash = (53 * hash) + getGameServerConfigName().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; } @@ -418,17 +365,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.SpecSource.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.gaming.v1.SpecSource other) { name_ = other.name_; 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.gaming.v1.SpecSource 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: + { + gameServerConfigName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + name_ = 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.gaming.v1.SpecSource) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -807,7 +773,18 @@ public SpecSource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SpecSource(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/TargetDetails.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/TargetDetails.java index 4efe74093e84..589899cb63e7 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/TargetDetails.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/TargetDetails.java @@ -54,77 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetDetails( - 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(); - - gameServerClusterName_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - gameServerDeploymentName_ = s; - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - fleetDetails_ = - new java.util.ArrayList< - com.google.cloud.gaming.v1.TargetDetails.TargetFleetDetails>(); - mutable_bitField0_ |= 0x00000001; - } - fleetDetails_.add( - input.readMessage( - com.google.cloud.gaming.v1.TargetDetails.TargetFleetDetails.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)) { - fleetDetails_ = java.util.Collections.unmodifiableList(fleetDetails_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1.Common .internal_static_google_cloud_gaming_v1_TargetDetails_descriptor; @@ -256,84 +185,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetFleetDetails( - 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.gaming.v1.TargetDetails.TargetFleetDetails.TargetFleet.Builder - subBuilder = null; - if (fleet_ != null) { - subBuilder = fleet_.toBuilder(); - } - fleet_ = - input.readMessage( - com.google.cloud.gaming.v1.TargetDetails.TargetFleetDetails.TargetFleet - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(fleet_); - fleet_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.cloud.gaming.v1.TargetDetails.TargetFleetDetails.TargetFleetAutoscaler - .Builder - subBuilder = null; - if (autoscaler_ != null) { - subBuilder = autoscaler_.toBuilder(); - } - autoscaler_ = - input.readMessage( - com.google.cloud.gaming.v1.TargetDetails.TargetFleetDetails - .TargetFleetAutoscaler.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(autoscaler_); - autoscaler_ = 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.gaming.v1.Common .internal_static_google_cloud_gaming_v1_TargetDetails_TargetFleetDetails_descriptor; @@ -451,69 +302,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetFleet( - 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.gaming.v1.SpecSource.Builder subBuilder = null; - if (specSource_ != null) { - subBuilder = specSource_.toBuilder(); - } - specSource_ = - input.readMessage( - com.google.cloud.gaming.v1.SpecSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(specSource_); - specSource_ = 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.gaming.v1.Common .internal_static_google_cloud_gaming_v1_TargetDetails_TargetFleetDetails_TargetFleet_descriptor; @@ -650,7 +438,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (specSource_ != null) { output.writeMessage(2, getSpecSource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -665,7 +453,7 @@ public int getSerializedSize() { if (specSource_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSpecSource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -687,7 +475,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSpecSource()) { if (!getSpecSource().equals(other.getSpecSource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -704,7 +492,7 @@ public int hashCode() { hash = (37 * hash) + SPEC_SOURCE_FIELD_NUMBER; hash = (53 * hash) + getSpecSource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -846,17 +634,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.gaming.v1.TargetDetails.TargetFleetDetails.TargetFleet.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 @@ -970,7 +751,7 @@ public Builder mergeFrom( if (other.hasSpecSource()) { mergeSpecSource(other.getSpecSource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -985,20 +766,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.TargetDetails.TargetFleetDetails.TargetFleet 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(getSpecSourceFieldBuilder().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.gaming.v1.TargetDetails.TargetFleetDetails.TargetFleet) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1339,7 +1143,19 @@ public TargetFleet parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetFleet(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(); } }; @@ -1462,69 +1278,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetFleetAutoscaler( - 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.gaming.v1.SpecSource.Builder subBuilder = null; - if (specSource_ != null) { - subBuilder = specSource_.toBuilder(); - } - specSource_ = - input.readMessage( - com.google.cloud.gaming.v1.SpecSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(specSource_); - specSource_ = 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.gaming.v1.Common .internal_static_google_cloud_gaming_v1_TargetDetails_TargetFleetDetails_TargetFleetAutoscaler_descriptor; @@ -1662,7 +1415,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (specSource_ != null) { output.writeMessage(2, getSpecSource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1677,7 +1430,7 @@ public int getSerializedSize() { if (specSource_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSpecSource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1700,7 +1453,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSpecSource()) { if (!getSpecSource().equals(other.getSpecSource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1717,7 +1470,7 @@ public int hashCode() { hash = (37 * hash) + SPEC_SOURCE_FIELD_NUMBER; hash = (53 * hash) + getSpecSource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1875,17 +1628,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.gaming.v1.TargetDetails.TargetFleetDetails.TargetFleetAutoscaler.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 @@ -2004,7 +1750,7 @@ public Builder mergeFrom( if (other.hasSpecSource()) { mergeSpecSource(other.getSpecSource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2019,20 +1765,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.TargetDetails.TargetFleetDetails.TargetFleetAutoscaler - 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(getSpecSourceFieldBuilder().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.gaming.v1.TargetDetails.TargetFleetDetails.TargetFleetAutoscaler) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2375,7 +2144,19 @@ public TargetFleetAutoscaler parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetFleetAutoscaler(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(); } }; @@ -2524,7 +2305,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (autoscaler_ != null) { output.writeMessage(2, getAutoscaler()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2539,7 +2320,7 @@ public int getSerializedSize() { if (autoscaler_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAutoscaler()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2563,7 +2344,7 @@ public boolean equals(final java.lang.Object obj) { if (hasAutoscaler()) { if (!getAutoscaler().equals(other.getAutoscaler())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2582,7 +2363,7 @@ public int hashCode() { hash = (37 * hash) + AUTOSCALER_FIELD_NUMBER; hash = (53 * hash) + getAutoscaler().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2714,17 +2495,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.TargetDetails.TargetFleetDetails.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 @@ -2839,7 +2613,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.TargetDetails.TargetFleetDet if (other.hasAutoscaler()) { mergeAutoscaler(other.getAutoscaler()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2854,19 +2628,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.TargetDetails.TargetFleetDetails 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(getFleetFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getAutoscalerFieldBuilder().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.gaming.v1.TargetDetails.TargetFleetDetails) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3329,7 +3127,19 @@ public TargetFleetDetails parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetFleetDetails(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(); } }; @@ -3550,7 +3360,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < fleetDetails_.size(); i++) { output.writeMessage(3, fleetDetails_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3569,7 +3379,7 @@ public int getSerializedSize() { for (int i = 0; i < fleetDetails_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, fleetDetails_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3587,7 +3397,7 @@ public boolean equals(final java.lang.Object obj) { if (!getGameServerClusterName().equals(other.getGameServerClusterName())) return false; if (!getGameServerDeploymentName().equals(other.getGameServerDeploymentName())) return false; if (!getFleetDetailsList().equals(other.getFleetDetailsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3606,7 +3416,7 @@ public int hashCode() { hash = (37 * hash) + FLEET_DETAILS_FIELD_NUMBER; hash = (53 * hash) + getFleetDetailsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3735,19 +3545,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.TargetDetails.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) { - getFleetDetailsFieldBuilder(); - } } @java.lang.Override @@ -3759,10 +3560,11 @@ public Builder clear() { if (fleetDetailsBuilder_ == null) { fleetDetails_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + fleetDetails_ = null; fleetDetailsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -3886,7 +3688,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.TargetDetails other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3901,17 +3703,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.TargetDetails 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: + { + gameServerClusterName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + gameServerDeploymentName_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + com.google.cloud.gaming.v1.TargetDetails.TargetFleetDetails m = + input.readMessage( + com.google.cloud.gaming.v1.TargetDetails.TargetFleetDetails.parser(), + extensionRegistry); + if (fleetDetailsBuilder_ == null) { + ensureFleetDetailsIsMutable(); + fleetDetails_.add(m); + } else { + fleetDetailsBuilder_.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.gaming.v1.TargetDetails) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4556,7 +4398,18 @@ public TargetDetails parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetDetails(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/TargetState.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/TargetState.java index e15bab16cc28..0ed04ebe500c 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/TargetState.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/TargetState.java @@ -52,60 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetState( - 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)) { - details_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - details_.add( - input.readMessage( - com.google.cloud.gaming.v1.TargetDetails.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)) { - details_ = java.util.Collections.unmodifiableList(details_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1.Common .internal_static_google_cloud_gaming_v1_TargetState_descriptor; @@ -207,7 +153,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < details_.size(); i++) { output.writeMessage(1, details_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -219,7 +165,7 @@ public int getSerializedSize() { for (int i = 0; i < details_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, details_.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.gaming.v1.TargetState other = (com.google.cloud.gaming.v1.TargetState) obj; if (!getDetailsList().equals(other.getDetailsList())) 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) + DETAILS_FIELD_NUMBER; hash = (53 * hash) + getDetailsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -379,19 +325,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.TargetState.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) { - getDetailsFieldBuilder(); - } } @java.lang.Override @@ -399,10 +336,11 @@ public Builder clear() { super.clear(); if (detailsBuilder_ == null) { details_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + details_ = null; detailsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -516,7 +454,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.TargetState other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -531,17 +469,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.TargetState 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.gaming.v1.TargetDetails m = + input.readMessage( + com.google.cloud.gaming.v1.TargetDetails.parser(), extensionRegistry); + if (detailsBuilder_ == null) { + ensureDetailsIsMutable(); + details_.add(m); + } else { + detailsBuilder_.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.gaming.v1.TargetState) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -928,7 +893,18 @@ public TargetState parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetState(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/UpdateGameServerClusterRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/UpdateGameServerClusterRequest.java index 1ff2e511828a..32754bcbc8e2 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/UpdateGameServerClusterRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/UpdateGameServerClusterRequest.java @@ -51,76 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateGameServerClusterRequest( - 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.gaming.v1.GameServerCluster.Builder subBuilder = null; - if (gameServerCluster_ != null) { - subBuilder = gameServerCluster_.toBuilder(); - } - gameServerCluster_ = - input.readMessage( - com.google.cloud.gaming.v1.GameServerCluster.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(gameServerCluster_); - gameServerCluster_ = 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.gaming.v1.GameServerClusters .internal_static_google_cloud_gaming_v1_UpdateGameServerClusterRequest_descriptor; @@ -268,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 @@ -283,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; } @@ -307,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; } @@ -326,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; } @@ -456,17 +386,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.UpdateGameServerClusterRequest.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 @@ -577,7 +500,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.UpdateGameServerClusterReque if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -592,18 +515,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.UpdateGameServerClusterRequest 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( + getGameServerClusterFieldBuilder().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.gaming.v1.UpdateGameServerClusterRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1062,7 +1011,18 @@ public UpdateGameServerClusterRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateGameServerClusterRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/UpdateGameServerDeploymentRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/UpdateGameServerDeploymentRequest.java index feb3092c1866..cccbec3e6afb 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/UpdateGameServerDeploymentRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/UpdateGameServerDeploymentRequest.java @@ -52,76 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateGameServerDeploymentRequest( - 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.gaming.v1.GameServerDeployment.Builder subBuilder = null; - if (gameServerDeployment_ != null) { - subBuilder = gameServerDeployment_.toBuilder(); - } - gameServerDeployment_ = - input.readMessage( - com.google.cloud.gaming.v1.GameServerDeployment.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(gameServerDeployment_); - gameServerDeployment_ = 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.gaming.v1.GameServerDeployments .internal_static_google_cloud_gaming_v1_UpdateGameServerDeploymentRequest_descriptor; @@ -270,7 +200,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; } @@ -460,17 +390,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.UpdateGameServerDeploymentRequest.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 @@ -583,7 +506,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.UpdateGameServerDeploymentRe if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -598,18 +521,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.UpdateGameServerDeploymentRequest 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( + getGameServerDeploymentFieldBuilder().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.gaming.v1.UpdateGameServerDeploymentRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1072,7 +1021,18 @@ public UpdateGameServerDeploymentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateGameServerDeploymentRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/UpdateGameServerDeploymentRolloutRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/UpdateGameServerDeploymentRolloutRequest.java index bea00e8f8039..4e10629569a4 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/UpdateGameServerDeploymentRolloutRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/UpdateGameServerDeploymentRolloutRequest.java @@ -53,77 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateGameServerDeploymentRolloutRequest( - 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.gaming.v1.GameServerDeploymentRollout.Builder subBuilder = null; - if (rollout_ != null) { - subBuilder = rollout_.toBuilder(); - } - rollout_ = - input.readMessage( - com.google.cloud.gaming.v1.GameServerDeploymentRollout.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(rollout_); - rollout_ = 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.gaming.v1.GameServerDeployments .internal_static_google_cloud_gaming_v1_UpdateGameServerDeploymentRolloutRequest_descriptor; @@ -271,7 +200,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 +215,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 +239,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 +258,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; } @@ -462,17 +391,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.gaming.v1.UpdateGameServerDeploymentRolloutRequest.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 @@ -588,7 +510,7 @@ public Builder mergeFrom( if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -603,19 +525,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.UpdateGameServerDeploymentRolloutRequest 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(getRolloutFieldBuilder().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.gaming.v1.UpdateGameServerDeploymentRolloutRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1076,7 +1022,18 @@ public UpdateGameServerDeploymentRolloutRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateGameServerDeploymentRolloutRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/UpdateRealmRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/UpdateRealmRequest.java index e0c6e707ebf5..b0f8759dedc2 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/UpdateRealmRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1/src/main/java/com/google/cloud/gaming/v1/UpdateRealmRequest.java @@ -50,75 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateRealmRequest( - 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.gaming.v1.Realm.Builder subBuilder = null; - if (realm_ != null) { - subBuilder = realm_.toBuilder(); - } - realm_ = - input.readMessage(com.google.cloud.gaming.v1.Realm.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(realm_); - realm_ = 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.gaming.v1.Realms .internal_static_google_cloud_gaming_v1_UpdateRealmRequest_descriptor; @@ -258,7 +189,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 @@ -273,7 +204,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; } @@ -297,7 +228,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; } @@ -316,7 +247,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; } @@ -445,17 +376,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1.UpdateRealmRequest.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 @@ -565,7 +489,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1.UpdateRealmRequest other) { if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -580,17 +504,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1.UpdateRealmRequest 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(getRealmFieldBuilder().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.gaming.v1.UpdateRealmRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1033,7 +983,18 @@ public UpdateRealmRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateRealmRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/CreateGameServerClusterRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/CreateGameServerClusterRequest.java index f9247c81e112..58680174d8de 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/CreateGameServerClusterRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/CreateGameServerClusterRequest.java @@ -54,75 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateGameServerClusterRequest( - 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(); - - gameServerClusterId_ = s; - break; - } - case 26: - { - com.google.cloud.gaming.v1beta.GameServerCluster.Builder subBuilder = null; - if (gameServerCluster_ != null) { - subBuilder = gameServerCluster_.toBuilder(); - } - gameServerCluster_ = - input.readMessage( - com.google.cloud.gaming.v1beta.GameServerCluster.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(gameServerCluster_); - gameServerCluster_ = 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.gaming.v1beta.GameServerClusters .internal_static_google_cloud_gaming_v1beta_CreateGameServerClusterRequest_descriptor; @@ -319,7 +250,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (gameServerCluster_ != null) { output.writeMessage(3, getGameServerCluster()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -337,7 +268,7 @@ public int getSerializedSize() { if (gameServerCluster_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getGameServerCluster()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -359,7 +290,7 @@ public boolean equals(final java.lang.Object obj) { if (hasGameServerCluster()) { if (!getGameServerCluster().equals(other.getGameServerCluster())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -378,7 +309,7 @@ public int hashCode() { hash = (37 * hash) + GAME_SERVER_CLUSTER_FIELD_NUMBER; hash = (53 * hash) + getGameServerCluster().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -508,17 +439,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.CreateGameServerClusterRequest.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 @@ -631,7 +555,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.CreateGameServerClusterR if (other.hasGameServerCluster()) { mergeGameServerCluster(other.getGameServerCluster()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -646,19 +570,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.CreateGameServerClusterRequest 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: + { + gameServerClusterId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage( + getGameServerClusterFieldBuilder().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.gaming.v1beta.CreateGameServerClusterRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1127,7 +1082,18 @@ public CreateGameServerClusterRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateGameServerClusterRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/CreateGameServerConfigRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/CreateGameServerConfigRequest.java index 5d06b1a54f49..629a86464602 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/CreateGameServerConfigRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/CreateGameServerConfigRequest.java @@ -53,75 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateGameServerConfigRequest( - 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(); - - configId_ = s; - break; - } - case 26: - { - com.google.cloud.gaming.v1beta.GameServerConfig.Builder subBuilder = null; - if (gameServerConfig_ != null) { - subBuilder = gameServerConfig_.toBuilder(); - } - gameServerConfig_ = - input.readMessage( - com.google.cloud.gaming.v1beta.GameServerConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(gameServerConfig_); - gameServerConfig_ = 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.gaming.v1beta.GameServerConfigs .internal_static_google_cloud_gaming_v1beta_CreateGameServerConfigRequest_descriptor; @@ -318,7 +249,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (gameServerConfig_ != null) { output.writeMessage(3, getGameServerConfig()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -336,7 +267,7 @@ public int getSerializedSize() { if (gameServerConfig_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getGameServerConfig()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -358,7 +289,7 @@ public boolean equals(final java.lang.Object obj) { if (hasGameServerConfig()) { if (!getGameServerConfig().equals(other.getGameServerConfig())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -377,7 +308,7 @@ public int hashCode() { hash = (37 * hash) + GAME_SERVER_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getGameServerConfig().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -507,17 +438,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.CreateGameServerConfigRequest.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 @@ -630,7 +554,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.CreateGameServerConfigRe if (other.hasGameServerConfig()) { mergeGameServerConfig(other.getGameServerConfig()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -645,18 +569,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.CreateGameServerConfigRequest 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: + { + configId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage( + getGameServerConfigFieldBuilder().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.gaming.v1beta.CreateGameServerConfigRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1124,7 +1080,18 @@ public CreateGameServerConfigRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateGameServerConfigRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/CreateGameServerDeploymentRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/CreateGameServerDeploymentRequest.java index f1cfeee031fd..c7cade6d10c8 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/CreateGameServerDeploymentRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/CreateGameServerDeploymentRequest.java @@ -54,76 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateGameServerDeploymentRequest( - 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(); - - deploymentId_ = s; - break; - } - case 26: - { - com.google.cloud.gaming.v1beta.GameServerDeployment.Builder subBuilder = null; - if (gameServerDeployment_ != null) { - subBuilder = gameServerDeployment_.toBuilder(); - } - gameServerDeployment_ = - input.readMessage( - com.google.cloud.gaming.v1beta.GameServerDeployment.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(gameServerDeployment_); - gameServerDeployment_ = 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.gaming.v1beta.GameServerDeployments .internal_static_google_cloud_gaming_v1beta_CreateGameServerDeploymentRequest_descriptor; @@ -321,7 +251,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (gameServerDeployment_ != null) { output.writeMessage(3, getGameServerDeployment()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -340,7 +270,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getGameServerDeployment()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -362,7 +292,7 @@ public boolean equals(final java.lang.Object obj) { if (hasGameServerDeployment()) { if (!getGameServerDeployment().equals(other.getGameServerDeployment())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -381,7 +311,7 @@ public int hashCode() { hash = (37 * hash) + GAME_SERVER_DEPLOYMENT_FIELD_NUMBER; hash = (53 * hash) + getGameServerDeployment().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -511,17 +441,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.CreateGameServerDeploymentRequest.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 @@ -635,7 +558,7 @@ public Builder mergeFrom( if (other.hasGameServerDeployment()) { mergeGameServerDeployment(other.getGameServerDeployment()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -650,19 +573,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.CreateGameServerDeploymentRequest 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: + { + deploymentId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage( + getGameServerDeploymentFieldBuilder().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.gaming.v1beta.CreateGameServerDeploymentRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1135,7 +1089,18 @@ public CreateGameServerDeploymentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateGameServerDeploymentRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/CreateRealmRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/CreateRealmRequest.java index 2a811bae1aa9..1d9471fd9cd7 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/CreateRealmRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/CreateRealmRequest.java @@ -53,75 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateRealmRequest( - 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(); - - realmId_ = s; - break; - } - case 26: - { - com.google.cloud.gaming.v1beta.Realm.Builder subBuilder = null; - if (realm_ != null) { - subBuilder = realm_.toBuilder(); - } - realm_ = - input.readMessage( - com.google.cloud.gaming.v1beta.Realm.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(realm_); - realm_ = 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.gaming.v1beta.Realms .internal_static_google_cloud_gaming_v1beta_CreateRealmRequest_descriptor; @@ -313,7 +244,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (realm_ != null) { output.writeMessage(3, getRealm()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -331,7 +262,7 @@ public int getSerializedSize() { if (realm_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getRealm()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -353,7 +284,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRealm()) { if (!getRealm().equals(other.getRealm())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -372,7 +303,7 @@ public int hashCode() { hash = (37 * hash) + REALM_FIELD_NUMBER; hash = (53 * hash) + getRealm().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -501,17 +432,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.CreateRealmRequest.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 @@ -622,7 +546,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.CreateRealmRequest other if (other.hasRealm()) { mergeRealm(other.getRealm()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -637,18 +561,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.CreateRealmRequest 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: + { + realmId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getRealmFieldBuilder().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.gaming.v1beta.CreateRealmRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1101,7 +1056,18 @@ public CreateRealmRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateRealmRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/DeleteGameServerClusterRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/DeleteGameServerClusterRequest.java index 55f61d1dad03..0868b6435220 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/DeleteGameServerClusterRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/DeleteGameServerClusterRequest.java @@ -53,52 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteGameServerClusterRequest( - 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.gaming.v1beta.GameServerClusters .internal_static_google_cloud_gaming_v1beta_DeleteGameServerClusterRequest_descriptor; @@ -186,7 +140,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 @@ -198,7 +152,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; } @@ -215,7 +169,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.gaming.v1beta.DeleteGameServerClusterRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -228,7 +182,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; } @@ -358,17 +312,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.DeleteGameServerClusterRequest.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.gaming.v1beta.DeleteGameServerClusterR name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -475,19 +422,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.DeleteGameServerClusterRequest 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.gaming.v1beta.DeleteGameServerClusterRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -645,7 +610,18 @@ public DeleteGameServerClusterRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteGameServerClusterRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/DeleteGameServerConfigRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/DeleteGameServerConfigRequest.java index 8007b5b180f6..6db90494ed65 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/DeleteGameServerConfigRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/DeleteGameServerConfigRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteGameServerConfigRequest( - 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.gaming.v1beta.GameServerConfigs .internal_static_google_cloud_gaming_v1beta_DeleteGameServerConfigRequest_descriptor; @@ -185,7 +139,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 @@ -197,7 +151,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; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.gaming.v1beta.DeleteGameServerConfigRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,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; } @@ -357,17 +311,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.DeleteGameServerConfigRequest.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.gaming.v1beta.DeleteGameServerConfigRe name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -474,18 +421,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.DeleteGameServerConfigRequest 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.gaming.v1beta.DeleteGameServerConfigRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -643,7 +609,18 @@ public DeleteGameServerConfigRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteGameServerConfigRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/DeleteGameServerDeploymentRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/DeleteGameServerDeploymentRequest.java index bdc9bc234cac..8e01b58a28ae 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/DeleteGameServerDeploymentRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/DeleteGameServerDeploymentRequest.java @@ -53,52 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteGameServerDeploymentRequest( - 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.gaming.v1beta.GameServerDeployments .internal_static_google_cloud_gaming_v1beta_DeleteGameServerDeploymentRequest_descriptor; @@ -186,7 +140,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 @@ -198,7 +152,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; } @@ -215,7 +169,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.gaming.v1beta.DeleteGameServerDeploymentRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -228,7 +182,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; } @@ -358,17 +312,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.DeleteGameServerDeploymentRequest.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 @@ -461,7 +408,7 @@ public Builder mergeFrom( name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -476,19 +423,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.DeleteGameServerDeploymentRequest 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.gaming.v1beta.DeleteGameServerDeploymentRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -647,7 +612,18 @@ public DeleteGameServerDeploymentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteGameServerDeploymentRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/DeleteRealmRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/DeleteRealmRequest.java index b73f5a2e1ce4..fe55064dd932 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/DeleteRealmRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/DeleteRealmRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteRealmRequest( - 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.gaming.v1beta.Realms .internal_static_google_cloud_gaming_v1beta_DeleteRealmRequest_descriptor; @@ -185,7 +139,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 @@ -197,7 +151,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; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.gaming.v1beta.DeleteRealmRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,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; } @@ -356,17 +310,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.DeleteRealmRequest.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 @@ -456,7 +403,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.DeleteRealmRequest other name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -471,18 +418,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.DeleteRealmRequest 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.gaming.v1beta.DeleteRealmRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -639,7 +605,18 @@ public DeleteRealmRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteRealmRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/DeployedFleetDetails.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/DeployedFleetDetails.java index ce17448f6edf..bcd6fa07c3eb 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/DeployedFleetDetails.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/DeployedFleetDetails.java @@ -50,82 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeployedFleetDetails( - 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.gaming.v1beta.DeployedFleetDetails.DeployedFleet.Builder subBuilder = - null; - if (deployedFleet_ != null) { - subBuilder = deployedFleet_.toBuilder(); - } - deployedFleet_ = - input.readMessage( - com.google.cloud.gaming.v1beta.DeployedFleetDetails.DeployedFleet.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deployedFleet_); - deployedFleet_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.cloud.gaming.v1beta.DeployedFleetDetails.DeployedFleetAutoscaler.Builder - subBuilder = null; - if (deployedAutoscaler_ != null) { - subBuilder = deployedAutoscaler_.toBuilder(); - } - deployedAutoscaler_ = - input.readMessage( - com.google.cloud.gaming.v1beta.DeployedFleetDetails.DeployedFleetAutoscaler - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deployedAutoscaler_); - deployedAutoscaler_ = 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.gaming.v1beta.Common .internal_static_google_cloud_gaming_v1beta_DeployedFleetDetails_descriptor; @@ -315,95 +239,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeployedFleet( - 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(); - - fleet_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - fleetSpec_ = s; - break; - } - case 26: - { - com.google.cloud.gaming.v1beta.SpecSource.Builder subBuilder = null; - if (specSource_ != null) { - subBuilder = specSource_.toBuilder(); - } - specSource_ = - input.readMessage( - com.google.cloud.gaming.v1beta.SpecSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(specSource_); - specSource_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - com.google.cloud.gaming.v1beta.DeployedFleetDetails.DeployedFleet - .DeployedFleetStatus.Builder - subBuilder = null; - if (status_ != null) { - subBuilder = status_.toBuilder(); - } - status_ = - input.readMessage( - com.google.cloud.gaming.v1beta.DeployedFleetDetails.DeployedFleet - .DeployedFleetStatus.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(status_); - status_ = 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.gaming.v1beta.Common .internal_static_google_cloud_gaming_v1beta_DeployedFleetDetails_DeployedFleet_descriptor; @@ -512,66 +347,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeployedFleetStatus( - 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: - { - readyReplicas_ = input.readInt64(); - break; - } - case 16: - { - allocatedReplicas_ = input.readInt64(); - break; - } - case 24: - { - reservedReplicas_ = input.readInt64(); - break; - } - case 32: - { - replicas_ = input.readInt64(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1beta.Common .internal_static_google_cloud_gaming_v1beta_DeployedFleetDetails_DeployedFleet_DeployedFleetStatus_descriptor; @@ -689,7 +464,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (replicas_ != 0L) { output.writeInt64(4, replicas_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -710,7 +485,7 @@ public int getSerializedSize() { if (replicas_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, replicas_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -736,7 +511,7 @@ public boolean equals(final java.lang.Object obj) { if (getAllocatedReplicas() != other.getAllocatedReplicas()) return false; if (getReservedReplicas() != other.getReservedReplicas()) return false; if (getReplicas() != other.getReplicas()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -755,7 +530,7 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getReservedReplicas()); hash = (37 * hash) + REPLICAS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getReplicas()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -914,17 +689,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.gaming.v1beta.DeployedFleetDetails.DeployedFleet.DeployedFleetStatus.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 @@ -1049,7 +817,7 @@ public Builder mergeFrom( if (other.getReplicas() != 0L) { setReplicas(other.getReplicas()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1064,21 +832,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.DeployedFleetDetails.DeployedFleet.DeployedFleetStatus - 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: + { + readyReplicas_ = input.readInt64(); + + break; + } // case 8 + case 16: + { + allocatedReplicas_ = input.readInt64(); + + break; + } // case 16 + case 24: + { + reservedReplicas_ = input.readInt64(); + + break; + } // case 24 + case 32: + { + replicas_ = 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.gaming.v1beta.DeployedFleetDetails.DeployedFleet - .DeployedFleetStatus) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1335,7 +1137,19 @@ public DeployedFleetStatus parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeployedFleetStatus(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(); } }; @@ -1592,7 +1406,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (status_ != null) { output.writeMessage(5, getStatus()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1613,7 +1427,7 @@ public int getSerializedSize() { if (status_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getStatus()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1639,7 +1453,7 @@ public boolean equals(final java.lang.Object obj) { if (hasStatus()) { if (!getStatus().equals(other.getStatus())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1662,7 +1476,7 @@ public int hashCode() { hash = (37 * hash) + STATUS_FIELD_NUMBER; hash = (53 * hash) + getStatus().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1796,17 +1610,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.gaming.v1beta.DeployedFleetDetails.DeployedFleet.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 @@ -1938,7 +1745,7 @@ public Builder mergeFrom( if (other.hasStatus()) { mergeStatus(other.getStatus()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1953,19 +1760,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.DeployedFleetDetails.DeployedFleet 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: + { + fleet_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + fleetSpec_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getSpecSourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 42: + { + input.readMessage(getStatusFieldBuilder().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.gaming.v1beta.DeployedFleetDetails.DeployedFleet) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2646,7 +2489,19 @@ public DeployedFleet parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeployedFleet(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(); } }; @@ -2794,75 +2649,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeployedFleetAutoscaler( - 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(); - - autoscaler_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - fleetAutoscalerSpec_ = s; - break; - } - case 34: - { - com.google.cloud.gaming.v1beta.SpecSource.Builder subBuilder = null; - if (specSource_ != null) { - subBuilder = specSource_.toBuilder(); - } - specSource_ = - input.readMessage( - com.google.cloud.gaming.v1beta.SpecSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(specSource_); - specSource_ = 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.gaming.v1beta.Common .internal_static_google_cloud_gaming_v1beta_DeployedFleetDetails_DeployedFleetAutoscaler_descriptor; @@ -3051,7 +2837,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (specSource_ != null) { output.writeMessage(4, getSpecSource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3069,7 +2855,7 @@ public int getSerializedSize() { if (specSource_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getSpecSource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3092,7 +2878,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSpecSource().equals(other.getSpecSource())) return false; } if (!getFleetAutoscalerSpec().equals(other.getFleetAutoscalerSpec())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3111,7 +2897,7 @@ public int hashCode() { } hash = (37 * hash) + FLEET_AUTOSCALER_SPEC_FIELD_NUMBER; hash = (53 * hash) + getFleetAutoscalerSpec().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3251,17 +3037,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.gaming.v1beta.DeployedFleetDetails.DeployedFleetAutoscaler.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 @@ -3383,7 +3162,7 @@ public Builder mergeFrom( fleetAutoscalerSpec_ = other.fleetAutoscalerSpec_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3398,20 +3177,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.DeployedFleetDetails.DeployedFleetAutoscaler 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: + { + autoscaler_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 26: + { + fleetAutoscalerSpec_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + input.readMessage(getSpecSourceFieldBuilder().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.gaming.v1beta.DeployedFleetDetails.DeployedFleetAutoscaler) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3858,7 +3666,19 @@ public DeployedFleetAutoscaler parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeployedFleetAutoscaler(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(); } }; @@ -4005,7 +3825,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (deployedAutoscaler_ != null) { output.writeMessage(2, getDeployedAutoscaler()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -4020,7 +3840,7 @@ public int getSerializedSize() { if (deployedAutoscaler_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDeployedAutoscaler()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4044,7 +3864,7 @@ public boolean equals(final java.lang.Object obj) { if (hasDeployedAutoscaler()) { if (!getDeployedAutoscaler().equals(other.getDeployedAutoscaler())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4063,7 +3883,7 @@ public int hashCode() { hash = (37 * hash) + DEPLOYED_AUTOSCALER_FIELD_NUMBER; hash = (53 * hash) + getDeployedAutoscaler().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4192,17 +4012,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.DeployedFleetDetails.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 @@ -4313,7 +4126,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.DeployedFleetDetails oth if (other.hasDeployedAutoscaler()) { mergeDeployedAutoscaler(other.getDeployedAutoscaler()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4328,18 +4141,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.DeployedFleetDetails 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(getDeployedFleetFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage( + getDeployedAutoscalerFieldBuilder().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.gaming.v1beta.DeployedFleetDetails) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4790,7 +4629,18 @@ public DeployedFleetDetails parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeployedFleetDetails(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/FetchDeploymentStateRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/FetchDeploymentStateRequest.java index c86a2cb25b01..68d1e7786874 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/FetchDeploymentStateRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/FetchDeploymentStateRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FetchDeploymentStateRequest( - 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.gaming.v1beta.GameServerDeployments .internal_static_google_cloud_gaming_v1beta_FetchDeploymentStateRequest_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.gaming.v1beta.FetchDeploymentStateRequest) 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; } @@ -353,17 +307,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.FetchDeploymentStateRequest.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.gaming.v1beta.FetchDeploymentStateRequ name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -468,18 +415,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.FetchDeploymentStateRequest 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.gaming.v1beta.FetchDeploymentStateRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -626,7 +592,18 @@ public FetchDeploymentStateRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FetchDeploymentStateRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/FetchDeploymentStateResponse.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/FetchDeploymentStateResponse.java index d3a2cad3811f..3caea3d91558 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/FetchDeploymentStateResponse.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/FetchDeploymentStateResponse.java @@ -53,78 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FetchDeploymentStateResponse( - 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)) { - clusterState_ = - new java.util.ArrayList< - com.google.cloud.gaming.v1beta.FetchDeploymentStateResponse - .DeployedClusterState>(); - mutable_bitField0_ |= 0x00000001; - } - clusterState_.add( - input.readMessage( - com.google.cloud.gaming.v1beta.FetchDeploymentStateResponse - .DeployedClusterState.parser(), - extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - unavailable_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - unavailable_.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)) { - clusterState_ = java.util.Collections.unmodifiableList(clusterState_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - unavailable_ = unavailable_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1beta.GameServerDeployments .internal_static_google_cloud_gaming_v1beta_FetchDeploymentStateResponse_descriptor; @@ -264,70 +192,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeployedClusterState( - 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(); - - cluster_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - fleetDetails_ = - new java.util.ArrayList< - com.google.cloud.gaming.v1beta.DeployedFleetDetails>(); - mutable_bitField0_ |= 0x00000001; - } - fleetDetails_.add( - input.readMessage( - com.google.cloud.gaming.v1beta.DeployedFleetDetails.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)) { - fleetDetails_ = java.util.Collections.unmodifiableList(fleetDetails_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1beta.GameServerDeployments .internal_static_google_cloud_gaming_v1beta_FetchDeploymentStateResponse_DeployedClusterState_descriptor; @@ -490,7 +354,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < fleetDetails_.size(); i++) { output.writeMessage(2, fleetDetails_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -505,7 +369,7 @@ public int getSerializedSize() { for (int i = 0; i < fleetDetails_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, fleetDetails_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -525,7 +389,7 @@ public boolean equals(final java.lang.Object obj) { if (!getCluster().equals(other.getCluster())) return false; if (!getFleetDetailsList().equals(other.getFleetDetailsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -542,7 +406,7 @@ public int hashCode() { hash = (37 * hash) + FLEET_DETAILS_FIELD_NUMBER; hash = (53 * hash) + getFleetDetailsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -685,19 +549,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.gaming.v1beta.FetchDeploymentStateResponse.DeployedClusterState.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) { - getFleetDetailsFieldBuilder(); - } } @java.lang.Override @@ -707,10 +562,11 @@ public Builder clear() { if (fleetDetailsBuilder_ == null) { fleetDetails_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + fleetDetails_ = null; fleetDetailsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -844,7 +700,7 @@ public Builder mergeFrom( } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -859,20 +715,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.FetchDeploymentStateResponse.DeployedClusterState - 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: + { + cluster_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + com.google.cloud.gaming.v1beta.DeployedFleetDetails m = + input.readMessage( + com.google.cloud.gaming.v1beta.DeployedFleetDetails.parser(), + extensionRegistry); + if (fleetDetailsBuilder_ == null) { + ensureFleetDetailsIsMutable(); + fleetDetails_.add(m); + } else { + fleetDetailsBuilder_.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.gaming.v1beta.FetchDeploymentStateResponse.DeployedClusterState) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1402,7 +1289,19 @@ public DeployedClusterState parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeployedClusterState(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(); } }; @@ -1591,7 +1490,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < unavailable_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, unavailable_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1611,7 +1510,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getUnavailableList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1629,7 +1528,7 @@ public boolean equals(final java.lang.Object obj) { if (!getClusterStateList().equals(other.getClusterStateList())) return false; if (!getUnavailableList().equals(other.getUnavailableList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1648,7 +1547,7 @@ public int hashCode() { hash = (37 * hash) + UNAVAILABLE_FIELD_NUMBER; hash = (53 * hash) + getUnavailableList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1778,19 +1677,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.FetchDeploymentStateResponse.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) { - getClusterStateFieldBuilder(); - } } @java.lang.Override @@ -1798,10 +1688,11 @@ public Builder clear() { super.clear(); if (clusterStateBuilder_ == null) { clusterState_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + clusterState_ = null; clusterStateBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); unavailable_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); return this; @@ -1933,7 +1824,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.FetchDeploymentStateResp } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1948,18 +1839,53 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.FetchDeploymentStateResponse 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.gaming.v1beta.FetchDeploymentStateResponse.DeployedClusterState m = + input.readMessage( + com.google.cloud.gaming.v1beta.FetchDeploymentStateResponse + .DeployedClusterState.parser(), + extensionRegistry); + if (clusterStateBuilder_ == null) { + ensureClusterStateIsMutable(); + clusterState_.add(m); + } else { + clusterStateBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnavailableIsMutable(); + unavailable_.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.gaming.v1beta.FetchDeploymentStateResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2592,7 +2518,18 @@ public FetchDeploymentStateResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FetchDeploymentStateResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/FleetConfig.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/FleetConfig.java index 364ec6ab917e..67c11b71ab36 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/FleetConfig.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/FleetConfig.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FleetConfig( - 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(); - - fleetSpec_ = s; - break; - } - case 18: - { - 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.gaming.v1beta.GameServerConfigs .internal_static_google_cloud_gaming_v1beta_FleetConfig_descriptor; @@ -241,7 +188,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, 2, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -256,7 +203,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -274,7 +221,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFleetSpec().equals(other.getFleetSpec())) return false; if (!getName().equals(other.getName())) 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) + getFleetSpec().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; } @@ -418,17 +365,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.FleetConfig.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.gaming.v1beta.FleetConfig other) { name_ = other.name_; 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.gaming.v1beta.FleetConfig 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: + { + fleetSpec_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + name_ = 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.gaming.v1beta.FleetConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -802,7 +768,18 @@ public FleetConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FleetConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GameServerCluster.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GameServerCluster.java index e9fd13989b6d..c8e388558adb 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GameServerCluster.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GameServerCluster.java @@ -54,128 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GameServerCluster( - 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: - { - 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 26: - { - 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 34: - { - 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 42: - { - com.google.cloud.gaming.v1beta.GameServerClusterConnectionInfo.Builder subBuilder = - null; - if (connectionInfo_ != null) { - subBuilder = connectionInfo_.toBuilder(); - } - connectionInfo_ = - input.readMessage( - com.google.cloud.gaming.v1beta.GameServerClusterConnectionInfo.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(connectionInfo_); - connectionInfo_ = subBuilder.buildPartial(); - } - - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = 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.gaming.v1beta.GameServerClusters .internal_static_google_cloud_gaming_v1beta_GameServerCluster_descriptor; @@ -641,7 +519,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, description_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -678,7 +556,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, description_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -710,7 +588,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getEtag().equals(other.getEtag())) return false; if (!getDescription().equals(other.getDescription())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -743,7 +621,7 @@ public int hashCode() { hash = (53 * hash) + getEtag().hashCode(); hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -892,17 +770,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.gaming.v1beta.GameServerCluster.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 @@ -1053,7 +924,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.GameServerCluster other) description_ = other.description_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1068,17 +939,78 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.GameServerCluster 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(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 34 + case 42: + { + input.readMessage(getConnectionInfoFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 50: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 58: + { + description_ = 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.gaming.v1beta.GameServerCluster) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2216,7 +2148,18 @@ public GameServerCluster parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GameServerCluster(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GameServerClusterConnectionInfo.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GameServerClusterConnectionInfo.java index b4fca556b8b1..457a1fcd3d0c 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GameServerClusterConnectionInfo.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GameServerClusterConnectionInfo.java @@ -53,72 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GameServerClusterConnectionInfo( - 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 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - namespace_ = s; - break; - } - case 58: - { - com.google.cloud.gaming.v1beta.GkeClusterReference.Builder subBuilder = null; - if (clusterReferenceCase_ == 7) { - subBuilder = - ((com.google.cloud.gaming.v1beta.GkeClusterReference) clusterReference_) - .toBuilder(); - } - clusterReference_ = - input.readMessage( - com.google.cloud.gaming.v1beta.GkeClusterReference.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.gaming.v1beta.GkeClusterReference) clusterReference_); - clusterReference_ = subBuilder.buildPartial(); - } - clusterReferenceCase_ = 7; - 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.gaming.v1beta.GameServerClusters .internal_static_google_cloud_gaming_v1beta_GameServerClusterConnectionInfo_descriptor; @@ -304,7 +238,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage( 7, (com.google.cloud.gaming.v1beta.GkeClusterReference) clusterReference_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -321,7 +255,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 7, (com.google.cloud.gaming.v1beta.GkeClusterReference) clusterReference_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -346,7 +280,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; } @@ -367,7 +301,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -497,22 +431,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.GameServerClusterConnectionInfo.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 (gkeClusterReferenceBuilder_ != null) { + gkeClusterReferenceBuilder_.clear(); + } namespace_ = ""; clusterReferenceCase_ = 0; @@ -620,7 +550,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.GameServerClusterConnect break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -635,19 +565,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.GameServerClusterConnectionInfo 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 42: + { + namespace_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 58: + { + input.readMessage( + getGkeClusterReferenceFieldBuilder().getBuilder(), extensionRegistry); + clusterReferenceCase_ = 7; + 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.gaming.v1beta.GameServerClusterConnectionInfo) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1031,7 +986,18 @@ public GameServerClusterConnectionInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GameServerClusterConnectionInfo(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GameServerConfig.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GameServerConfig.java index 425a6d1a57a5..d4a60516b8ae 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GameServerConfig.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GameServerConfig.java @@ -55,133 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GameServerConfig( - 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: - { - 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 26: - { - 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 34: - { - 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 42: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - fleetConfigs_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - fleetConfigs_.add( - input.readMessage( - com.google.cloud.gaming.v1beta.FleetConfig.parser(), extensionRegistry)); - break; - } - case 50: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - scalingConfigs_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - scalingConfigs_.add( - input.readMessage( - com.google.cloud.gaming.v1beta.ScalingConfig.parser(), extensionRegistry)); - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = 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_ & 0x00000002) != 0)) { - fleetConfigs_ = java.util.Collections.unmodifiableList(fleetConfigs_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - scalingConfigs_ = java.util.Collections.unmodifiableList(scalingConfigs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1beta.GameServerConfigs .internal_static_google_cloud_gaming_v1beta_GameServerConfig_descriptor; @@ -690,7 +563,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, description_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -727,7 +600,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, description_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -756,7 +629,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFleetConfigsList().equals(other.getFleetConfigsList())) return false; if (!getScalingConfigsList().equals(other.getScalingConfigsList())) return false; if (!getDescription().equals(other.getDescription())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -791,7 +664,7 @@ public int hashCode() { } hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -940,20 +813,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.gaming.v1beta.GameServerConfig.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) { - getFleetConfigsFieldBuilder(); - getScalingConfigsFieldBuilder(); - } } @java.lang.Override @@ -976,16 +839,18 @@ public Builder clear() { internalGetMutableLabels().clear(); if (fleetConfigsBuilder_ == null) { fleetConfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + fleetConfigs_ = null; fleetConfigsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); if (scalingConfigsBuilder_ == null) { scalingConfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + scalingConfigs_ = null; scalingConfigsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); description_ = ""; return this; @@ -1167,7 +1032,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.GameServerConfig other) description_ = other.description_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1182,17 +1047,92 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.GameServerConfig 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(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 34 + case 42: + { + com.google.cloud.gaming.v1beta.FleetConfig m = + input.readMessage( + com.google.cloud.gaming.v1beta.FleetConfig.parser(), extensionRegistry); + if (fleetConfigsBuilder_ == null) { + ensureFleetConfigsIsMutable(); + fleetConfigs_.add(m); + } else { + fleetConfigsBuilder_.addMessage(m); + } + break; + } // case 42 + case 50: + { + com.google.cloud.gaming.v1beta.ScalingConfig m = + input.readMessage( + com.google.cloud.gaming.v1beta.ScalingConfig.parser(), extensionRegistry); + if (scalingConfigsBuilder_ == null) { + ensureScalingConfigsIsMutable(); + scalingConfigs_.add(m); + } else { + scalingConfigsBuilder_.addMessage(m); + } + break; + } // case 50 + case 58: + { + description_ = 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.gaming.v1beta.GameServerConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2752,7 +2692,18 @@ public GameServerConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GameServerConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GameServerConfigOverride.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GameServerConfigOverride.java index 4f5238eb7d86..179ad7904879 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GameServerConfigOverride.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GameServerConfigOverride.java @@ -50,68 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GameServerConfigOverride( - 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.gaming.v1beta.RealmSelector.Builder subBuilder = null; - if (selectorCase_ == 1) { - subBuilder = ((com.google.cloud.gaming.v1beta.RealmSelector) selector_).toBuilder(); - } - selector_ = - input.readMessage( - com.google.cloud.gaming.v1beta.RealmSelector.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.gaming.v1beta.RealmSelector) selector_); - selector_ = subBuilder.buildPartial(); - } - selectorCase_ = 1; - break; - } - case 802: - { - java.lang.String s = input.readStringRequireUtf8(); - changeCase_ = 100; - change_ = 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.gaming.v1beta.GameServerDeployments .internal_static_google_cloud_gaming_v1beta_GameServerConfigOverride_descriptor; @@ -356,7 +294,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (changeCase_ == 100) { com.google.protobuf.GeneratedMessageV3.writeString(output, 100, change_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -373,7 +311,7 @@ public int getSerializedSize() { if (changeCase_ == 100) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(100, change_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -405,7 +343,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; } @@ -432,7 +370,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -562,22 +500,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.GameServerConfigOverride.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 (realmsSelectorBuilder_ != null) { + realmsSelectorBuilder_.clear(); + } selectorCase_ = 0; selector_ = null; changeCase_ = 0; @@ -695,7 +629,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.GameServerConfigOverride break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -710,18 +644,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.GameServerConfigOverride 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(getRealmsSelectorFieldBuilder().getBuilder(), extensionRegistry); + selectorCase_ = 1; + break; + } // case 10 + case 802: + { + java.lang.String s = input.readStringRequireUtf8(); + changeCase_ = 100; + change_ = s; + break; + } // case 802 + default: + { + 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.gaming.v1beta.GameServerConfigOverride) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1129,7 +1089,18 @@ public GameServerConfigOverride parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GameServerConfigOverride(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GameServerDeployment.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GameServerDeployment.java index f53eb8a22d69..28f1d17d9f65 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GameServerDeployment.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GameServerDeployment.java @@ -54,110 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GameServerDeployment( - 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: - { - 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 26: - { - 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 34: - { - 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 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = 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.gaming.v1beta.GameServerDeployments .internal_static_google_cloud_gaming_v1beta_GameServerDeployment_descriptor; @@ -568,7 +464,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, description_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -602,7 +498,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, description_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -630,7 +526,7 @@ public boolean equals(final java.lang.Object obj) { if (!internalGetLabels().equals(other.internalGetLabels())) return false; if (!getEtag().equals(other.getEtag())) return false; if (!getDescription().equals(other.getDescription())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -659,7 +555,7 @@ public int hashCode() { hash = (53 * hash) + getEtag().hashCode(); hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -808,17 +704,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.gaming.v1beta.GameServerDeployment.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 @@ -955,7 +844,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.GameServerDeployment oth description_ = other.description_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -970,18 +859,72 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.GameServerDeployment 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(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 34 + case 58: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 58 + case 66: + { + description_ = 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.gaming.v1beta.GameServerDeployment) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1919,7 +1862,18 @@ public GameServerDeployment parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GameServerDeployment(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GameServerDeploymentRollout.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GameServerDeploymentRollout.java index f6484df49e23..63267a1547b8 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GameServerDeploymentRollout.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GameServerDeploymentRollout.java @@ -56,115 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GameServerDeploymentRollout( - 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: - { - 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 26: - { - 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 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - defaultGameServerConfig_ = s; - break; - } - case 42: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - gameServerConfigOverrides_ = - new java.util.ArrayList< - com.google.cloud.gaming.v1beta.GameServerConfigOverride>(); - mutable_bitField0_ |= 0x00000001; - } - gameServerConfigOverrides_.add( - input.readMessage( - com.google.cloud.gaming.v1beta.GameServerConfigOverride.parser(), - extensionRegistry)); - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = 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)) { - gameServerConfigOverrides_ = - java.util.Collections.unmodifiableList(gameServerConfigOverrides_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1beta.GameServerDeployments .internal_static_google_cloud_gaming_v1beta_GameServerDeploymentRollout_descriptor; @@ -560,7 +451,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, etag_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -589,7 +480,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, etag_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -618,7 +509,7 @@ public boolean equals(final java.lang.Object obj) { if (!getGameServerConfigOverridesList().equals(other.getGameServerConfigOverridesList())) return false; if (!getEtag().equals(other.getEtag())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -647,7 +538,7 @@ public int hashCode() { } hash = (37 * hash) + ETAG_FIELD_NUMBER; hash = (53 * hash) + getEtag().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -778,19 +669,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.GameServerDeploymentRollout.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) { - getGameServerConfigOverridesFieldBuilder(); - } } @java.lang.Override @@ -814,10 +696,11 @@ public Builder clear() { if (gameServerConfigOverridesBuilder_ == null) { gameServerConfigOverrides_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + gameServerConfigOverrides_ = null; gameServerConfigOverridesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); etag_ = ""; return this; @@ -966,7 +849,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.GameServerDeploymentRoll etag_ = other.etag_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -981,18 +864,75 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.GameServerDeploymentRollout 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(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + defaultGameServerConfig_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + com.google.cloud.gaming.v1beta.GameServerConfigOverride m = + input.readMessage( + com.google.cloud.gaming.v1beta.GameServerConfigOverride.parser(), + extensionRegistry); + if (gameServerConfigOverridesBuilder_ == null) { + ensureGameServerConfigOverridesIsMutable(); + gameServerConfigOverrides_.add(m); + } else { + gameServerConfigOverridesBuilder_.addMessage(m); + } + break; + } // case 42 + case 50: + { + etag_ = 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.gaming.v1beta.GameServerDeploymentRollout) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2216,7 +2156,18 @@ public GameServerDeploymentRollout parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GameServerDeploymentRollout(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GetGameServerClusterRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GetGameServerClusterRequest.java index c0b8a1560dd5..20678dd8fb99 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GetGameServerClusterRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GetGameServerClusterRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetGameServerClusterRequest( - 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.gaming.v1beta.GameServerClusters .internal_static_google_cloud_gaming_v1beta_GetGameServerClusterRequest_descriptor; @@ -185,7 +139,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 @@ -197,7 +151,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; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.gaming.v1beta.GetGameServerClusterRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,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; } @@ -357,17 +311,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.GetGameServerClusterRequest.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 @@ -457,7 +404,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.GetGameServerClusterRequ name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -472,18 +419,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.GetGameServerClusterRequest 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.gaming.v1beta.GetGameServerClusterRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -640,7 +606,18 @@ public GetGameServerClusterRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetGameServerClusterRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GetGameServerConfigRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GetGameServerConfigRequest.java index cdeea6f48938..0d27cbf75e69 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GetGameServerConfigRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GetGameServerConfigRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetGameServerConfigRequest( - 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.gaming.v1beta.GameServerConfigs .internal_static_google_cloud_gaming_v1beta_GetGameServerConfigRequest_descriptor; @@ -185,7 +139,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 @@ -197,7 +151,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; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.gaming.v1beta.GetGameServerConfigRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,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; } @@ -357,17 +311,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.GetGameServerConfigRequest.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 @@ -457,7 +404,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.GetGameServerConfigReque name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -472,18 +419,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.GetGameServerConfigRequest 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.gaming.v1beta.GetGameServerConfigRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -640,7 +606,18 @@ public GetGameServerConfigRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetGameServerConfigRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GetGameServerDeploymentRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GetGameServerDeploymentRequest.java index 43549ae79cef..19b1e2773d54 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GetGameServerDeploymentRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GetGameServerDeploymentRequest.java @@ -53,52 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetGameServerDeploymentRequest( - 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.gaming.v1beta.GameServerDeployments .internal_static_google_cloud_gaming_v1beta_GetGameServerDeploymentRequest_descriptor; @@ -188,7 +142,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 @@ -200,7 +154,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.gaming.v1beta.GetGameServerDeploymentRequest) 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; } @@ -360,17 +314,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.GetGameServerDeploymentRequest.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.gaming.v1beta.GetGameServerDeploymentR name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -477,19 +424,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.GetGameServerDeploymentRequest 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.gaming.v1beta.GetGameServerDeploymentRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -652,7 +617,18 @@ public GetGameServerDeploymentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetGameServerDeploymentRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GetGameServerDeploymentRolloutRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GetGameServerDeploymentRolloutRequest.java index ccd4211ddd5a..f1842b0bfefc 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GetGameServerDeploymentRolloutRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GetGameServerDeploymentRolloutRequest.java @@ -55,52 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetGameServerDeploymentRolloutRequest( - 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.gaming.v1beta.GameServerDeployments .internal_static_google_cloud_gaming_v1beta_GetGameServerDeploymentRolloutRequest_descriptor; @@ -190,7 +144,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 @@ -202,7 +156,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; } @@ -219,7 +173,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.gaming.v1beta.GetGameServerDeploymentRolloutRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -232,7 +186,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; } @@ -365,17 +319,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.gaming.v1beta.GetGameServerDeploymentRolloutRequest.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 @@ -470,7 +417,7 @@ public Builder mergeFrom( name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -485,19 +432,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.GetGameServerDeploymentRolloutRequest 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.gaming.v1beta.GetGameServerDeploymentRolloutRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -661,7 +626,18 @@ public GetGameServerDeploymentRolloutRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetGameServerDeploymentRolloutRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GetRealmRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GetRealmRequest.java index b3e0aee3889f..dead67f3398c 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GetRealmRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GetRealmRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetRealmRequest( - 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.gaming.v1beta.Realms .internal_static_google_cloud_gaming_v1beta_GetRealmRequest_descriptor; @@ -185,7 +139,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 @@ -197,7 +151,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; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.gaming.v1beta.GetRealmRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,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; } @@ -356,17 +310,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.GetRealmRequest.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 @@ -455,7 +402,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.GetRealmRequest other) { name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -470,17 +417,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.GetRealmRequest 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.gaming.v1beta.GetRealmRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -637,7 +604,18 @@ public GetRealmRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetRealmRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GkeClusterReference.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GkeClusterReference.java index 6890b1ceb23c..779c8d5ef266 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GkeClusterReference.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/GkeClusterReference.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GkeClusterReference( - 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(); - - cluster_ = 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.gaming.v1beta.GameServerClusters .internal_static_google_cloud_gaming_v1beta_GkeClusterReference_descriptor; @@ -193,7 +147,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cluster_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cluster_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -205,7 +159,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cluster_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cluster_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -222,7 +176,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.gaming.v1beta.GkeClusterReference) obj; if (!getCluster().equals(other.getCluster())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -235,7 +189,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + CLUSTER_FIELD_NUMBER; hash = (53 * hash) + getCluster().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -364,17 +318,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.GkeClusterReference.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 @@ -464,7 +411,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.GkeClusterReference othe cluster_ = other.cluster_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -479,18 +426,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.GkeClusterReference 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: + { + cluster_ = 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.gaming.v1beta.GkeClusterReference) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -667,7 +633,18 @@ public GkeClusterReference parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GkeClusterReference(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/LabelSelector.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/LabelSelector.java index 69dc9ccae273..f9e713ad2128 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/LabelSelector.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/LabelSelector.java @@ -50,59 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private LabelSelector( - 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)) { - 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; - } - 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.gaming.v1beta.Common .internal_static_google_cloud_gaming_v1beta_LabelSelector_descriptor; @@ -243,7 +190,7 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 1); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -262,7 +209,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, labels__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -279,7 +226,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.gaming.v1beta.LabelSelector) obj; if (!internalGetLabels().equals(other.internalGetLabels())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -294,7 +241,7 @@ public int hashCode() { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -443,17 +390,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.gaming.v1beta.LabelSelector.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 @@ -540,7 +480,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.gaming.v1beta.LabelSelector other) { if (other == com.google.cloud.gaming.v1beta.LabelSelector.getDefaultInstance()) return this; internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -555,17 +495,42 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.LabelSelector 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 labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.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.gaming.v1beta.LabelSelector) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -761,7 +726,18 @@ public LabelSelector parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new LabelSelector(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ListGameServerClustersRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ListGameServerClustersRequest.java index b7fd54745cee..1c048b6eb8be 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ListGameServerClustersRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ListGameServerClustersRequest.java @@ -55,78 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListGameServerClustersRequest( - 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; - } - case 42: - { - 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 { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1beta.GameServerClusters .internal_static_google_cloud_gaming_v1beta_ListGameServerClustersRequest_descriptor; @@ -399,7 +327,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, 5, orderBy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -423,7 +351,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -444,7 +372,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPageToken().equals(other.getPageToken())) return false; if (!getFilter().equals(other.getFilter())) 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; } @@ -465,7 +393,7 @@ public int hashCode() { hash = (53 * hash) + getFilter().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; } @@ -595,17 +523,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.ListGameServerClustersRequest.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 @@ -724,7 +645,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.ListGameServerClustersRe orderBy_ = other.orderBy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -739,18 +660,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.ListGameServerClustersRequest 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 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + + 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.gaming.v1beta.ListGameServerClustersRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1300,7 +1264,18 @@ public ListGameServerClustersRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListGameServerClustersRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ListGameServerClustersResponse.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ListGameServerClustersResponse.java index 53ef8913595a..d266c2a84dc1 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ListGameServerClustersResponse.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ListGameServerClustersResponse.java @@ -55,82 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListGameServerClustersResponse( - 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)) { - gameServerClusters_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - gameServerClusters_.add( - input.readMessage( - com.google.cloud.gaming.v1beta.GameServerCluster.parser(), - extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - unreachable_.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)) { - gameServerClusters_ = java.util.Collections.unmodifiableList(gameServerClusters_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1beta.GameServerClusters .internal_static_google_cloud_gaming_v1beta_ListGameServerClustersResponse_descriptor; @@ -352,7 +276,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < unreachable_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, unreachable_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -376,7 +300,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getUnreachableList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -395,7 +319,7 @@ public boolean equals(final java.lang.Object obj) { if (!getGameServerClustersList().equals(other.getGameServerClustersList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; if (!getUnreachableList().equals(other.getUnreachableList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -416,7 +340,7 @@ public int hashCode() { hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; hash = (53 * hash) + getUnreachableList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -546,19 +470,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.ListGameServerClustersResponse.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) { - getGameServerClustersFieldBuilder(); - } } @java.lang.Override @@ -566,10 +481,11 @@ public Builder clear() { super.clear(); if (gameServerClustersBuilder_ == null) { gameServerClusters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + gameServerClusters_ = null; gameServerClustersBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; @@ -710,7 +626,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.ListGameServerClustersRe } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -725,19 +641,58 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.ListGameServerClustersResponse 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.gaming.v1beta.GameServerCluster m = + input.readMessage( + com.google.cloud.gaming.v1beta.GameServerCluster.parser(), + extensionRegistry); + if (gameServerClustersBuilder_ == null) { + ensureGameServerClustersIsMutable(); + gameServerClusters_.add(m); + } else { + gameServerClustersBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.gaming.v1beta.ListGameServerClustersResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1416,7 +1371,18 @@ public ListGameServerClustersResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListGameServerClustersResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ListGameServerConfigsRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ListGameServerConfigsRequest.java index d2a865739b82..8f16b65abf17 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ListGameServerConfigsRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ListGameServerConfigsRequest.java @@ -55,78 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListGameServerConfigsRequest( - 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; - } - case 42: - { - 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 { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1beta.GameServerConfigs .internal_static_google_cloud_gaming_v1beta_ListGameServerConfigsRequest_descriptor; @@ -399,7 +327,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, 5, orderBy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -423,7 +351,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -444,7 +372,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPageToken().equals(other.getPageToken())) return false; if (!getFilter().equals(other.getFilter())) 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; } @@ -465,7 +393,7 @@ public int hashCode() { hash = (53 * hash) + getFilter().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; } @@ -595,17 +523,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.ListGameServerConfigsRequest.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 @@ -722,7 +643,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.ListGameServerConfigsReq orderBy_ = other.orderBy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -737,18 +658,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.ListGameServerConfigsRequest 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 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + + 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.gaming.v1beta.ListGameServerConfigsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1297,7 +1261,18 @@ public ListGameServerConfigsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListGameServerConfigsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ListGameServerConfigsResponse.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ListGameServerConfigsResponse.java index cabcc3263b0b..accc5274497b 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ListGameServerConfigsResponse.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ListGameServerConfigsResponse.java @@ -54,81 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListGameServerConfigsResponse( - 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)) { - gameServerConfigs_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - gameServerConfigs_.add( - input.readMessage( - com.google.cloud.gaming.v1beta.GameServerConfig.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - unreachable_.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)) { - gameServerConfigs_ = java.util.Collections.unmodifiableList(gameServerConfigs_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1beta.GameServerConfigs .internal_static_google_cloud_gaming_v1beta_ListGameServerConfigsResponse_descriptor; @@ -350,7 +275,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < unreachable_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, unreachable_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -374,7 +299,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getUnreachableList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -393,7 +318,7 @@ public boolean equals(final java.lang.Object obj) { if (!getGameServerConfigsList().equals(other.getGameServerConfigsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; if (!getUnreachableList().equals(other.getUnreachableList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -414,7 +339,7 @@ public int hashCode() { hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; hash = (53 * hash) + getUnreachableList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -544,19 +469,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.ListGameServerConfigsResponse.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) { - getGameServerConfigsFieldBuilder(); - } } @java.lang.Override @@ -564,10 +480,11 @@ public Builder clear() { super.clear(); if (gameServerConfigsBuilder_ == null) { gameServerConfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + gameServerConfigs_ = null; gameServerConfigsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; @@ -708,7 +625,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.ListGameServerConfigsRes } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -723,18 +640,58 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.ListGameServerConfigsResponse 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.gaming.v1beta.GameServerConfig m = + input.readMessage( + com.google.cloud.gaming.v1beta.GameServerConfig.parser(), + extensionRegistry); + if (gameServerConfigsBuilder_ == null) { + ensureGameServerConfigsIsMutable(); + gameServerConfigs_.add(m); + } else { + gameServerConfigsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.gaming.v1beta.ListGameServerConfigsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1413,7 +1370,18 @@ public ListGameServerConfigsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListGameServerConfigsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ListGameServerDeploymentsRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ListGameServerDeploymentsRequest.java index c84abb50ceac..10c8d60e0f58 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ListGameServerDeploymentsRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ListGameServerDeploymentsRequest.java @@ -56,78 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListGameServerDeploymentsRequest( - 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; - } - case 42: - { - 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 { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1beta.GameServerDeployments .internal_static_google_cloud_gaming_v1beta_ListGameServerDeploymentsRequest_descriptor; @@ -400,7 +328,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, 5, orderBy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -424,7 +352,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -445,7 +373,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPageToken().equals(other.getPageToken())) return false; if (!getFilter().equals(other.getFilter())) 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; } @@ -466,7 +394,7 @@ public int hashCode() { hash = (53 * hash) + getFilter().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; } @@ -596,17 +524,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.ListGameServerDeploymentsRequest.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 @@ -726,7 +647,7 @@ public Builder mergeFrom( orderBy_ = other.orderBy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -741,19 +662,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.ListGameServerDeploymentsRequest 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 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + + 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.gaming.v1beta.ListGameServerDeploymentsRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1304,7 +1267,18 @@ public ListGameServerDeploymentsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListGameServerDeploymentsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ListGameServerDeploymentsResponse.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ListGameServerDeploymentsResponse.java index 8fa718496d96..a5c390796ab8 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ListGameServerDeploymentsResponse.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ListGameServerDeploymentsResponse.java @@ -55,82 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListGameServerDeploymentsResponse( - 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)) { - gameServerDeployments_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - gameServerDeployments_.add( - input.readMessage( - com.google.cloud.gaming.v1beta.GameServerDeployment.parser(), - extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - unreachable_.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)) { - gameServerDeployments_ = java.util.Collections.unmodifiableList(gameServerDeployments_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1beta.GameServerDeployments .internal_static_google_cloud_gaming_v1beta_ListGameServerDeploymentsResponse_descriptor; @@ -358,7 +282,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < unreachable_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, unreachable_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -383,7 +307,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getUnreachableList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -402,7 +326,7 @@ public boolean equals(final java.lang.Object obj) { if (!getGameServerDeploymentsList().equals(other.getGameServerDeploymentsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; if (!getUnreachableList().equals(other.getUnreachableList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -423,7 +347,7 @@ public int hashCode() { hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; hash = (53 * hash) + getUnreachableList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -553,19 +477,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.ListGameServerDeploymentsResponse.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) { - getGameServerDeploymentsFieldBuilder(); - } } @java.lang.Override @@ -573,10 +488,11 @@ public Builder clear() { super.clear(); if (gameServerDeploymentsBuilder_ == null) { gameServerDeployments_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + gameServerDeployments_ = null; gameServerDeploymentsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; @@ -718,7 +634,7 @@ public Builder mergeFrom( } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -733,19 +649,58 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.ListGameServerDeploymentsResponse 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.gaming.v1beta.GameServerDeployment m = + input.readMessage( + com.google.cloud.gaming.v1beta.GameServerDeployment.parser(), + extensionRegistry); + if (gameServerDeploymentsBuilder_ == null) { + ensureGameServerDeploymentsIsMutable(); + gameServerDeployments_.add(m); + } else { + gameServerDeploymentsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.gaming.v1beta.ListGameServerDeploymentsResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1446,7 +1401,18 @@ public ListGameServerDeploymentsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListGameServerDeploymentsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ListRealmsRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ListRealmsRequest.java index eb52bbde396a..40166c1d75ba 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ListRealmsRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ListRealmsRequest.java @@ -55,78 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRealmsRequest( - 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; - } - case 42: - { - 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 { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1beta.Realms .internal_static_google_cloud_gaming_v1beta_ListRealmsRequest_descriptor; @@ -399,7 +327,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, 5, orderBy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -423,7 +351,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -444,7 +372,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPageToken().equals(other.getPageToken())) return false; if (!getFilter().equals(other.getFilter())) 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; } @@ -465,7 +393,7 @@ public int hashCode() { hash = (53 * hash) + getFilter().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; } @@ -594,17 +522,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.ListRealmsRequest.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 @@ -721,7 +642,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.ListRealmsRequest other) orderBy_ = other.orderBy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -736,17 +657,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.ListRealmsRequest 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 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + + 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.gaming.v1beta.ListRealmsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1295,7 +1260,18 @@ public ListRealmsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRealmsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ListRealmsResponse.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ListRealmsResponse.java index 228d6b257f0f..7c5102b21b74 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ListRealmsResponse.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ListRealmsResponse.java @@ -54,80 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRealmsResponse( - 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)) { - realms_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - realms_.add( - input.readMessage( - com.google.cloud.gaming.v1beta.Realm.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - unreachable_.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)) { - realms_ = java.util.Collections.unmodifiableList(realms_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1beta.Realms .internal_static_google_cloud_gaming_v1beta_ListRealmsResponse_descriptor; @@ -347,7 +273,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < unreachable_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -370,7 +296,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getUnreachableList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -389,7 +315,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRealmsList().equals(other.getRealmsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; if (!getUnreachableList().equals(other.getUnreachableList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -410,7 +336,7 @@ public int hashCode() { hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; hash = (53 * hash) + getUnreachableList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -539,19 +465,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.ListRealmsResponse.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) { - getRealmsFieldBuilder(); - } } @java.lang.Override @@ -559,10 +476,11 @@ public Builder clear() { super.clear(); if (realmsBuilder_ == null) { realms_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + realms_ = null; realmsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; @@ -701,7 +619,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.ListRealmsResponse other } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -716,18 +634,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.ListRealmsResponse 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.gaming.v1beta.Realm m = + input.readMessage( + com.google.cloud.gaming.v1beta.Realm.parser(), extensionRegistry); + if (realmsBuilder_ == null) { + ensureRealmsIsMutable(); + realms_.add(m); + } else { + realmsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.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.gaming.v1beta.ListRealmsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1392,7 +1349,18 @@ public ListRealmsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRealmsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/OperationMetadata.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/OperationMetadata.java index c889986fd331..821047ef754d 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/OperationMetadata.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/OperationMetadata.java @@ -56,141 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private OperationMetadata( - 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 (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 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; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - target_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - verb_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - statusMessage_ = s; - break; - } - case 48: - { - requestedCancellation_ = input.readBool(); - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - apiVersion_ = s; - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - unreachable_.add(s); - break; - } - case 74: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - operationStatus_ = - com.google.protobuf.MapField.newMapField( - OperationStatusDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.gaming.v1beta.OperationStatus> - operationStatus__ = - input.readMessage( - OperationStatusDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - operationStatus_ - .getMutableMap() - .put(operationStatus__.getKey(), operationStatus__.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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1beta.Common .internal_static_google_cloud_gaming_v1beta_OperationMetadata_descriptor; @@ -766,7 +631,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetOperationStatus(), OperationStatusDefaultEntryHolder.defaultEntry, 9); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -815,7 +680,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, operationStatus__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -846,7 +711,7 @@ public boolean equals(final java.lang.Object obj) { if (!getApiVersion().equals(other.getApiVersion())) return false; if (!getUnreachableList().equals(other.getUnreachableList())) return false; if (!internalGetOperationStatus().equals(other.internalGetOperationStatus())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -883,7 +748,7 @@ public int hashCode() { hash = (37 * hash) + OPERATION_STATUS_FIELD_NUMBER; hash = (53 * hash) + internalGetOperationStatus().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1032,17 +897,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.gaming.v1beta.OperationMetadata.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 @@ -1209,7 +1067,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.OperationMetadata other) onChanged(); } internalGetMutableOperationStatus().mergeFrom(other.internalGetOperationStatus()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1224,17 +1082,93 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.OperationMetadata 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 + case 18: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + target_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + verb_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + statusMessage_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 48: + { + requestedCancellation_ = input.readBool(); + + break; + } // case 48 + case 58: + { + apiVersion_ = input.readStringRequireUtf8(); + + break; + } // case 58 + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 66 + case 74: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.gaming.v1beta.OperationStatus> + operationStatus__ = + input.readMessage( + OperationStatusDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableOperationStatus() + .getMutableMap() + .put(operationStatus__.getKey(), operationStatus__.getValue()); + 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.gaming.v1beta.OperationMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2523,7 +2457,18 @@ public OperationMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OperationMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/OperationStatus.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/OperationStatus.java index edc5fa55d595..c4e6cbfe6245 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/OperationStatus.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/OperationStatus.java @@ -45,64 +45,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private OperationStatus( - 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: - { - done_ = input.readBool(); - break; - } - case 16: - { - int rawValue = input.readEnum(); - - errorCode_ = rawValue; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - errorMessage_ = 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.gaming.v1beta.Common .internal_static_google_cloud_gaming_v1beta_OperationStatus_descriptor; @@ -355,7 +297,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorMessage_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, errorMessage_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -375,7 +317,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorMessage_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, errorMessage_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -394,7 +336,7 @@ public boolean equals(final java.lang.Object obj) { if (getDone() != other.getDone()) return false; if (errorCode_ != other.errorCode_) return false; if (!getErrorMessage().equals(other.getErrorMessage())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -411,7 +353,7 @@ public int hashCode() { hash = (53 * hash) + errorCode_; hash = (37 * hash) + ERROR_MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getErrorMessage().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -532,17 +474,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.OperationStatus.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 @@ -643,7 +578,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.OperationStatus other) { errorMessage_ = other.errorMessage_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -658,17 +593,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.OperationStatus 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: + { + done_ = input.readBool(); + + break; + } // case 8 + case 16: + { + errorCode_ = input.readEnum(); + + break; + } // case 16 + case 26: + { + errorMessage_ = 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.gaming.v1beta.OperationStatus) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -955,7 +922,18 @@ public OperationStatus parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OperationStatus(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewCreateGameServerClusterRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewCreateGameServerClusterRequest.java index 4a9b946fcb53..930919d730b2 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewCreateGameServerClusterRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewCreateGameServerClusterRequest.java @@ -55,90 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PreviewCreateGameServerClusterRequest( - 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(); - - gameServerClusterId_ = s; - break; - } - case 26: - { - com.google.cloud.gaming.v1beta.GameServerCluster.Builder subBuilder = null; - if (gameServerCluster_ != null) { - subBuilder = gameServerCluster_.toBuilder(); - } - gameServerCluster_ = - input.readMessage( - com.google.cloud.gaming.v1beta.GameServerCluster.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(gameServerCluster_); - gameServerCluster_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (previewTime_ != null) { - subBuilder = previewTime_.toBuilder(); - } - previewTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(previewTime_); - previewTime_ = 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.gaming.v1beta.GameServerClusters .internal_static_google_cloud_gaming_v1beta_PreviewCreateGameServerClusterRequest_descriptor; @@ -387,7 +303,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (previewTime_ != null) { output.writeMessage(4, getPreviewTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -408,7 +324,7 @@ public int getSerializedSize() { if (previewTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPreviewTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -434,7 +350,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPreviewTime()) { if (!getPreviewTime().equals(other.getPreviewTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -457,7 +373,7 @@ public int hashCode() { hash = (37 * hash) + PREVIEW_TIME_FIELD_NUMBER; hash = (53 * hash) + getPreviewTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -589,17 +505,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.gaming.v1beta.PreviewCreateGameServerClusterRequest.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 @@ -729,7 +638,7 @@ public Builder mergeFrom( if (other.hasPreviewTime()) { mergePreviewTime(other.getPreviewTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -744,19 +653,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.PreviewCreateGameServerClusterRequest 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: + { + gameServerClusterId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage( + getGameServerClusterFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + input.readMessage(getPreviewTimeFieldBuilder().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.gaming.v1beta.PreviewCreateGameServerClusterRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1420,7 +1366,18 @@ public PreviewCreateGameServerClusterRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PreviewCreateGameServerClusterRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewCreateGameServerClusterResponse.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewCreateGameServerClusterResponse.java index 6d24f437be04..9c1c12fe7e65 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewCreateGameServerClusterResponse.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewCreateGameServerClusterResponse.java @@ -55,68 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PreviewCreateGameServerClusterResponse( - 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 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - case 26: - { - com.google.cloud.gaming.v1beta.TargetState.Builder subBuilder = null; - if (targetState_ != null) { - subBuilder = targetState_.toBuilder(); - } - targetState_ = - input.readMessage( - com.google.cloud.gaming.v1beta.TargetState.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetState_); - targetState_ = 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.gaming.v1beta.GameServerClusters .internal_static_google_cloud_gaming_v1beta_PreviewCreateGameServerClusterResponse_descriptor; @@ -249,7 +187,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (targetState_ != null) { output.writeMessage(3, getTargetState()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -264,7 +202,7 @@ public int getSerializedSize() { if (targetState_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTargetState()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -285,7 +223,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTargetState()) { if (!getTargetState().equals(other.getTargetState())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -302,7 +240,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_STATE_FIELD_NUMBER; hash = (53 * hash) + getTargetState().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -435,17 +373,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.gaming.v1beta.PreviewCreateGameServerClusterResponse.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 @@ -554,7 +485,7 @@ public Builder mergeFrom( if (other.hasTargetState()) { mergeTargetState(other.getTargetState()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -569,19 +500,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.PreviewCreateGameServerClusterResponse 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: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getTargetStateFieldBuilder().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.gaming.v1beta.PreviewCreateGameServerClusterResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -911,7 +866,18 @@ public PreviewCreateGameServerClusterResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PreviewCreateGameServerClusterResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewDeleteGameServerClusterRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewDeleteGameServerClusterRequest.java index 86801dcf8dd8..9124adb4262f 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewDeleteGameServerClusterRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewDeleteGameServerClusterRequest.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PreviewDeleteGameServerClusterRequest( - 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.protobuf.Timestamp.Builder subBuilder = null; - if (previewTime_ != null) { - subBuilder = previewTime_.toBuilder(); - } - previewTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(previewTime_); - previewTime_ = 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.gaming.v1beta.GameServerClusters .internal_static_google_cloud_gaming_v1beta_PreviewDeleteGameServerClusterRequest_descriptor; @@ -254,7 +193,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (previewTime_ != null) { output.writeMessage(2, getPreviewTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -269,7 +208,7 @@ public int getSerializedSize() { if (previewTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPreviewTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -290,7 +229,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPreviewTime()) { if (!getPreviewTime().equals(other.getPreviewTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -307,7 +246,7 @@ public int hashCode() { hash = (37 * hash) + PREVIEW_TIME_FIELD_NUMBER; hash = (53 * hash) + getPreviewTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -439,17 +378,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.gaming.v1beta.PreviewDeleteGameServerClusterRequest.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 @@ -558,7 +490,7 @@ public Builder mergeFrom( if (other.hasPreviewTime()) { mergePreviewTime(other.getPreviewTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -573,19 +505,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.PreviewDeleteGameServerClusterRequest 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(getPreviewTimeFieldBuilder().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.gaming.v1beta.PreviewDeleteGameServerClusterRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -938,7 +894,18 @@ public PreviewDeleteGameServerClusterRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PreviewDeleteGameServerClusterRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewDeleteGameServerClusterResponse.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewDeleteGameServerClusterResponse.java index 216b183fc8bd..05053164149c 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewDeleteGameServerClusterResponse.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewDeleteGameServerClusterResponse.java @@ -55,68 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PreviewDeleteGameServerClusterResponse( - 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 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - case 26: - { - com.google.cloud.gaming.v1beta.TargetState.Builder subBuilder = null; - if (targetState_ != null) { - subBuilder = targetState_.toBuilder(); - } - targetState_ = - input.readMessage( - com.google.cloud.gaming.v1beta.TargetState.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetState_); - targetState_ = 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.gaming.v1beta.GameServerClusters .internal_static_google_cloud_gaming_v1beta_PreviewDeleteGameServerClusterResponse_descriptor; @@ -249,7 +187,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (targetState_ != null) { output.writeMessage(3, getTargetState()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -264,7 +202,7 @@ public int getSerializedSize() { if (targetState_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTargetState()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -285,7 +223,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTargetState()) { if (!getTargetState().equals(other.getTargetState())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -302,7 +240,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_STATE_FIELD_NUMBER; hash = (53 * hash) + getTargetState().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -435,17 +373,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.gaming.v1beta.PreviewDeleteGameServerClusterResponse.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 @@ -554,7 +485,7 @@ public Builder mergeFrom( if (other.hasTargetState()) { mergeTargetState(other.getTargetState()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -569,19 +500,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.PreviewDeleteGameServerClusterResponse 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: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getTargetStateFieldBuilder().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.gaming.v1beta.PreviewDeleteGameServerClusterResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -911,7 +866,18 @@ public PreviewDeleteGameServerClusterResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PreviewDeleteGameServerClusterResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewGameServerDeploymentRolloutRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewGameServerDeploymentRolloutRequest.java index d7062c5d7fd6..d9c0547f46a6 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewGameServerDeploymentRolloutRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewGameServerDeploymentRolloutRequest.java @@ -52,92 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PreviewGameServerDeploymentRolloutRequest( - 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.gaming.v1beta.GameServerDeploymentRollout.Builder subBuilder = null; - if (rollout_ != null) { - subBuilder = rollout_.toBuilder(); - } - rollout_ = - input.readMessage( - com.google.cloud.gaming.v1beta.GameServerDeploymentRollout.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(rollout_); - rollout_ = 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; - } - case 26: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (previewTime_ != null) { - subBuilder = previewTime_.toBuilder(); - } - previewTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(previewTime_); - previewTime_ = 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.gaming.v1beta.GameServerDeployments .internal_static_google_cloud_gaming_v1beta_PreviewGameServerDeploymentRolloutRequest_descriptor; @@ -346,7 +260,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (previewTime_ != null) { output.writeMessage(3, getPreviewTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -364,7 +278,7 @@ public int getSerializedSize() { if (previewTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPreviewTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -393,7 +307,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPreviewTime()) { if (!getPreviewTime().equals(other.getPreviewTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -416,7 +330,7 @@ public int hashCode() { hash = (37 * hash) + PREVIEW_TIME_FIELD_NUMBER; hash = (53 * hash) + getPreviewTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -549,17 +463,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.gaming.v1beta.PreviewGameServerDeploymentRolloutRequest.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 @@ -691,7 +598,7 @@ public Builder mergeFrom( if (other.hasPreviewTime()) { mergePreviewTime(other.getPreviewTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -706,19 +613,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.PreviewGameServerDeploymentRolloutRequest 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(getRolloutFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getPreviewTimeFieldBuilder().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.gaming.v1beta.PreviewGameServerDeploymentRolloutRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1403,7 +1340,19 @@ public PreviewGameServerDeploymentRolloutRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PreviewGameServerDeploymentRolloutRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewGameServerDeploymentRolloutResponse.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewGameServerDeploymentRolloutResponse.java index 76407e5912ae..b4fa213ae42b 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewGameServerDeploymentRolloutResponse.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewGameServerDeploymentRolloutResponse.java @@ -56,82 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PreviewGameServerDeploymentRolloutResponse( - 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: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - unavailable_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - unavailable_.add(s); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - case 34: - { - com.google.cloud.gaming.v1beta.TargetState.Builder subBuilder = null; - if (targetState_ != null) { - subBuilder = targetState_.toBuilder(); - } - targetState_ = - input.readMessage( - com.google.cloud.gaming.v1beta.TargetState.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetState_); - targetState_ = 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)) { - unavailable_ = unavailable_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1beta.GameServerDeployments .internal_static_google_cloud_gaming_v1beta_PreviewGameServerDeploymentRolloutResponse_descriptor; @@ -329,7 +253,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (targetState_ != null) { output.writeMessage(4, getTargetState()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -352,7 +276,7 @@ public int getSerializedSize() { if (targetState_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getTargetState()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -375,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTargetState()) { if (!getTargetState().equals(other.getTargetState())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -396,7 +320,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_STATE_FIELD_NUMBER; hash = (53 * hash) + getTargetState().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -530,17 +454,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.gaming.v1beta.PreviewGameServerDeploymentRolloutResponse.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 +587,7 @@ public Builder mergeFrom( if (other.hasTargetState()) { mergeTargetState(other.getTargetState()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -685,20 +602,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.PreviewGameServerDeploymentRolloutResponse 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: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnavailableIsMutable(); + unavailable_.add(s); + break; + } // case 18 + case 26: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + input.readMessage(getTargetStateFieldBuilder().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.gaming.v1beta.PreviewGameServerDeploymentRolloutResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1200,7 +1147,19 @@ public PreviewGameServerDeploymentRolloutResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PreviewGameServerDeploymentRolloutResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewRealmUpdateRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewRealmUpdateRequest.java index 86f0b503fd3a..d5eb4d172b40 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewRealmUpdateRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewRealmUpdateRequest.java @@ -50,91 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PreviewRealmUpdateRequest( - 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.gaming.v1beta.Realm.Builder subBuilder = null; - if (realm_ != null) { - subBuilder = realm_.toBuilder(); - } - realm_ = - input.readMessage( - com.google.cloud.gaming.v1beta.Realm.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(realm_); - realm_ = 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; - } - case 26: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (previewTime_ != null) { - subBuilder = previewTime_.toBuilder(); - } - previewTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(previewTime_); - previewTime_ = 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.gaming.v1beta.Realms .internal_static_google_cloud_gaming_v1beta_PreviewRealmUpdateRequest_descriptor; @@ -335,7 +250,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (previewTime_ != null) { output.writeMessage(3, getPreviewTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -353,7 +268,7 @@ public int getSerializedSize() { if (previewTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPreviewTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -381,7 +296,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPreviewTime()) { if (!getPreviewTime().equals(other.getPreviewTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -404,7 +319,7 @@ public int hashCode() { hash = (37 * hash) + PREVIEW_TIME_FIELD_NUMBER; hash = (53 * hash) + getPreviewTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -534,17 +449,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.PreviewRealmUpdateRequest.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 @@ -669,7 +577,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.PreviewRealmUpdateReques if (other.hasPreviewTime()) { mergePreviewTime(other.getPreviewTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -684,18 +592,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.PreviewRealmUpdateRequest 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(getRealmFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getPreviewTimeFieldBuilder().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.gaming.v1beta.PreviewRealmUpdateRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1352,7 +1291,18 @@ public PreviewRealmUpdateRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PreviewRealmUpdateRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewRealmUpdateResponse.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewRealmUpdateResponse.java index b295adf50bab..4346ae90977b 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewRealmUpdateResponse.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewRealmUpdateResponse.java @@ -52,68 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PreviewRealmUpdateResponse( - 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 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - case 26: - { - com.google.cloud.gaming.v1beta.TargetState.Builder subBuilder = null; - if (targetState_ != null) { - subBuilder = targetState_.toBuilder(); - } - targetState_ = - input.readMessage( - com.google.cloud.gaming.v1beta.TargetState.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetState_); - targetState_ = 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.gaming.v1beta.Realms .internal_static_google_cloud_gaming_v1beta_PreviewRealmUpdateResponse_descriptor; @@ -246,7 +184,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (targetState_ != null) { output.writeMessage(3, getTargetState()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -261,7 +199,7 @@ public int getSerializedSize() { if (targetState_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTargetState()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -282,7 +220,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTargetState()) { if (!getTargetState().equals(other.getTargetState())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -299,7 +237,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_STATE_FIELD_NUMBER; hash = (53 * hash) + getTargetState().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -429,17 +367,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.PreviewRealmUpdateResponse.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 @@ -543,7 +474,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.PreviewRealmUpdateRespon if (other.hasTargetState()) { mergeTargetState(other.getTargetState()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -558,18 +489,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.PreviewRealmUpdateResponse 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: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getTargetStateFieldBuilder().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.gaming.v1beta.PreviewRealmUpdateResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -897,7 +853,18 @@ public PreviewRealmUpdateResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PreviewRealmUpdateResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewUpdateGameServerClusterRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewUpdateGameServerClusterRequest.java index 2a7bf2581f50..aced42cac889 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewUpdateGameServerClusterRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewUpdateGameServerClusterRequest.java @@ -52,91 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PreviewUpdateGameServerClusterRequest( - 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.gaming.v1beta.GameServerCluster.Builder subBuilder = null; - if (gameServerCluster_ != null) { - subBuilder = gameServerCluster_.toBuilder(); - } - gameServerCluster_ = - input.readMessage( - com.google.cloud.gaming.v1beta.GameServerCluster.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(gameServerCluster_); - gameServerCluster_ = 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; - } - case 26: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (previewTime_ != null) { - subBuilder = previewTime_.toBuilder(); - } - previewTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(previewTime_); - previewTime_ = 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.gaming.v1beta.GameServerClusters .internal_static_google_cloud_gaming_v1beta_PreviewUpdateGameServerClusterRequest_descriptor; @@ -342,7 +257,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (previewTime_ != null) { output.writeMessage(3, getPreviewTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -360,7 +275,7 @@ public int getSerializedSize() { if (previewTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPreviewTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -388,7 +303,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPreviewTime()) { if (!getPreviewTime().equals(other.getPreviewTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -411,7 +326,7 @@ public int hashCode() { hash = (37 * hash) + PREVIEW_TIME_FIELD_NUMBER; hash = (53 * hash) + getPreviewTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -543,17 +458,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.gaming.v1beta.PreviewUpdateGameServerClusterRequest.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 @@ -683,7 +591,7 @@ public Builder mergeFrom( if (other.hasPreviewTime()) { mergePreviewTime(other.getPreviewTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -698,19 +606,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.PreviewUpdateGameServerClusterRequest 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( + getGameServerClusterFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getPreviewTimeFieldBuilder().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.gaming.v1beta.PreviewUpdateGameServerClusterRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1384,7 +1323,18 @@ public PreviewUpdateGameServerClusterRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PreviewUpdateGameServerClusterRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewUpdateGameServerClusterResponse.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewUpdateGameServerClusterResponse.java index dedec9c3fbe4..44eddf158c2c 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewUpdateGameServerClusterResponse.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/PreviewUpdateGameServerClusterResponse.java @@ -54,68 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PreviewUpdateGameServerClusterResponse( - 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 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - case 26: - { - com.google.cloud.gaming.v1beta.TargetState.Builder subBuilder = null; - if (targetState_ != null) { - subBuilder = targetState_.toBuilder(); - } - targetState_ = - input.readMessage( - com.google.cloud.gaming.v1beta.TargetState.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetState_); - targetState_ = 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.gaming.v1beta.GameServerClusters .internal_static_google_cloud_gaming_v1beta_PreviewUpdateGameServerClusterResponse_descriptor; @@ -248,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (targetState_ != null) { output.writeMessage(3, getTargetState()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -263,7 +201,7 @@ public int getSerializedSize() { if (targetState_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTargetState()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -284,7 +222,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTargetState()) { if (!getTargetState().equals(other.getTargetState())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -301,7 +239,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_STATE_FIELD_NUMBER; hash = (53 * hash) + getTargetState().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -433,17 +371,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.gaming.v1beta.PreviewUpdateGameServerClusterResponse.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 @@ -552,7 +483,7 @@ public Builder mergeFrom( if (other.hasTargetState()) { mergeTargetState(other.getTargetState()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -567,19 +498,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.PreviewUpdateGameServerClusterResponse 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: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getTargetStateFieldBuilder().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.gaming.v1beta.PreviewUpdateGameServerClusterResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -909,7 +864,18 @@ public PreviewUpdateGameServerClusterResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PreviewUpdateGameServerClusterResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/Realm.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/Realm.java index 50c4755f5eb6..e7b46263976e 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/Realm.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/Realm.java @@ -55,117 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Realm( - 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: - { - 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 26: - { - 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 34: - { - 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 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - timeZone_ = s; - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = 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.gaming.v1beta.Realms .internal_static_google_cloud_gaming_v1beta_Realm_descriptor; @@ -626,7 +515,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, description_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -663,7 +552,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, description_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -691,7 +580,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTimeZone().equals(other.getTimeZone())) return false; if (!getEtag().equals(other.getEtag())) return false; if (!getDescription().equals(other.getDescription())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -722,7 +611,7 @@ public int hashCode() { hash = (53 * hash) + getEtag().hashCode(); hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -870,17 +759,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.gaming.v1beta.Realm.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 @@ -1022,7 +904,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.Realm other) { description_ = other.description_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1037,17 +919,78 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.Realm 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(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 34 + case 50: + { + timeZone_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 58: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 58 + case 66: + { + description_ = 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.gaming.v1beta.Realm) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2089,7 +2032,18 @@ public Realm parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Realm(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/RealmSelector.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/RealmSelector.java index d2918e760d05..582fbb113b06 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/RealmSelector.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/RealmSelector.java @@ -52,59 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RealmSelector( - 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)) { - realms_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - realms_.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)) { - realms_ = realms_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1beta.Common .internal_static_google_cloud_gaming_v1beta_RealmSelector_descriptor; @@ -198,7 +145,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < realms_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, realms_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -215,7 +162,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getRealmsList().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.gaming.v1beta.RealmSelector) obj; if (!getRealmsList().equals(other.getRealmsList())) 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) + REALMS_FIELD_NUMBER; hash = (53 * hash) + getRealmsList().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.gaming.v1beta.RealmSelector.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.gaming.v1beta.RealmSelector 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.gaming.v1beta.RealmSelector 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(); + ensureRealmsIsMutable(); + realms_.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.gaming.v1beta.RealmSelector) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -717,7 +678,18 @@ public RealmSelector parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RealmSelector(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ScalingConfig.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ScalingConfig.java index b45d89befbdf..13d36ee991c1 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ScalingConfig.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/ScalingConfig.java @@ -55,89 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ScalingConfig( - 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(); - - fleetAutoscalerSpec_ = s; - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - selectors_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - selectors_.add( - input.readMessage( - com.google.cloud.gaming.v1beta.LabelSelector.parser(), extensionRegistry)); - break; - } - case 42: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - schedules_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - schedules_.add( - input.readMessage( - com.google.cloud.gaming.v1beta.Schedule.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)) { - selectors_ = java.util.Collections.unmodifiableList(selectors_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - schedules_ = java.util.Collections.unmodifiableList(schedules_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1beta.GameServerConfigs .internal_static_google_cloud_gaming_v1beta_ScalingConfig_descriptor; @@ -427,7 +344,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < schedules_.size(); i++) { output.writeMessage(5, schedules_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -448,7 +365,7 @@ public int getSerializedSize() { for (int i = 0; i < schedules_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, schedules_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -468,7 +385,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFleetAutoscalerSpec().equals(other.getFleetAutoscalerSpec())) return false; if (!getSelectorsList().equals(other.getSelectorsList())) return false; if (!getSchedulesList().equals(other.getSchedulesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -491,7 +408,7 @@ public int hashCode() { hash = (37 * hash) + SCHEDULES_FIELD_NUMBER; hash = (53 * hash) + getSchedulesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -620,20 +537,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.ScalingConfig.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) { - getSelectorsFieldBuilder(); - getSchedulesFieldBuilder(); - } } @java.lang.Override @@ -645,16 +552,18 @@ public Builder clear() { if (selectorsBuilder_ == null) { selectors_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + selectors_ = null; selectorsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (schedulesBuilder_ == null) { schedules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + schedules_ = null; schedulesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -814,7 +723,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.ScalingConfig other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -829,17 +738,69 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.ScalingConfig 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: + { + fleetAutoscalerSpec_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 34: + { + com.google.cloud.gaming.v1beta.LabelSelector m = + input.readMessage( + com.google.cloud.gaming.v1beta.LabelSelector.parser(), extensionRegistry); + if (selectorsBuilder_ == null) { + ensureSelectorsIsMutable(); + selectors_.add(m); + } else { + selectorsBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + com.google.cloud.gaming.v1beta.Schedule m = + input.readMessage( + com.google.cloud.gaming.v1beta.Schedule.parser(), extensionRegistry); + if (schedulesBuilder_ == null) { + ensureSchedulesIsMutable(); + schedules_.add(m); + } else { + schedulesBuilder_.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.gaming.v1beta.ScalingConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1830,7 +1791,18 @@ public ScalingConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ScalingConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/Schedule.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/Schedule.java index 9bb856fbfaae..e96a16c389e2 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/Schedule.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/Schedule.java @@ -60,97 +60,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Schedule( - 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; - } - case 26: - { - com.google.protobuf.Duration.Builder subBuilder = null; - if (cronJobDuration_ != null) { - subBuilder = cronJobDuration_.toBuilder(); - } - cronJobDuration_ = - input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(cronJobDuration_); - cronJobDuration_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - cronSpec_ = 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.gaming.v1beta.Common .internal_static_google_cloud_gaming_v1beta_Schedule_descriptor; @@ -388,7 +297,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cronSpec_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, cronSpec_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -409,7 +318,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cronSpec_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, cronSpec_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -437,7 +346,7 @@ public boolean equals(final java.lang.Object obj) { if (!getCronJobDuration().equals(other.getCronJobDuration())) return false; } if (!getCronSpec().equals(other.getCronSpec())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -462,7 +371,7 @@ public int hashCode() { } hash = (37 * hash) + CRON_SPEC_FIELD_NUMBER; hash = (53 * hash) + getCronSpec().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -599,17 +508,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.Schedule.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 @@ -740,7 +642,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.Schedule other) { cronSpec_ = other.cronSpec_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -755,17 +657,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.Schedule 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 + case 26: + { + input.readMessage(getCronJobDurationFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + cronSpec_ = 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.gaming.v1beta.Schedule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1469,7 +1409,18 @@ public Schedule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Schedule(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/SpecSource.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/SpecSource.java index ed6521c22009..80e278dab9e4 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/SpecSource.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/SpecSource.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SpecSource( - 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(); - - gameServerConfigName_ = s; - break; - } - case 18: - { - 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.gaming.v1beta.Common .internal_static_google_cloud_gaming_v1beta_SpecSource_descriptor; @@ -243,7 +190,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, 2, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -258,7 +205,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -276,7 +223,7 @@ public boolean equals(final java.lang.Object obj) { if (!getGameServerConfigName().equals(other.getGameServerConfigName())) return false; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -291,7 +238,7 @@ public int hashCode() { hash = (53 * hash) + getGameServerConfigName().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; } @@ -420,17 +367,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.SpecSource.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 @@ -526,7 +466,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.SpecSource other) { name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -541,17 +481,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.SpecSource 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: + { + gameServerConfigName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + name_ = 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.gaming.v1beta.SpecSource) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -809,7 +775,18 @@ public SpecSource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SpecSource(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/TargetDetails.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/TargetDetails.java index 8fcdc8e7186d..4ce52e119627 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/TargetDetails.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/TargetDetails.java @@ -54,77 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetDetails( - 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(); - - gameServerClusterName_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - gameServerDeploymentName_ = s; - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - fleetDetails_ = - new java.util.ArrayList< - com.google.cloud.gaming.v1beta.TargetDetails.TargetFleetDetails>(); - mutable_bitField0_ |= 0x00000001; - } - fleetDetails_.add( - input.readMessage( - com.google.cloud.gaming.v1beta.TargetDetails.TargetFleetDetails.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)) { - fleetDetails_ = java.util.Collections.unmodifiableList(fleetDetails_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1beta.Common .internal_static_google_cloud_gaming_v1beta_TargetDetails_descriptor; @@ -259,84 +188,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetFleetDetails( - 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.gaming.v1beta.TargetDetails.TargetFleetDetails.TargetFleet.Builder - subBuilder = null; - if (fleet_ != null) { - subBuilder = fleet_.toBuilder(); - } - fleet_ = - input.readMessage( - com.google.cloud.gaming.v1beta.TargetDetails.TargetFleetDetails.TargetFleet - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(fleet_); - fleet_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.cloud.gaming.v1beta.TargetDetails.TargetFleetDetails - .TargetFleetAutoscaler.Builder - subBuilder = null; - if (autoscaler_ != null) { - subBuilder = autoscaler_.toBuilder(); - } - autoscaler_ = - input.readMessage( - com.google.cloud.gaming.v1beta.TargetDetails.TargetFleetDetails - .TargetFleetAutoscaler.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(autoscaler_); - autoscaler_ = 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.gaming.v1beta.Common .internal_static_google_cloud_gaming_v1beta_TargetDetails_TargetFleetDetails_descriptor; @@ -454,69 +305,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetFleet( - 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.gaming.v1beta.SpecSource.Builder subBuilder = null; - if (specSource_ != null) { - subBuilder = specSource_.toBuilder(); - } - specSource_ = - input.readMessage( - com.google.cloud.gaming.v1beta.SpecSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(specSource_); - specSource_ = 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.gaming.v1beta.Common .internal_static_google_cloud_gaming_v1beta_TargetDetails_TargetFleetDetails_TargetFleet_descriptor; @@ -653,7 +441,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (specSource_ != null) { output.writeMessage(2, getSpecSource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -668,7 +456,7 @@ public int getSerializedSize() { if (specSource_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSpecSource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -691,7 +479,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSpecSource()) { if (!getSpecSource().equals(other.getSpecSource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -708,7 +496,7 @@ public int hashCode() { hash = (37 * hash) + SPEC_SOURCE_FIELD_NUMBER; hash = (53 * hash) + getSpecSource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -851,17 +639,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.gaming.v1beta.TargetDetails.TargetFleetDetails.TargetFleet.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 @@ -977,7 +758,7 @@ public Builder mergeFrom( if (other.hasSpecSource()) { mergeSpecSource(other.getSpecSource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -992,20 +773,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.TargetDetails.TargetFleetDetails.TargetFleet - 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(getSpecSourceFieldBuilder().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.gaming.v1beta.TargetDetails.TargetFleetDetails.TargetFleet) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1347,7 +1151,19 @@ public TargetFleet parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetFleet(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(); } }; @@ -1470,69 +1286,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetFleetAutoscaler( - 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.gaming.v1beta.SpecSource.Builder subBuilder = null; - if (specSource_ != null) { - subBuilder = specSource_.toBuilder(); - } - specSource_ = - input.readMessage( - com.google.cloud.gaming.v1beta.SpecSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(specSource_); - specSource_ = 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.gaming.v1beta.Common .internal_static_google_cloud_gaming_v1beta_TargetDetails_TargetFleetDetails_TargetFleetAutoscaler_descriptor; @@ -1670,7 +1423,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (specSource_ != null) { output.writeMessage(2, getSpecSource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1685,7 +1438,7 @@ public int getSerializedSize() { if (specSource_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSpecSource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1712,7 +1465,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSpecSource()) { if (!getSpecSource().equals(other.getSpecSource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1729,7 +1482,7 @@ public int hashCode() { hash = (37 * hash) + SPEC_SOURCE_FIELD_NUMBER; hash = (53 * hash) + getSpecSource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1887,17 +1640,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.gaming.v1beta.TargetDetails.TargetFleetDetails.TargetFleetAutoscaler.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 @@ -2019,7 +1765,7 @@ public Builder mergeFrom( if (other.hasSpecSource()) { mergeSpecSource(other.getSpecSource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2034,21 +1780,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.TargetDetails.TargetFleetDetails.TargetFleetAutoscaler - 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(getSpecSourceFieldBuilder().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.gaming.v1beta.TargetDetails.TargetFleetDetails - .TargetFleetAutoscaler) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2392,7 +2160,19 @@ public TargetFleetAutoscaler parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetFleetAutoscaler(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(); } }; @@ -2544,7 +2324,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (autoscaler_ != null) { output.writeMessage(2, getAutoscaler()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2559,7 +2339,7 @@ public int getSerializedSize() { if (autoscaler_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAutoscaler()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2583,7 +2363,7 @@ public boolean equals(final java.lang.Object obj) { if (hasAutoscaler()) { if (!getAutoscaler().equals(other.getAutoscaler())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2602,7 +2382,7 @@ public int hashCode() { hash = (37 * hash) + AUTOSCALER_FIELD_NUMBER; hash = (53 * hash) + getAutoscaler().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2736,17 +2516,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.gaming.v1beta.TargetDetails.TargetFleetDetails.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 @@ -2862,7 +2635,7 @@ public Builder mergeFrom( if (other.hasAutoscaler()) { mergeAutoscaler(other.getAutoscaler()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2877,19 +2650,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.TargetDetails.TargetFleetDetails 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(getFleetFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getAutoscalerFieldBuilder().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.gaming.v1beta.TargetDetails.TargetFleetDetails) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3359,7 +3156,19 @@ public TargetFleetDetails parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetFleetDetails(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(); } }; @@ -3583,7 +3392,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < fleetDetails_.size(); i++) { output.writeMessage(3, fleetDetails_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3602,7 +3411,7 @@ public int getSerializedSize() { for (int i = 0; i < fleetDetails_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, fleetDetails_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3621,7 +3430,7 @@ public boolean equals(final java.lang.Object obj) { if (!getGameServerClusterName().equals(other.getGameServerClusterName())) return false; if (!getGameServerDeploymentName().equals(other.getGameServerDeploymentName())) return false; if (!getFleetDetailsList().equals(other.getFleetDetailsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3640,7 +3449,7 @@ public int hashCode() { hash = (37 * hash) + FLEET_DETAILS_FIELD_NUMBER; hash = (53 * hash) + getFleetDetailsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3769,19 +3578,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.TargetDetails.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) { - getFleetDetailsFieldBuilder(); - } } @java.lang.Override @@ -3793,10 +3593,11 @@ public Builder clear() { if (fleetDetailsBuilder_ == null) { fleetDetails_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + fleetDetails_ = null; fleetDetailsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -3920,7 +3721,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.TargetDetails other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3935,17 +3736,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.TargetDetails 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: + { + gameServerClusterName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + gameServerDeploymentName_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + com.google.cloud.gaming.v1beta.TargetDetails.TargetFleetDetails m = + input.readMessage( + com.google.cloud.gaming.v1beta.TargetDetails.TargetFleetDetails.parser(), + extensionRegistry); + if (fleetDetailsBuilder_ == null) { + ensureFleetDetailsIsMutable(); + fleetDetails_.add(m); + } else { + fleetDetailsBuilder_.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.gaming.v1beta.TargetDetails) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4610,7 +4451,18 @@ public TargetDetails parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetDetails(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/TargetState.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/TargetState.java index 58d6447beecf..d264e891cb35 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/TargetState.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/TargetState.java @@ -52,60 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetState( - 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)) { - details_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - details_.add( - input.readMessage( - com.google.cloud.gaming.v1beta.TargetDetails.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)) { - details_ = java.util.Collections.unmodifiableList(details_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gaming.v1beta.Common .internal_static_google_cloud_gaming_v1beta_TargetState_descriptor; @@ -207,7 +153,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < details_.size(); i++) { output.writeMessage(1, details_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -219,7 +165,7 @@ public int getSerializedSize() { for (int i = 0; i < details_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, details_.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.gaming.v1beta.TargetState) obj; if (!getDetailsList().equals(other.getDetailsList())) 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) + DETAILS_FIELD_NUMBER; hash = (53 * hash) + getDetailsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -380,19 +326,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.TargetState.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) { - getDetailsFieldBuilder(); - } } @java.lang.Override @@ -400,10 +337,11 @@ public Builder clear() { super.clear(); if (detailsBuilder_ == null) { details_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + details_ = null; detailsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -517,7 +455,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.TargetState other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -532,17 +470,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.TargetState 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.gaming.v1beta.TargetDetails m = + input.readMessage( + com.google.cloud.gaming.v1beta.TargetDetails.parser(), extensionRegistry); + if (detailsBuilder_ == null) { + ensureDetailsIsMutable(); + details_.add(m); + } else { + detailsBuilder_.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.gaming.v1beta.TargetState) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -930,7 +895,18 @@ public TargetState parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetState(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/UpdateGameServerClusterRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/UpdateGameServerClusterRequest.java index 3196022255a0..56a4f46000fb 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/UpdateGameServerClusterRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/UpdateGameServerClusterRequest.java @@ -51,76 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateGameServerClusterRequest( - 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.gaming.v1beta.GameServerCluster.Builder subBuilder = null; - if (gameServerCluster_ != null) { - subBuilder = gameServerCluster_.toBuilder(); - } - gameServerCluster_ = - input.readMessage( - com.google.cloud.gaming.v1beta.GameServerCluster.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(gameServerCluster_); - gameServerCluster_ = 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.gaming.v1beta.GameServerClusters .internal_static_google_cloud_gaming_v1beta_UpdateGameServerClusterRequest_descriptor; @@ -274,7 +204,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 @@ -289,7 +219,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; } @@ -313,7 +243,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; } @@ -332,7 +262,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; } @@ -462,17 +392,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.UpdateGameServerClusterRequest.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 @@ -585,7 +508,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.UpdateGameServerClusterR if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -600,19 +523,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.UpdateGameServerClusterRequest 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( + getGameServerClusterFieldBuilder().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.gaming.v1beta.UpdateGameServerClusterRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1091,7 +1039,18 @@ public UpdateGameServerClusterRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateGameServerClusterRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/UpdateGameServerDeploymentRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/UpdateGameServerDeploymentRequest.java index 9ac199e2fd07..80cf37012ed4 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/UpdateGameServerDeploymentRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/UpdateGameServerDeploymentRequest.java @@ -52,77 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateGameServerDeploymentRequest( - 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.gaming.v1beta.GameServerDeployment.Builder subBuilder = null; - if (gameServerDeployment_ != null) { - subBuilder = gameServerDeployment_.toBuilder(); - } - gameServerDeployment_ = - input.readMessage( - com.google.cloud.gaming.v1beta.GameServerDeployment.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(gameServerDeployment_); - gameServerDeployment_ = 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.gaming.v1beta.GameServerDeployments .internal_static_google_cloud_gaming_v1beta_UpdateGameServerDeploymentRequest_descriptor; @@ -277,7 +206,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 @@ -293,7 +222,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; } @@ -317,7 +246,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; } @@ -336,7 +265,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; } @@ -467,17 +396,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.UpdateGameServerDeploymentRequest.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 @@ -591,7 +513,7 @@ public Builder mergeFrom( if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -606,19 +528,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.UpdateGameServerDeploymentRequest 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( + getGameServerDeploymentFieldBuilder().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.gaming.v1beta.UpdateGameServerDeploymentRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1101,7 +1048,18 @@ public UpdateGameServerDeploymentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateGameServerDeploymentRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/UpdateGameServerDeploymentRolloutRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/UpdateGameServerDeploymentRolloutRequest.java index ba70bfd93573..38224c2e7a6e 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/UpdateGameServerDeploymentRolloutRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/UpdateGameServerDeploymentRolloutRequest.java @@ -53,77 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateGameServerDeploymentRolloutRequest( - 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.gaming.v1beta.GameServerDeploymentRollout.Builder subBuilder = null; - if (rollout_ != null) { - subBuilder = rollout_.toBuilder(); - } - rollout_ = - input.readMessage( - com.google.cloud.gaming.v1beta.GameServerDeploymentRollout.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(rollout_); - rollout_ = 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.gaming.v1beta.GameServerDeployments .internal_static_google_cloud_gaming_v1beta_UpdateGameServerDeploymentRolloutRequest_descriptor; @@ -277,7 +206,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 @@ -292,7 +221,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; } @@ -316,7 +245,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; } @@ -335,7 +264,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; } @@ -469,17 +398,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.gaming.v1beta.UpdateGameServerDeploymentRolloutRequest.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 +519,7 @@ public Builder mergeFrom( if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -612,19 +534,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.UpdateGameServerDeploymentRolloutRequest 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(getRolloutFieldBuilder().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.gaming.v1beta.UpdateGameServerDeploymentRolloutRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1105,7 +1051,18 @@ public UpdateGameServerDeploymentRolloutRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateGameServerDeploymentRolloutRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/UpdateRealmRequest.java b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/UpdateRealmRequest.java index 6f03f9523bee..df5ae8cc9d01 100644 --- a/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/UpdateRealmRequest.java +++ b/java-game-servers/proto-google-cloud-game-servers-v1beta/src/main/java/com/google/cloud/gaming/v1beta/UpdateRealmRequest.java @@ -50,76 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateRealmRequest( - 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.gaming.v1beta.Realm.Builder subBuilder = null; - if (realm_ != null) { - subBuilder = realm_.toBuilder(); - } - realm_ = - input.readMessage( - com.google.cloud.gaming.v1beta.Realm.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(realm_); - realm_ = 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.gaming.v1beta.Realms .internal_static_google_cloud_gaming_v1beta_UpdateRealmRequest_descriptor; @@ -268,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 @@ -283,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; } @@ -307,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; } @@ -326,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; } @@ -455,17 +385,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.gaming.v1beta.UpdateRealmRequest.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 @@ -576,7 +499,7 @@ public Builder mergeFrom(com.google.cloud.gaming.v1beta.UpdateRealmRequest other if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -591,18 +514,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.gaming.v1beta.UpdateRealmRequest 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(getRealmFieldBuilder().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.gaming.v1beta.UpdateRealmRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1065,7 +1013,18 @@ public UpdateRealmRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateRealmRequest(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(); } };