diff --git a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/GameServerClustersServiceClient.java b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/GameServerClustersServiceClient.java
index aafb7909fc2d..82cccd9da7f9 100644
--- a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/GameServerClustersServiceClient.java
+++ b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/GameServerClustersServiceClient.java
@@ -19,6 +19,7 @@
import com.google.api.core.ApiFuture;
import com.google.api.core.ApiFutures;
import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.httpjson.longrunning.OperationsClient;
import com.google.api.gax.longrunning.OperationFuture;
import com.google.api.gax.paging.AbstractFixedSizeCollection;
import com.google.api.gax.paging.AbstractPage;
@@ -30,7 +31,6 @@
import com.google.cloud.gaming.v1.stub.GameServerClustersServiceStubSettings;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.longrunning.Operation;
-import com.google.longrunning.OperationsClient;
import com.google.protobuf.Empty;
import com.google.protobuf.FieldMask;
import java.io.IOException;
@@ -108,13 +108,29 @@
* GameServerClustersServiceClient.create(gameServerClustersServiceSettings);
* }
*
+ * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * GameServerClustersServiceSettings gameServerClustersServiceSettings =
+ * GameServerClustersServiceSettings.newBuilder()
+ * .setTransportChannelProvider(
+ * GameServerClustersServiceSettings.defaultHttpJsonTransportProviderBuilder().build())
+ * .build();
+ * GameServerClustersServiceClient gameServerClustersServiceClient =
+ * GameServerClustersServiceClient.create(gameServerClustersServiceSettings);
+ * }
+ *
* Please refer to the GitHub repository's samples for more quickstart code snippets.
*/
@Generated("by gapic-generator-java")
public class GameServerClustersServiceClient implements BackgroundResource {
private final GameServerClustersServiceSettings settings;
private final GameServerClustersServiceStub stub;
- private final OperationsClient operationsClient;
+ private final OperationsClient httpJsonOperationsClient;
+ private final com.google.longrunning.OperationsClient operationsClient;
/** Constructs an instance of GameServerClustersServiceClient with default settings. */
public static final GameServerClustersServiceClient create() throws IOException {
@@ -148,13 +164,17 @@ protected GameServerClustersServiceClient(GameServerClustersServiceSettings sett
throws IOException {
this.settings = settings;
this.stub = ((GameServerClustersServiceStubSettings) settings.getStubSettings()).createStub();
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
}
protected GameServerClustersServiceClient(GameServerClustersServiceStub stub) {
this.settings = null;
this.stub = stub;
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
}
public final GameServerClustersServiceSettings getSettings() {
@@ -169,10 +189,18 @@ public GameServerClustersServiceStub getStub() {
* Returns the OperationsClient that can be used to query the status of a long-running operation
* returned by another API method call.
*/
- public final OperationsClient getOperationsClient() {
+ public final com.google.longrunning.OperationsClient getOperationsClient() {
return operationsClient;
}
+ /**
+ * Returns the OperationsClient that can be used to query the status of a long-running operation
+ * returned by another API method call.
+ */
+ public final OperationsClient getHttpJsonOperationsClient() {
+ return httpJsonOperationsClient;
+ }
+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists game server clusters in a given project and location.
diff --git a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/GameServerClustersServiceSettings.java b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/GameServerClustersServiceSettings.java
index 6a1cf12221c5..762843cdaf0f 100644
--- a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/GameServerClustersServiceSettings.java
+++ b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/GameServerClustersServiceSettings.java
@@ -23,6 +23,7 @@
import com.google.api.gax.core.GoogleCredentialsProvider;
import com.google.api.gax.core.InstantiatingExecutorProvider;
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
+import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider;
import com.google.api.gax.rpc.ApiClientHeaderProvider;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.ClientSettings;
@@ -184,11 +185,18 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde
return GameServerClustersServiceStubSettings.defaultCredentialsProviderBuilder();
}
- /** Returns a builder for the default ChannelProvider for this service. */
+ /** Returns a builder for the default gRPC ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return GameServerClustersServiceStubSettings.defaultGrpcTransportProviderBuilder();
}
+ /** Returns a builder for the default REST ChannelProvider for this service. */
+ @BetaApi
+ public static InstantiatingHttpJsonChannelProvider.Builder
+ defaultHttpJsonTransportProviderBuilder() {
+ return GameServerClustersServiceStubSettings.defaultHttpJsonTransportProviderBuilder();
+ }
+
public static TransportChannelProvider defaultTransportChannelProvider() {
return GameServerClustersServiceStubSettings.defaultTransportChannelProvider();
}
@@ -198,11 +206,17 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil
return GameServerClustersServiceStubSettings.defaultApiClientHeaderProviderBuilder();
}
- /** Returns a new builder for this class. */
+ /** Returns a new gRPC builder for this class. */
public static Builder newBuilder() {
return Builder.createDefault();
}
+ /** Returns a new REST builder for this class. */
+ @BetaApi
+ public static Builder newHttpJsonBuilder() {
+ return Builder.createHttpJsonDefault();
+ }
+
/** Returns a new builder for this class. */
public static Builder newBuilder(ClientContext clientContext) {
return new Builder(clientContext);
@@ -241,6 +255,11 @@ private static Builder createDefault() {
return new Builder(GameServerClustersServiceStubSettings.newBuilder());
}
+ @BetaApi
+ private static Builder createHttpJsonDefault() {
+ return new Builder(GameServerClustersServiceStubSettings.newHttpJsonBuilder());
+ }
+
public GameServerClustersServiceStubSettings.Builder getStubSettingsBuilder() {
return ((GameServerClustersServiceStubSettings.Builder) getStubSettings());
}
diff --git a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/GameServerConfigsServiceClient.java b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/GameServerConfigsServiceClient.java
index c949043c1e48..bb451fa885ab 100644
--- a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/GameServerConfigsServiceClient.java
+++ b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/GameServerConfigsServiceClient.java
@@ -19,6 +19,7 @@
import com.google.api.core.ApiFuture;
import com.google.api.core.ApiFutures;
import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.httpjson.longrunning.OperationsClient;
import com.google.api.gax.longrunning.OperationFuture;
import com.google.api.gax.paging.AbstractFixedSizeCollection;
import com.google.api.gax.paging.AbstractPage;
@@ -30,7 +31,6 @@
import com.google.cloud.gaming.v1.stub.GameServerConfigsServiceStubSettings;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.longrunning.Operation;
-import com.google.longrunning.OperationsClient;
import com.google.protobuf.Empty;
import java.io.IOException;
import java.util.List;
@@ -106,13 +106,29 @@
* GameServerConfigsServiceClient.create(gameServerConfigsServiceSettings);
* }
*
+ *
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * GameServerConfigsServiceSettings gameServerConfigsServiceSettings =
+ * GameServerConfigsServiceSettings.newBuilder()
+ * .setTransportChannelProvider(
+ * GameServerConfigsServiceSettings.defaultHttpJsonTransportProviderBuilder().build())
+ * .build();
+ * GameServerConfigsServiceClient gameServerConfigsServiceClient =
+ * GameServerConfigsServiceClient.create(gameServerConfigsServiceSettings);
+ * }
+ *
* Please refer to the GitHub repository's samples for more quickstart code snippets.
*/
@Generated("by gapic-generator-java")
public class GameServerConfigsServiceClient implements BackgroundResource {
private final GameServerConfigsServiceSettings settings;
private final GameServerConfigsServiceStub stub;
- private final OperationsClient operationsClient;
+ private final OperationsClient httpJsonOperationsClient;
+ private final com.google.longrunning.OperationsClient operationsClient;
/** Constructs an instance of GameServerConfigsServiceClient with default settings. */
public static final GameServerConfigsServiceClient create() throws IOException {
@@ -146,13 +162,17 @@ protected GameServerConfigsServiceClient(GameServerConfigsServiceSettings settin
throws IOException {
this.settings = settings;
this.stub = ((GameServerConfigsServiceStubSettings) settings.getStubSettings()).createStub();
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
}
protected GameServerConfigsServiceClient(GameServerConfigsServiceStub stub) {
this.settings = null;
this.stub = stub;
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
}
public final GameServerConfigsServiceSettings getSettings() {
@@ -167,10 +187,18 @@ public GameServerConfigsServiceStub getStub() {
* Returns the OperationsClient that can be used to query the status of a long-running operation
* returned by another API method call.
*/
- public final OperationsClient getOperationsClient() {
+ public final com.google.longrunning.OperationsClient getOperationsClient() {
return operationsClient;
}
+ /**
+ * Returns the OperationsClient that can be used to query the status of a long-running operation
+ * returned by another API method call.
+ */
+ public final OperationsClient getHttpJsonOperationsClient() {
+ return httpJsonOperationsClient;
+ }
+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists game server configs in a given project, location, and game server deployment.
diff --git a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/GameServerConfigsServiceSettings.java b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/GameServerConfigsServiceSettings.java
index 8a9225d0e920..d28d25984abf 100644
--- a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/GameServerConfigsServiceSettings.java
+++ b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/GameServerConfigsServiceSettings.java
@@ -23,6 +23,7 @@
import com.google.api.gax.core.GoogleCredentialsProvider;
import com.google.api.gax.core.InstantiatingExecutorProvider;
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
+import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider;
import com.google.api.gax.rpc.ApiClientHeaderProvider;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.ClientSettings;
@@ -145,11 +146,18 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde
return GameServerConfigsServiceStubSettings.defaultCredentialsProviderBuilder();
}
- /** Returns a builder for the default ChannelProvider for this service. */
+ /** Returns a builder for the default gRPC ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return GameServerConfigsServiceStubSettings.defaultGrpcTransportProviderBuilder();
}
+ /** Returns a builder for the default REST ChannelProvider for this service. */
+ @BetaApi
+ public static InstantiatingHttpJsonChannelProvider.Builder
+ defaultHttpJsonTransportProviderBuilder() {
+ return GameServerConfigsServiceStubSettings.defaultHttpJsonTransportProviderBuilder();
+ }
+
public static TransportChannelProvider defaultTransportChannelProvider() {
return GameServerConfigsServiceStubSettings.defaultTransportChannelProvider();
}
@@ -159,11 +167,17 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil
return GameServerConfigsServiceStubSettings.defaultApiClientHeaderProviderBuilder();
}
- /** Returns a new builder for this class. */
+ /** Returns a new gRPC builder for this class. */
public static Builder newBuilder() {
return Builder.createDefault();
}
+ /** Returns a new REST builder for this class. */
+ @BetaApi
+ public static Builder newHttpJsonBuilder() {
+ return Builder.createHttpJsonDefault();
+ }
+
/** Returns a new builder for this class. */
public static Builder newBuilder(ClientContext clientContext) {
return new Builder(clientContext);
@@ -202,6 +216,11 @@ private static Builder createDefault() {
return new Builder(GameServerConfigsServiceStubSettings.newBuilder());
}
+ @BetaApi
+ private static Builder createHttpJsonDefault() {
+ return new Builder(GameServerConfigsServiceStubSettings.newHttpJsonBuilder());
+ }
+
public GameServerConfigsServiceStubSettings.Builder getStubSettingsBuilder() {
return ((GameServerConfigsServiceStubSettings.Builder) getStubSettings());
}
diff --git a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/GameServerDeploymentsServiceClient.java b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/GameServerDeploymentsServiceClient.java
index a2a83b62edcf..7f79496e112d 100644
--- a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/GameServerDeploymentsServiceClient.java
+++ b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/GameServerDeploymentsServiceClient.java
@@ -19,6 +19,7 @@
import com.google.api.core.ApiFuture;
import com.google.api.core.ApiFutures;
import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.httpjson.longrunning.OperationsClient;
import com.google.api.gax.longrunning.OperationFuture;
import com.google.api.gax.paging.AbstractFixedSizeCollection;
import com.google.api.gax.paging.AbstractPage;
@@ -30,7 +31,6 @@
import com.google.cloud.gaming.v1.stub.GameServerDeploymentsServiceStubSettings;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.longrunning.Operation;
-import com.google.longrunning.OperationsClient;
import com.google.protobuf.Empty;
import com.google.protobuf.FieldMask;
import java.io.IOException;
@@ -109,13 +109,30 @@
* GameServerDeploymentsServiceClient.create(gameServerDeploymentsServiceSettings);
* }
*
+ *
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * GameServerDeploymentsServiceSettings gameServerDeploymentsServiceSettings =
+ * GameServerDeploymentsServiceSettings.newBuilder()
+ * .setTransportChannelProvider(
+ * GameServerDeploymentsServiceSettings.defaultHttpJsonTransportProviderBuilder()
+ * .build())
+ * .build();
+ * GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
+ * GameServerDeploymentsServiceClient.create(gameServerDeploymentsServiceSettings);
+ * }
+ *
* Please refer to the GitHub repository's samples for more quickstart code snippets.
*/
@Generated("by gapic-generator-java")
public class GameServerDeploymentsServiceClient implements BackgroundResource {
private final GameServerDeploymentsServiceSettings settings;
private final GameServerDeploymentsServiceStub stub;
- private final OperationsClient operationsClient;
+ private final OperationsClient httpJsonOperationsClient;
+ private final com.google.longrunning.OperationsClient operationsClient;
/** Constructs an instance of GameServerDeploymentsServiceClient with default settings. */
public static final GameServerDeploymentsServiceClient create() throws IOException {
@@ -151,13 +168,17 @@ protected GameServerDeploymentsServiceClient(GameServerDeploymentsServiceSetting
this.settings = settings;
this.stub =
((GameServerDeploymentsServiceStubSettings) settings.getStubSettings()).createStub();
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
}
protected GameServerDeploymentsServiceClient(GameServerDeploymentsServiceStub stub) {
this.settings = null;
this.stub = stub;
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
}
public final GameServerDeploymentsServiceSettings getSettings() {
@@ -172,10 +193,18 @@ public GameServerDeploymentsServiceStub getStub() {
* Returns the OperationsClient that can be used to query the status of a long-running operation
* returned by another API method call.
*/
- public final OperationsClient getOperationsClient() {
+ public final com.google.longrunning.OperationsClient getOperationsClient() {
return operationsClient;
}
+ /**
+ * Returns the OperationsClient that can be used to query the status of a long-running operation
+ * returned by another API method call.
+ */
+ public final OperationsClient getHttpJsonOperationsClient() {
+ return httpJsonOperationsClient;
+ }
+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists game server deployments in a given project and location.
diff --git a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/GameServerDeploymentsServiceSettings.java b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/GameServerDeploymentsServiceSettings.java
index 22bfb32c2771..aa9270e30c65 100644
--- a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/GameServerDeploymentsServiceSettings.java
+++ b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/GameServerDeploymentsServiceSettings.java
@@ -23,6 +23,7 @@
import com.google.api.gax.core.GoogleCredentialsProvider;
import com.google.api.gax.core.InstantiatingExecutorProvider;
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
+import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider;
import com.google.api.gax.rpc.ApiClientHeaderProvider;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.ClientSettings;
@@ -199,11 +200,18 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde
return GameServerDeploymentsServiceStubSettings.defaultCredentialsProviderBuilder();
}
- /** Returns a builder for the default ChannelProvider for this service. */
+ /** Returns a builder for the default gRPC ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return GameServerDeploymentsServiceStubSettings.defaultGrpcTransportProviderBuilder();
}
+ /** Returns a builder for the default REST ChannelProvider for this service. */
+ @BetaApi
+ public static InstantiatingHttpJsonChannelProvider.Builder
+ defaultHttpJsonTransportProviderBuilder() {
+ return GameServerDeploymentsServiceStubSettings.defaultHttpJsonTransportProviderBuilder();
+ }
+
public static TransportChannelProvider defaultTransportChannelProvider() {
return GameServerDeploymentsServiceStubSettings.defaultTransportChannelProvider();
}
@@ -213,11 +221,17 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil
return GameServerDeploymentsServiceStubSettings.defaultApiClientHeaderProviderBuilder();
}
- /** Returns a new builder for this class. */
+ /** Returns a new gRPC builder for this class. */
public static Builder newBuilder() {
return Builder.createDefault();
}
+ /** Returns a new REST builder for this class. */
+ @BetaApi
+ public static Builder newHttpJsonBuilder() {
+ return Builder.createHttpJsonDefault();
+ }
+
/** Returns a new builder for this class. */
public static Builder newBuilder(ClientContext clientContext) {
return new Builder(clientContext);
@@ -256,6 +270,11 @@ private static Builder createDefault() {
return new Builder(GameServerDeploymentsServiceStubSettings.newBuilder());
}
+ @BetaApi
+ private static Builder createHttpJsonDefault() {
+ return new Builder(GameServerDeploymentsServiceStubSettings.newHttpJsonBuilder());
+ }
+
public GameServerDeploymentsServiceStubSettings.Builder getStubSettingsBuilder() {
return ((GameServerDeploymentsServiceStubSettings.Builder) getStubSettings());
}
diff --git a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/RealmsServiceClient.java b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/RealmsServiceClient.java
index 4eee41606faa..ca6bd84b44b7 100644
--- a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/RealmsServiceClient.java
+++ b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/RealmsServiceClient.java
@@ -19,6 +19,7 @@
import com.google.api.core.ApiFuture;
import com.google.api.core.ApiFutures;
import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.httpjson.longrunning.OperationsClient;
import com.google.api.gax.longrunning.OperationFuture;
import com.google.api.gax.paging.AbstractFixedSizeCollection;
import com.google.api.gax.paging.AbstractPage;
@@ -30,7 +31,6 @@
import com.google.cloud.gaming.v1.stub.RealmsServiceStubSettings;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.longrunning.Operation;
-import com.google.longrunning.OperationsClient;
import com.google.protobuf.Empty;
import com.google.protobuf.FieldMask;
import java.io.IOException;
@@ -103,13 +103,28 @@
* RealmsServiceClient realmsServiceClient = RealmsServiceClient.create(realmsServiceSettings);
* }
*
+ *
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * RealmsServiceSettings realmsServiceSettings =
+ * RealmsServiceSettings.newBuilder()
+ * .setTransportChannelProvider(
+ * RealmsServiceSettings.defaultHttpJsonTransportProviderBuilder().build())
+ * .build();
+ * RealmsServiceClient realmsServiceClient = RealmsServiceClient.create(realmsServiceSettings);
+ * }
+ *
* Please refer to the GitHub repository's samples for more quickstart code snippets.
*/
@Generated("by gapic-generator-java")
public class RealmsServiceClient implements BackgroundResource {
private final RealmsServiceSettings settings;
private final RealmsServiceStub stub;
- private final OperationsClient operationsClient;
+ private final OperationsClient httpJsonOperationsClient;
+ private final com.google.longrunning.OperationsClient operationsClient;
/** Constructs an instance of RealmsServiceClient with default settings. */
public static final RealmsServiceClient create() throws IOException {
@@ -141,13 +156,17 @@ public static final RealmsServiceClient create(RealmsServiceStub stub) {
protected RealmsServiceClient(RealmsServiceSettings settings) throws IOException {
this.settings = settings;
this.stub = ((RealmsServiceStubSettings) settings.getStubSettings()).createStub();
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
}
protected RealmsServiceClient(RealmsServiceStub stub) {
this.settings = null;
this.stub = stub;
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
}
public final RealmsServiceSettings getSettings() {
@@ -162,10 +181,18 @@ public RealmsServiceStub getStub() {
* Returns the OperationsClient that can be used to query the status of a long-running operation
* returned by another API method call.
*/
- public final OperationsClient getOperationsClient() {
+ public final com.google.longrunning.OperationsClient getOperationsClient() {
return operationsClient;
}
+ /**
+ * Returns the OperationsClient that can be used to query the status of a long-running operation
+ * returned by another API method call.
+ */
+ public final OperationsClient getHttpJsonOperationsClient() {
+ return httpJsonOperationsClient;
+ }
+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists realms in a given project and location.
diff --git a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/RealmsServiceSettings.java b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/RealmsServiceSettings.java
index 635790a7838b..8f2642f04bc8 100644
--- a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/RealmsServiceSettings.java
+++ b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/RealmsServiceSettings.java
@@ -23,6 +23,7 @@
import com.google.api.gax.core.GoogleCredentialsProvider;
import com.google.api.gax.core.InstantiatingExecutorProvider;
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
+import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider;
import com.google.api.gax.rpc.ApiClientHeaderProvider;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.ClientSettings;
@@ -148,11 +149,18 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde
return RealmsServiceStubSettings.defaultCredentialsProviderBuilder();
}
- /** Returns a builder for the default ChannelProvider for this service. */
+ /** Returns a builder for the default gRPC ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return RealmsServiceStubSettings.defaultGrpcTransportProviderBuilder();
}
+ /** Returns a builder for the default REST ChannelProvider for this service. */
+ @BetaApi
+ public static InstantiatingHttpJsonChannelProvider.Builder
+ defaultHttpJsonTransportProviderBuilder() {
+ return RealmsServiceStubSettings.defaultHttpJsonTransportProviderBuilder();
+ }
+
public static TransportChannelProvider defaultTransportChannelProvider() {
return RealmsServiceStubSettings.defaultTransportChannelProvider();
}
@@ -162,11 +170,17 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil
return RealmsServiceStubSettings.defaultApiClientHeaderProviderBuilder();
}
- /** Returns a new builder for this class. */
+ /** Returns a new gRPC builder for this class. */
public static Builder newBuilder() {
return Builder.createDefault();
}
+ /** Returns a new REST builder for this class. */
+ @BetaApi
+ public static Builder newHttpJsonBuilder() {
+ return Builder.createHttpJsonDefault();
+ }
+
/** Returns a new builder for this class. */
public static Builder newBuilder(ClientContext clientContext) {
return new Builder(clientContext);
@@ -204,6 +218,11 @@ private static Builder createDefault() {
return new Builder(RealmsServiceStubSettings.newBuilder());
}
+ @BetaApi
+ private static Builder createHttpJsonDefault() {
+ return new Builder(RealmsServiceStubSettings.newHttpJsonBuilder());
+ }
+
public RealmsServiceStubSettings.Builder getStubSettingsBuilder() {
return ((RealmsServiceStubSettings.Builder) getStubSettings());
}
diff --git a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/GameServerClustersServiceStub.java b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/GameServerClustersServiceStub.java
index e0774f313464..7951508067c1 100644
--- a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/GameServerClustersServiceStub.java
+++ b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/GameServerClustersServiceStub.java
@@ -50,7 +50,11 @@
public abstract class GameServerClustersServiceStub implements BackgroundResource {
public OperationsStub getOperationsStub() {
- throw new UnsupportedOperationException("Not implemented: getOperationsStub()");
+ return null;
+ }
+
+ public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() {
+ return null;
}
public UnaryCallable
diff --git a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/GameServerClustersServiceStubSettings.java b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/GameServerClustersServiceStubSettings.java
index 67d753c3cc6a..830494e2d346 100644
--- a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/GameServerClustersServiceStubSettings.java
+++ b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/GameServerClustersServiceStubSettings.java
@@ -28,6 +28,9 @@
import com.google.api.gax.grpc.GrpcTransportChannel;
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
import com.google.api.gax.grpc.ProtoOperationTransformers;
+import com.google.api.gax.httpjson.GaxHttpJsonProperties;
+import com.google.api.gax.httpjson.HttpJsonTransportChannel;
+import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider;
import com.google.api.gax.longrunning.OperationSnapshot;
import com.google.api.gax.longrunning.OperationTimedPollAlgorithm;
import com.google.api.gax.retrying.RetrySettings;
@@ -290,6 +293,11 @@ public GameServerClustersServiceStub createStub() throws IOException {
.equals(GrpcTransportChannel.getGrpcTransportName())) {
return GrpcGameServerClustersServiceStub.create(this);
}
+ if (getTransportChannelProvider()
+ .getTransportName()
+ .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) {
+ return HttpJsonGameServerClustersServiceStub.create(this);
+ }
throw new UnsupportedOperationException(
String.format(
"Transport not supported: %s", getTransportChannelProvider().getTransportName()));
@@ -322,18 +330,25 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde
.setUseJwtAccessWithScope(true);
}
- /** Returns a builder for the default ChannelProvider for this service. */
+ /** Returns a builder for the default gRPC ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return InstantiatingGrpcChannelProvider.newBuilder()
.setMaxInboundMessageSize(Integer.MAX_VALUE);
}
+ /** Returns a builder for the default REST ChannelProvider for this service. */
+ @BetaApi
+ public static InstantiatingHttpJsonChannelProvider.Builder
+ defaultHttpJsonTransportProviderBuilder() {
+ return InstantiatingHttpJsonChannelProvider.newBuilder();
+ }
+
public static TransportChannelProvider defaultTransportChannelProvider() {
return defaultGrpcTransportProviderBuilder().build();
}
@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
- public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
+ public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() {
return ApiClientHeaderProvider.newBuilder()
.setGeneratedLibToken(
"gapic", GaxProperties.getLibraryVersion(GameServerClustersServiceStubSettings.class))
@@ -341,11 +356,30 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil
GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion());
}
- /** Returns a new builder for this class. */
+ @BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
+ public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() {
+ return ApiClientHeaderProvider.newBuilder()
+ .setGeneratedLibToken(
+ "gapic", GaxProperties.getLibraryVersion(GameServerClustersServiceStubSettings.class))
+ .setTransportToken(
+ GaxHttpJsonProperties.getHttpJsonTokenName(),
+ GaxHttpJsonProperties.getHttpJsonVersion());
+ }
+
+ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
+ return GameServerClustersServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder();
+ }
+
+ /** Returns a new gRPC builder for this class. */
public static Builder newBuilder() {
return Builder.createDefault();
}
+ /** Returns a new REST builder for this class. */
+ public static Builder newHttpJsonBuilder() {
+ return Builder.createHttpJsonDefault();
+ }
+
/** Returns a new builder for this class. */
public static Builder newBuilder(ClientContext clientContext) {
return new Builder(clientContext);
@@ -543,6 +577,19 @@ private static Builder createDefault() {
return initDefaults(builder);
}
+ private static Builder createHttpJsonDefault() {
+ Builder builder = new Builder(((ClientContext) null));
+
+ builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build());
+ builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
+ builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build());
+ builder.setEndpoint(getDefaultEndpoint());
+ builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
+ builder.setSwitchToMtlsEndpointAllowed(true);
+
+ return initDefaults(builder);
+ }
+
private static Builder initDefaults(Builder builder) {
builder
.listGameServerClustersSettings()
diff --git a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/GameServerConfigsServiceStub.java b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/GameServerConfigsServiceStub.java
index 4bc013035a3f..b7c979697a00 100644
--- a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/GameServerConfigsServiceStub.java
+++ b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/GameServerConfigsServiceStub.java
@@ -43,7 +43,11 @@
public abstract class GameServerConfigsServiceStub implements BackgroundResource {
public OperationsStub getOperationsStub() {
- throw new UnsupportedOperationException("Not implemented: getOperationsStub()");
+ return null;
+ }
+
+ public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() {
+ return null;
}
public UnaryCallable
diff --git a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/GameServerConfigsServiceStubSettings.java b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/GameServerConfigsServiceStubSettings.java
index 85ceea98869f..851916066e1d 100644
--- a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/GameServerConfigsServiceStubSettings.java
+++ b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/GameServerConfigsServiceStubSettings.java
@@ -28,6 +28,9 @@
import com.google.api.gax.grpc.GrpcTransportChannel;
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
import com.google.api.gax.grpc.ProtoOperationTransformers;
+import com.google.api.gax.httpjson.GaxHttpJsonProperties;
+import com.google.api.gax.httpjson.HttpJsonTransportChannel;
+import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider;
import com.google.api.gax.longrunning.OperationSnapshot;
import com.google.api.gax.longrunning.OperationTimedPollAlgorithm;
import com.google.api.gax.retrying.RetrySettings;
@@ -231,6 +234,11 @@ public GameServerConfigsServiceStub createStub() throws IOException {
.equals(GrpcTransportChannel.getGrpcTransportName())) {
return GrpcGameServerConfigsServiceStub.create(this);
}
+ if (getTransportChannelProvider()
+ .getTransportName()
+ .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) {
+ return HttpJsonGameServerConfigsServiceStub.create(this);
+ }
throw new UnsupportedOperationException(
String.format(
"Transport not supported: %s", getTransportChannelProvider().getTransportName()));
@@ -263,18 +271,25 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde
.setUseJwtAccessWithScope(true);
}
- /** Returns a builder for the default ChannelProvider for this service. */
+ /** Returns a builder for the default gRPC ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return InstantiatingGrpcChannelProvider.newBuilder()
.setMaxInboundMessageSize(Integer.MAX_VALUE);
}
+ /** Returns a builder for the default REST ChannelProvider for this service. */
+ @BetaApi
+ public static InstantiatingHttpJsonChannelProvider.Builder
+ defaultHttpJsonTransportProviderBuilder() {
+ return InstantiatingHttpJsonChannelProvider.newBuilder();
+ }
+
public static TransportChannelProvider defaultTransportChannelProvider() {
return defaultGrpcTransportProviderBuilder().build();
}
@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
- public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
+ public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() {
return ApiClientHeaderProvider.newBuilder()
.setGeneratedLibToken(
"gapic", GaxProperties.getLibraryVersion(GameServerConfigsServiceStubSettings.class))
@@ -282,11 +297,30 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil
GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion());
}
- /** Returns a new builder for this class. */
+ @BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
+ public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() {
+ return ApiClientHeaderProvider.newBuilder()
+ .setGeneratedLibToken(
+ "gapic", GaxProperties.getLibraryVersion(GameServerConfigsServiceStubSettings.class))
+ .setTransportToken(
+ GaxHttpJsonProperties.getHttpJsonTokenName(),
+ GaxHttpJsonProperties.getHttpJsonVersion());
+ }
+
+ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
+ return GameServerConfigsServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder();
+ }
+
+ /** Returns a new gRPC builder for this class. */
public static Builder newBuilder() {
return Builder.createDefault();
}
+ /** Returns a new REST builder for this class. */
+ public static Builder newHttpJsonBuilder() {
+ return Builder.createHttpJsonDefault();
+ }
+
/** Returns a new builder for this class. */
public static Builder newBuilder(ClientContext clientContext) {
return new Builder(clientContext);
@@ -429,6 +463,19 @@ private static Builder createDefault() {
return initDefaults(builder);
}
+ private static Builder createHttpJsonDefault() {
+ Builder builder = new Builder(((ClientContext) null));
+
+ builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build());
+ builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
+ builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build());
+ builder.setEndpoint(getDefaultEndpoint());
+ builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
+ builder.setSwitchToMtlsEndpointAllowed(true);
+
+ return initDefaults(builder);
+ }
+
private static Builder initDefaults(Builder builder) {
builder
.listGameServerConfigsSettings()
diff --git a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/GameServerDeploymentsServiceStub.java b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/GameServerDeploymentsServiceStub.java
index 486ea6f44179..e0904cf4fc7e 100644
--- a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/GameServerDeploymentsServiceStub.java
+++ b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/GameServerDeploymentsServiceStub.java
@@ -51,7 +51,11 @@
public abstract class GameServerDeploymentsServiceStub implements BackgroundResource {
public OperationsStub getOperationsStub() {
- throw new UnsupportedOperationException("Not implemented: getOperationsStub()");
+ return null;
+ }
+
+ public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() {
+ return null;
}
public UnaryCallable
diff --git a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/GameServerDeploymentsServiceStubSettings.java b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/GameServerDeploymentsServiceStubSettings.java
index fd512bbc029a..1d5461cc63f0 100644
--- a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/GameServerDeploymentsServiceStubSettings.java
+++ b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/GameServerDeploymentsServiceStubSettings.java
@@ -28,6 +28,9 @@
import com.google.api.gax.grpc.GrpcTransportChannel;
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
import com.google.api.gax.grpc.ProtoOperationTransformers;
+import com.google.api.gax.httpjson.GaxHttpJsonProperties;
+import com.google.api.gax.httpjson.HttpJsonTransportChannel;
+import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider;
import com.google.api.gax.longrunning.OperationSnapshot;
import com.google.api.gax.longrunning.OperationTimedPollAlgorithm;
import com.google.api.gax.retrying.RetrySettings;
@@ -313,6 +316,11 @@ public GameServerDeploymentsServiceStub createStub() throws IOException {
.equals(GrpcTransportChannel.getGrpcTransportName())) {
return GrpcGameServerDeploymentsServiceStub.create(this);
}
+ if (getTransportChannelProvider()
+ .getTransportName()
+ .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) {
+ return HttpJsonGameServerDeploymentsServiceStub.create(this);
+ }
throw new UnsupportedOperationException(
String.format(
"Transport not supported: %s", getTransportChannelProvider().getTransportName()));
@@ -345,18 +353,25 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde
.setUseJwtAccessWithScope(true);
}
- /** Returns a builder for the default ChannelProvider for this service. */
+ /** Returns a builder for the default gRPC ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return InstantiatingGrpcChannelProvider.newBuilder()
.setMaxInboundMessageSize(Integer.MAX_VALUE);
}
+ /** Returns a builder for the default REST ChannelProvider for this service. */
+ @BetaApi
+ public static InstantiatingHttpJsonChannelProvider.Builder
+ defaultHttpJsonTransportProviderBuilder() {
+ return InstantiatingHttpJsonChannelProvider.newBuilder();
+ }
+
public static TransportChannelProvider defaultTransportChannelProvider() {
return defaultGrpcTransportProviderBuilder().build();
}
@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
- public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
+ public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() {
return ApiClientHeaderProvider.newBuilder()
.setGeneratedLibToken(
"gapic",
@@ -365,11 +380,31 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil
GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion());
}
- /** Returns a new builder for this class. */
+ @BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
+ public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() {
+ return ApiClientHeaderProvider.newBuilder()
+ .setGeneratedLibToken(
+ "gapic",
+ GaxProperties.getLibraryVersion(GameServerDeploymentsServiceStubSettings.class))
+ .setTransportToken(
+ GaxHttpJsonProperties.getHttpJsonTokenName(),
+ GaxHttpJsonProperties.getHttpJsonVersion());
+ }
+
+ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
+ return GameServerDeploymentsServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder();
+ }
+
+ /** Returns a new gRPC builder for this class. */
public static Builder newBuilder() {
return Builder.createDefault();
}
+ /** Returns a new REST builder for this class. */
+ public static Builder newHttpJsonBuilder() {
+ return Builder.createHttpJsonDefault();
+ }
+
/** Returns a new builder for this class. */
public static Builder newBuilder(ClientContext clientContext) {
return new Builder(clientContext);
@@ -575,6 +610,19 @@ private static Builder createDefault() {
return initDefaults(builder);
}
+ private static Builder createHttpJsonDefault() {
+ Builder builder = new Builder(((ClientContext) null));
+
+ builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build());
+ builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
+ builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build());
+ builder.setEndpoint(getDefaultEndpoint());
+ builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
+ builder.setSwitchToMtlsEndpointAllowed(true);
+
+ return initDefaults(builder);
+ }
+
private static Builder initDefaults(Builder builder) {
builder
.listGameServerDeploymentsSettings()
diff --git a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/HttpJsonGameServerClustersServiceCallableFactory.java b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/HttpJsonGameServerClustersServiceCallableFactory.java
new file mode 100644
index 000000000000..2d57c3c99414
--- /dev/null
+++ b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/HttpJsonGameServerClustersServiceCallableFactory.java
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.gaming.v1.stub;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.httpjson.HttpJsonCallSettings;
+import com.google.api.gax.httpjson.HttpJsonCallableFactory;
+import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable;
+import com.google.api.gax.httpjson.HttpJsonStubCallableFactory;
+import com.google.api.gax.httpjson.longrunning.stub.OperationsStub;
+import com.google.api.gax.rpc.BatchingCallSettings;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.OperationCallSettings;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.PagedCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallable;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.longrunning.Operation;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * REST callable factory implementation for the GameServerClustersService service API.
+ *
+ * This class is for advanced usage.
+ */
+@Generated("by gapic-generator-java")
+@BetaApi
+public class HttpJsonGameServerClustersServiceCallableFactory
+ implements HttpJsonStubCallableFactory {
+
+ @Override
+ public UnaryCallable createUnaryCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ UnaryCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createUnaryCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ UnaryCallable createPagedCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ PagedCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createPagedCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public UnaryCallable createBatchingCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ BatchingCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createBatchingCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ @Override
+ public
+ OperationCallable createOperationCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ OperationCallSettings callSettings,
+ ClientContext clientContext,
+ OperationsStub operationsStub) {
+ UnaryCallable innerCallable =
+ HttpJsonCallableFactory.createBaseUnaryCallable(
+ httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext);
+ HttpJsonOperationSnapshotCallable initialCallable =
+ new HttpJsonOperationSnapshotCallable(
+ innerCallable,
+ httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory());
+ return HttpJsonCallableFactory.createOperationCallable(
+ callSettings, clientContext, operationsStub.longRunningClient(), initialCallable);
+ }
+
+ @Override
+ public
+ ServerStreamingCallable createServerStreamingCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ ServerStreamingCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createServerStreamingCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+}
diff --git a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/HttpJsonGameServerClustersServiceStub.java b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/HttpJsonGameServerClustersServiceStub.java
new file mode 100644
index 000000000000..d1ae48f5c365
--- /dev/null
+++ b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/HttpJsonGameServerClustersServiceStub.java
@@ -0,0 +1,742 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.gaming.v1.stub;
+
+import static com.google.cloud.gaming.v1.GameServerClustersServiceClient.ListGameServerClustersPagedResponse;
+
+import com.google.api.core.BetaApi;
+import com.google.api.core.InternalApi;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.core.BackgroundResourceAggregation;
+import com.google.api.gax.httpjson.ApiMethodDescriptor;
+import com.google.api.gax.httpjson.HttpJsonCallSettings;
+import com.google.api.gax.httpjson.HttpJsonOperationSnapshot;
+import com.google.api.gax.httpjson.HttpJsonStubCallableFactory;
+import com.google.api.gax.httpjson.ProtoMessageRequestFormatter;
+import com.google.api.gax.httpjson.ProtoMessageResponseParser;
+import com.google.api.gax.httpjson.ProtoRestSerializer;
+import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.gaming.v1.CreateGameServerClusterRequest;
+import com.google.cloud.gaming.v1.DeleteGameServerClusterRequest;
+import com.google.cloud.gaming.v1.GameServerCluster;
+import com.google.cloud.gaming.v1.GetGameServerClusterRequest;
+import com.google.cloud.gaming.v1.ListGameServerClustersRequest;
+import com.google.cloud.gaming.v1.ListGameServerClustersResponse;
+import com.google.cloud.gaming.v1.OperationMetadata;
+import com.google.cloud.gaming.v1.PreviewCreateGameServerClusterRequest;
+import com.google.cloud.gaming.v1.PreviewCreateGameServerClusterResponse;
+import com.google.cloud.gaming.v1.PreviewDeleteGameServerClusterRequest;
+import com.google.cloud.gaming.v1.PreviewDeleteGameServerClusterResponse;
+import com.google.cloud.gaming.v1.PreviewUpdateGameServerClusterRequest;
+import com.google.cloud.gaming.v1.PreviewUpdateGameServerClusterResponse;
+import com.google.cloud.gaming.v1.UpdateGameServerClusterRequest;
+import com.google.longrunning.Operation;
+import com.google.protobuf.Empty;
+import com.google.protobuf.TypeRegistry;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * REST stub implementation for the GameServerClustersService service API.
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+@BetaApi
+public class HttpJsonGameServerClustersServiceStub extends GameServerClustersServiceStub {
+ private static final TypeRegistry typeRegistry =
+ TypeRegistry.newBuilder()
+ .add(GameServerCluster.getDescriptor())
+ .add(OperationMetadata.getDescriptor())
+ .add(Empty.getDescriptor())
+ .build();
+
+ private static final ApiMethodDescriptor<
+ ListGameServerClustersRequest, ListGameServerClustersResponse>
+ listGameServerClustersMethodDescriptor =
+ ApiMethodDescriptor
+ .newBuilder()
+ .setFullMethodName(
+ "google.cloud.gaming.v1.GameServerClustersService/ListGameServerClusters")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{parent=projects/*/locations/*/realms/*}/gameServerClusters",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "parent", request.getParent());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "filter", request.getFilter());
+ serializer.putQueryParam(fields, "orderBy", request.getOrderBy());
+ serializer.putQueryParam(fields, "pageSize", request.getPageSize());
+ serializer.putQueryParam(fields, "pageToken", request.getPageToken());
+ serializer.putQueryParam(fields, "view", request.getView());
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(ListGameServerClustersResponse.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ getGameServerClusterMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName(
+ "google.cloud.gaming.v1.GameServerClustersService/GetGameServerCluster")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/realms/*/gameServerClusters/*}",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "name", request.getName());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "view", request.getView());
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(GameServerCluster.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ createGameServerClusterMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName(
+ "google.cloud.gaming.v1.GameServerClustersService/CreateGameServerCluster")
+ .setHttpMethod("POST")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{parent=projects/*/locations/*/realms/*}/gameServerClusters",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "parent", request.getParent());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(
+ fields, "gameServerClusterId", request.getGameServerClusterId());
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody("gameServerCluster", request.getGameServerCluster()))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Operation.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .setOperationSnapshotFactory(
+ (CreateGameServerClusterRequest request, Operation response) ->
+ HttpJsonOperationSnapshot.create(response))
+ .build();
+
+ private static final ApiMethodDescriptor<
+ PreviewCreateGameServerClusterRequest, PreviewCreateGameServerClusterResponse>
+ previewCreateGameServerClusterMethodDescriptor =
+ ApiMethodDescriptor
+ .
+ newBuilder()
+ .setFullMethodName(
+ "google.cloud.gaming.v1.GameServerClustersService/PreviewCreateGameServerCluster")
+ .setHttpMethod("POST")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{parent=projects/*/locations/*/realms/*}/gameServerClusters:previewCreate",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "parent", request.getParent());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(
+ fields, "gameServerClusterId", request.getGameServerClusterId());
+ serializer.putQueryParam(
+ fields, "previewTime", request.getPreviewTime());
+ serializer.putQueryParam(fields, "view", request.getView());
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody("gameServerCluster", request.getGameServerCluster()))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(
+ PreviewCreateGameServerClusterResponse.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ deleteGameServerClusterMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName(
+ "google.cloud.gaming.v1.GameServerClustersService/DeleteGameServerCluster")
+ .setHttpMethod("DELETE")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/realms/*/gameServerClusters/*}",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "name", request.getName());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Operation.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .setOperationSnapshotFactory(
+ (DeleteGameServerClusterRequest request, Operation response) ->
+ HttpJsonOperationSnapshot.create(response))
+ .build();
+
+ private static final ApiMethodDescriptor<
+ PreviewDeleteGameServerClusterRequest, PreviewDeleteGameServerClusterResponse>
+ previewDeleteGameServerClusterMethodDescriptor =
+ ApiMethodDescriptor
+ .
+ newBuilder()
+ .setFullMethodName(
+ "google.cloud.gaming.v1.GameServerClustersService/PreviewDeleteGameServerCluster")
+ .setHttpMethod("DELETE")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/realms/*/gameServerClusters/*}:previewDelete",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "name", request.getName());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(
+ fields, "previewTime", request.getPreviewTime());
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(
+ PreviewDeleteGameServerClusterResponse.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ updateGameServerClusterMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName(
+ "google.cloud.gaming.v1.GameServerClustersService/UpdateGameServerCluster")
+ .setHttpMethod("PATCH")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{gameServerCluster.name=projects/*/locations/*/realms/*/gameServerClusters/*}",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(
+ fields,
+ "gameServerCluster.name",
+ request.getGameServerCluster().getName());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "updateMask", request.getUpdateMask());
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody("gameServerCluster", request.getGameServerCluster()))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Operation.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .setOperationSnapshotFactory(
+ (UpdateGameServerClusterRequest request, Operation response) ->
+ HttpJsonOperationSnapshot.create(response))
+ .build();
+
+ private static final ApiMethodDescriptor<
+ PreviewUpdateGameServerClusterRequest, PreviewUpdateGameServerClusterResponse>
+ previewUpdateGameServerClusterMethodDescriptor =
+ ApiMethodDescriptor
+ .
+ newBuilder()
+ .setFullMethodName(
+ "google.cloud.gaming.v1.GameServerClustersService/PreviewUpdateGameServerCluster")
+ .setHttpMethod("PATCH")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{gameServerCluster.name=projects/*/locations/*/realms/*/gameServerClusters/*}:previewUpdate",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(
+ fields,
+ "gameServerCluster.name",
+ request.getGameServerCluster().getName());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(
+ fields, "previewTime", request.getPreviewTime());
+ serializer.putQueryParam(fields, "updateMask", request.getUpdateMask());
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody("gameServerCluster", request.getGameServerCluster()))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(
+ PreviewUpdateGameServerClusterResponse.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private final UnaryCallable
+ listGameServerClustersCallable;
+ private final UnaryCallable
+ listGameServerClustersPagedCallable;
+ private final UnaryCallable
+ getGameServerClusterCallable;
+ private final UnaryCallable
+ createGameServerClusterCallable;
+ private final OperationCallable<
+ CreateGameServerClusterRequest, GameServerCluster, OperationMetadata>
+ createGameServerClusterOperationCallable;
+ private final UnaryCallable<
+ PreviewCreateGameServerClusterRequest, PreviewCreateGameServerClusterResponse>
+ previewCreateGameServerClusterCallable;
+ private final UnaryCallable
+ deleteGameServerClusterCallable;
+ private final OperationCallable
+ deleteGameServerClusterOperationCallable;
+ private final UnaryCallable<
+ PreviewDeleteGameServerClusterRequest, PreviewDeleteGameServerClusterResponse>
+ previewDeleteGameServerClusterCallable;
+ private final UnaryCallable
+ updateGameServerClusterCallable;
+ private final OperationCallable<
+ UpdateGameServerClusterRequest, GameServerCluster, OperationMetadata>
+ updateGameServerClusterOperationCallable;
+ private final UnaryCallable<
+ PreviewUpdateGameServerClusterRequest, PreviewUpdateGameServerClusterResponse>
+ previewUpdateGameServerClusterCallable;
+
+ private final BackgroundResource backgroundResources;
+ private final HttpJsonOperationsStub httpJsonOperationsStub;
+ private final HttpJsonStubCallableFactory callableFactory;
+
+ public static final HttpJsonGameServerClustersServiceStub create(
+ GameServerClustersServiceStubSettings settings) throws IOException {
+ return new HttpJsonGameServerClustersServiceStub(settings, ClientContext.create(settings));
+ }
+
+ public static final HttpJsonGameServerClustersServiceStub create(ClientContext clientContext)
+ throws IOException {
+ return new HttpJsonGameServerClustersServiceStub(
+ GameServerClustersServiceStubSettings.newHttpJsonBuilder().build(), clientContext);
+ }
+
+ public static final HttpJsonGameServerClustersServiceStub create(
+ ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException {
+ return new HttpJsonGameServerClustersServiceStub(
+ GameServerClustersServiceStubSettings.newHttpJsonBuilder().build(),
+ clientContext,
+ callableFactory);
+ }
+
+ /**
+ * Constructs an instance of HttpJsonGameServerClustersServiceStub, using the given settings. This
+ * is protected so that it is easy to make a subclass, but otherwise, the static factory methods
+ * should be preferred.
+ */
+ protected HttpJsonGameServerClustersServiceStub(
+ GameServerClustersServiceStubSettings settings, ClientContext clientContext)
+ throws IOException {
+ this(settings, clientContext, new HttpJsonGameServerClustersServiceCallableFactory());
+ }
+
+ /**
+ * Constructs an instance of HttpJsonGameServerClustersServiceStub, using the given settings. This
+ * is protected so that it is easy to make a subclass, but otherwise, the static factory methods
+ * should be preferred.
+ */
+ protected HttpJsonGameServerClustersServiceStub(
+ GameServerClustersServiceStubSettings settings,
+ ClientContext clientContext,
+ HttpJsonStubCallableFactory callableFactory)
+ throws IOException {
+ this.callableFactory = callableFactory;
+ this.httpJsonOperationsStub =
+ HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry);
+
+ HttpJsonCallSettings
+ listGameServerClustersTransportSettings =
+ HttpJsonCallSettings
+ .newBuilder()
+ .setMethodDescriptor(listGameServerClustersMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .build();
+ HttpJsonCallSettings
+ getGameServerClusterTransportSettings =
+ HttpJsonCallSettings.newBuilder()
+ .setMethodDescriptor(getGameServerClusterMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .build();
+ HttpJsonCallSettings
+ createGameServerClusterTransportSettings =
+ HttpJsonCallSettings.newBuilder()
+ .setMethodDescriptor(createGameServerClusterMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .build();
+ HttpJsonCallSettings<
+ PreviewCreateGameServerClusterRequest, PreviewCreateGameServerClusterResponse>
+ previewCreateGameServerClusterTransportSettings =
+ HttpJsonCallSettings
+ .
+ newBuilder()
+ .setMethodDescriptor(previewCreateGameServerClusterMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .build();
+ HttpJsonCallSettings
+ deleteGameServerClusterTransportSettings =
+ HttpJsonCallSettings.newBuilder()
+ .setMethodDescriptor(deleteGameServerClusterMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .build();
+ HttpJsonCallSettings<
+ PreviewDeleteGameServerClusterRequest, PreviewDeleteGameServerClusterResponse>
+ previewDeleteGameServerClusterTransportSettings =
+ HttpJsonCallSettings
+ .
+ newBuilder()
+ .setMethodDescriptor(previewDeleteGameServerClusterMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .build();
+ HttpJsonCallSettings
+ updateGameServerClusterTransportSettings =
+ HttpJsonCallSettings.newBuilder()
+ .setMethodDescriptor(updateGameServerClusterMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .build();
+ HttpJsonCallSettings<
+ PreviewUpdateGameServerClusterRequest, PreviewUpdateGameServerClusterResponse>
+ previewUpdateGameServerClusterTransportSettings =
+ HttpJsonCallSettings
+ .
+ newBuilder()
+ .setMethodDescriptor(previewUpdateGameServerClusterMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .build();
+
+ this.listGameServerClustersCallable =
+ callableFactory.createUnaryCallable(
+ listGameServerClustersTransportSettings,
+ settings.listGameServerClustersSettings(),
+ clientContext);
+ this.listGameServerClustersPagedCallable =
+ callableFactory.createPagedCallable(
+ listGameServerClustersTransportSettings,
+ settings.listGameServerClustersSettings(),
+ clientContext);
+ this.getGameServerClusterCallable =
+ callableFactory.createUnaryCallable(
+ getGameServerClusterTransportSettings,
+ settings.getGameServerClusterSettings(),
+ clientContext);
+ this.createGameServerClusterCallable =
+ callableFactory.createUnaryCallable(
+ createGameServerClusterTransportSettings,
+ settings.createGameServerClusterSettings(),
+ clientContext);
+ this.createGameServerClusterOperationCallable =
+ callableFactory.createOperationCallable(
+ createGameServerClusterTransportSettings,
+ settings.createGameServerClusterOperationSettings(),
+ clientContext,
+ httpJsonOperationsStub);
+ this.previewCreateGameServerClusterCallable =
+ callableFactory.createUnaryCallable(
+ previewCreateGameServerClusterTransportSettings,
+ settings.previewCreateGameServerClusterSettings(),
+ clientContext);
+ this.deleteGameServerClusterCallable =
+ callableFactory.createUnaryCallable(
+ deleteGameServerClusterTransportSettings,
+ settings.deleteGameServerClusterSettings(),
+ clientContext);
+ this.deleteGameServerClusterOperationCallable =
+ callableFactory.createOperationCallable(
+ deleteGameServerClusterTransportSettings,
+ settings.deleteGameServerClusterOperationSettings(),
+ clientContext,
+ httpJsonOperationsStub);
+ this.previewDeleteGameServerClusterCallable =
+ callableFactory.createUnaryCallable(
+ previewDeleteGameServerClusterTransportSettings,
+ settings.previewDeleteGameServerClusterSettings(),
+ clientContext);
+ this.updateGameServerClusterCallable =
+ callableFactory.createUnaryCallable(
+ updateGameServerClusterTransportSettings,
+ settings.updateGameServerClusterSettings(),
+ clientContext);
+ this.updateGameServerClusterOperationCallable =
+ callableFactory.createOperationCallable(
+ updateGameServerClusterTransportSettings,
+ settings.updateGameServerClusterOperationSettings(),
+ clientContext,
+ httpJsonOperationsStub);
+ this.previewUpdateGameServerClusterCallable =
+ callableFactory.createUnaryCallable(
+ previewUpdateGameServerClusterTransportSettings,
+ settings.previewUpdateGameServerClusterSettings(),
+ clientContext);
+
+ this.backgroundResources =
+ new BackgroundResourceAggregation(clientContext.getBackgroundResources());
+ }
+
+ @InternalApi
+ public static List getMethodDescriptors() {
+ List methodDescriptors = new ArrayList<>();
+ methodDescriptors.add(listGameServerClustersMethodDescriptor);
+ methodDescriptors.add(getGameServerClusterMethodDescriptor);
+ methodDescriptors.add(createGameServerClusterMethodDescriptor);
+ methodDescriptors.add(previewCreateGameServerClusterMethodDescriptor);
+ methodDescriptors.add(deleteGameServerClusterMethodDescriptor);
+ methodDescriptors.add(previewDeleteGameServerClusterMethodDescriptor);
+ methodDescriptors.add(updateGameServerClusterMethodDescriptor);
+ methodDescriptors.add(previewUpdateGameServerClusterMethodDescriptor);
+ return methodDescriptors;
+ }
+
+ public HttpJsonOperationsStub getHttpJsonOperationsStub() {
+ return httpJsonOperationsStub;
+ }
+
+ @Override
+ public UnaryCallable
+ listGameServerClustersCallable() {
+ return listGameServerClustersCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ listGameServerClustersPagedCallable() {
+ return listGameServerClustersPagedCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ getGameServerClusterCallable() {
+ return getGameServerClusterCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ createGameServerClusterCallable() {
+ return createGameServerClusterCallable;
+ }
+
+ @Override
+ public OperationCallable
+ createGameServerClusterOperationCallable() {
+ return createGameServerClusterOperationCallable;
+ }
+
+ @Override
+ public UnaryCallable<
+ PreviewCreateGameServerClusterRequest, PreviewCreateGameServerClusterResponse>
+ previewCreateGameServerClusterCallable() {
+ return previewCreateGameServerClusterCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ deleteGameServerClusterCallable() {
+ return deleteGameServerClusterCallable;
+ }
+
+ @Override
+ public OperationCallable
+ deleteGameServerClusterOperationCallable() {
+ return deleteGameServerClusterOperationCallable;
+ }
+
+ @Override
+ public UnaryCallable<
+ PreviewDeleteGameServerClusterRequest, PreviewDeleteGameServerClusterResponse>
+ previewDeleteGameServerClusterCallable() {
+ return previewDeleteGameServerClusterCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ updateGameServerClusterCallable() {
+ return updateGameServerClusterCallable;
+ }
+
+ @Override
+ public OperationCallable
+ updateGameServerClusterOperationCallable() {
+ return updateGameServerClusterOperationCallable;
+ }
+
+ @Override
+ public UnaryCallable<
+ PreviewUpdateGameServerClusterRequest, PreviewUpdateGameServerClusterResponse>
+ previewUpdateGameServerClusterCallable() {
+ return previewUpdateGameServerClusterCallable;
+ }
+
+ @Override
+ public final void close() {
+ try {
+ backgroundResources.close();
+ } catch (RuntimeException e) {
+ throw e;
+ } catch (Exception e) {
+ throw new IllegalStateException("Failed to close resource", e);
+ }
+ }
+
+ @Override
+ public void shutdown() {
+ backgroundResources.shutdown();
+ }
+
+ @Override
+ public boolean isShutdown() {
+ return backgroundResources.isShutdown();
+ }
+
+ @Override
+ public boolean isTerminated() {
+ return backgroundResources.isTerminated();
+ }
+
+ @Override
+ public void shutdownNow() {
+ backgroundResources.shutdownNow();
+ }
+
+ @Override
+ public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
+ return backgroundResources.awaitTermination(duration, unit);
+ }
+}
diff --git a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/HttpJsonGameServerConfigsServiceCallableFactory.java b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/HttpJsonGameServerConfigsServiceCallableFactory.java
new file mode 100644
index 000000000000..ca8d6c000ffd
--- /dev/null
+++ b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/HttpJsonGameServerConfigsServiceCallableFactory.java
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.gaming.v1.stub;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.httpjson.HttpJsonCallSettings;
+import com.google.api.gax.httpjson.HttpJsonCallableFactory;
+import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable;
+import com.google.api.gax.httpjson.HttpJsonStubCallableFactory;
+import com.google.api.gax.httpjson.longrunning.stub.OperationsStub;
+import com.google.api.gax.rpc.BatchingCallSettings;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.OperationCallSettings;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.PagedCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallable;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.longrunning.Operation;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * REST callable factory implementation for the GameServerConfigsService service API.
+ *
+ * This class is for advanced usage.
+ */
+@Generated("by gapic-generator-java")
+@BetaApi
+public class HttpJsonGameServerConfigsServiceCallableFactory
+ implements HttpJsonStubCallableFactory {
+
+ @Override
+ public UnaryCallable createUnaryCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ UnaryCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createUnaryCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ UnaryCallable createPagedCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ PagedCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createPagedCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public UnaryCallable createBatchingCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ BatchingCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createBatchingCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ @Override
+ public
+ OperationCallable createOperationCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ OperationCallSettings callSettings,
+ ClientContext clientContext,
+ OperationsStub operationsStub) {
+ UnaryCallable innerCallable =
+ HttpJsonCallableFactory.createBaseUnaryCallable(
+ httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext);
+ HttpJsonOperationSnapshotCallable initialCallable =
+ new HttpJsonOperationSnapshotCallable(
+ innerCallable,
+ httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory());
+ return HttpJsonCallableFactory.createOperationCallable(
+ callSettings, clientContext, operationsStub.longRunningClient(), initialCallable);
+ }
+
+ @Override
+ public
+ ServerStreamingCallable createServerStreamingCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ ServerStreamingCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createServerStreamingCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+}
diff --git a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/HttpJsonGameServerConfigsServiceStub.java b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/HttpJsonGameServerConfigsServiceStub.java
new file mode 100644
index 000000000000..ab2cdccbf167
--- /dev/null
+++ b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/HttpJsonGameServerConfigsServiceStub.java
@@ -0,0 +1,442 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.gaming.v1.stub;
+
+import static com.google.cloud.gaming.v1.GameServerConfigsServiceClient.ListGameServerConfigsPagedResponse;
+
+import com.google.api.core.BetaApi;
+import com.google.api.core.InternalApi;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.core.BackgroundResourceAggregation;
+import com.google.api.gax.httpjson.ApiMethodDescriptor;
+import com.google.api.gax.httpjson.HttpJsonCallSettings;
+import com.google.api.gax.httpjson.HttpJsonOperationSnapshot;
+import com.google.api.gax.httpjson.HttpJsonStubCallableFactory;
+import com.google.api.gax.httpjson.ProtoMessageRequestFormatter;
+import com.google.api.gax.httpjson.ProtoMessageResponseParser;
+import com.google.api.gax.httpjson.ProtoRestSerializer;
+import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.gaming.v1.CreateGameServerConfigRequest;
+import com.google.cloud.gaming.v1.DeleteGameServerConfigRequest;
+import com.google.cloud.gaming.v1.GameServerConfig;
+import com.google.cloud.gaming.v1.GetGameServerConfigRequest;
+import com.google.cloud.gaming.v1.ListGameServerConfigsRequest;
+import com.google.cloud.gaming.v1.ListGameServerConfigsResponse;
+import com.google.cloud.gaming.v1.OperationMetadata;
+import com.google.longrunning.Operation;
+import com.google.protobuf.Empty;
+import com.google.protobuf.TypeRegistry;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * REST stub implementation for the GameServerConfigsService service API.
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+@BetaApi
+public class HttpJsonGameServerConfigsServiceStub extends GameServerConfigsServiceStub {
+ private static final TypeRegistry typeRegistry =
+ TypeRegistry.newBuilder()
+ .add(GameServerConfig.getDescriptor())
+ .add(OperationMetadata.getDescriptor())
+ .add(Empty.getDescriptor())
+ .build();
+
+ private static final ApiMethodDescriptor<
+ ListGameServerConfigsRequest, ListGameServerConfigsResponse>
+ listGameServerConfigsMethodDescriptor =
+ ApiMethodDescriptor
+ .newBuilder()
+ .setFullMethodName(
+ "google.cloud.gaming.v1.GameServerConfigsService/ListGameServerConfigs")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{parent=projects/*/locations/*/gameServerDeployments/*}/configs",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "parent", request.getParent());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "filter", request.getFilter());
+ serializer.putQueryParam(fields, "orderBy", request.getOrderBy());
+ serializer.putQueryParam(fields, "pageSize", request.getPageSize());
+ serializer.putQueryParam(fields, "pageToken", request.getPageToken());
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(ListGameServerConfigsResponse.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ getGameServerConfigMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName(
+ "google.cloud.gaming.v1.GameServerConfigsService/GetGameServerConfig")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/gameServerDeployments/*/configs/*}",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "name", request.getName());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(GameServerConfig.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ createGameServerConfigMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName(
+ "google.cloud.gaming.v1.GameServerConfigsService/CreateGameServerConfig")
+ .setHttpMethod("POST")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{parent=projects/*/locations/*/gameServerDeployments/*}/configs",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "parent", request.getParent());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "configId", request.getConfigId());
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody("gameServerConfig", request.getGameServerConfig()))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Operation.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .setOperationSnapshotFactory(
+ (CreateGameServerConfigRequest request, Operation response) ->
+ HttpJsonOperationSnapshot.create(response))
+ .build();
+
+ private static final ApiMethodDescriptor
+ deleteGameServerConfigMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName(
+ "google.cloud.gaming.v1.GameServerConfigsService/DeleteGameServerConfig")
+ .setHttpMethod("DELETE")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/gameServerDeployments/*/configs/*}",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "name", request.getName());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Operation.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .setOperationSnapshotFactory(
+ (DeleteGameServerConfigRequest request, Operation response) ->
+ HttpJsonOperationSnapshot.create(response))
+ .build();
+
+ private final UnaryCallable
+ listGameServerConfigsCallable;
+ private final UnaryCallable
+ listGameServerConfigsPagedCallable;
+ private final UnaryCallable
+ getGameServerConfigCallable;
+ private final UnaryCallable
+ createGameServerConfigCallable;
+ private final OperationCallable<
+ CreateGameServerConfigRequest, GameServerConfig, OperationMetadata>
+ createGameServerConfigOperationCallable;
+ private final UnaryCallable
+ deleteGameServerConfigCallable;
+ private final OperationCallable
+ deleteGameServerConfigOperationCallable;
+
+ private final BackgroundResource backgroundResources;
+ private final HttpJsonOperationsStub httpJsonOperationsStub;
+ private final HttpJsonStubCallableFactory callableFactory;
+
+ public static final HttpJsonGameServerConfigsServiceStub create(
+ GameServerConfigsServiceStubSettings settings) throws IOException {
+ return new HttpJsonGameServerConfigsServiceStub(settings, ClientContext.create(settings));
+ }
+
+ public static final HttpJsonGameServerConfigsServiceStub create(ClientContext clientContext)
+ throws IOException {
+ return new HttpJsonGameServerConfigsServiceStub(
+ GameServerConfigsServiceStubSettings.newHttpJsonBuilder().build(), clientContext);
+ }
+
+ public static final HttpJsonGameServerConfigsServiceStub create(
+ ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException {
+ return new HttpJsonGameServerConfigsServiceStub(
+ GameServerConfigsServiceStubSettings.newHttpJsonBuilder().build(),
+ clientContext,
+ callableFactory);
+ }
+
+ /**
+ * Constructs an instance of HttpJsonGameServerConfigsServiceStub, using the given settings. This
+ * is protected so that it is easy to make a subclass, but otherwise, the static factory methods
+ * should be preferred.
+ */
+ protected HttpJsonGameServerConfigsServiceStub(
+ GameServerConfigsServiceStubSettings settings, ClientContext clientContext)
+ throws IOException {
+ this(settings, clientContext, new HttpJsonGameServerConfigsServiceCallableFactory());
+ }
+
+ /**
+ * Constructs an instance of HttpJsonGameServerConfigsServiceStub, using the given settings. This
+ * is protected so that it is easy to make a subclass, but otherwise, the static factory methods
+ * should be preferred.
+ */
+ protected HttpJsonGameServerConfigsServiceStub(
+ GameServerConfigsServiceStubSettings settings,
+ ClientContext clientContext,
+ HttpJsonStubCallableFactory callableFactory)
+ throws IOException {
+ this.callableFactory = callableFactory;
+ this.httpJsonOperationsStub =
+ HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry);
+
+ HttpJsonCallSettings
+ listGameServerConfigsTransportSettings =
+ HttpJsonCallSettings
+ .newBuilder()
+ .setMethodDescriptor(listGameServerConfigsMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .build();
+ HttpJsonCallSettings
+ getGameServerConfigTransportSettings =
+ HttpJsonCallSettings.newBuilder()
+ .setMethodDescriptor(getGameServerConfigMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .build();
+ HttpJsonCallSettings
+ createGameServerConfigTransportSettings =
+ HttpJsonCallSettings.newBuilder()
+ .setMethodDescriptor(createGameServerConfigMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .build();
+ HttpJsonCallSettings
+ deleteGameServerConfigTransportSettings =
+ HttpJsonCallSettings.newBuilder()
+ .setMethodDescriptor(deleteGameServerConfigMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .build();
+
+ this.listGameServerConfigsCallable =
+ callableFactory.createUnaryCallable(
+ listGameServerConfigsTransportSettings,
+ settings.listGameServerConfigsSettings(),
+ clientContext);
+ this.listGameServerConfigsPagedCallable =
+ callableFactory.createPagedCallable(
+ listGameServerConfigsTransportSettings,
+ settings.listGameServerConfigsSettings(),
+ clientContext);
+ this.getGameServerConfigCallable =
+ callableFactory.createUnaryCallable(
+ getGameServerConfigTransportSettings,
+ settings.getGameServerConfigSettings(),
+ clientContext);
+ this.createGameServerConfigCallable =
+ callableFactory.createUnaryCallable(
+ createGameServerConfigTransportSettings,
+ settings.createGameServerConfigSettings(),
+ clientContext);
+ this.createGameServerConfigOperationCallable =
+ callableFactory.createOperationCallable(
+ createGameServerConfigTransportSettings,
+ settings.createGameServerConfigOperationSettings(),
+ clientContext,
+ httpJsonOperationsStub);
+ this.deleteGameServerConfigCallable =
+ callableFactory.createUnaryCallable(
+ deleteGameServerConfigTransportSettings,
+ settings.deleteGameServerConfigSettings(),
+ clientContext);
+ this.deleteGameServerConfigOperationCallable =
+ callableFactory.createOperationCallable(
+ deleteGameServerConfigTransportSettings,
+ settings.deleteGameServerConfigOperationSettings(),
+ clientContext,
+ httpJsonOperationsStub);
+
+ this.backgroundResources =
+ new BackgroundResourceAggregation(clientContext.getBackgroundResources());
+ }
+
+ @InternalApi
+ public static List getMethodDescriptors() {
+ List methodDescriptors = new ArrayList<>();
+ methodDescriptors.add(listGameServerConfigsMethodDescriptor);
+ methodDescriptors.add(getGameServerConfigMethodDescriptor);
+ methodDescriptors.add(createGameServerConfigMethodDescriptor);
+ methodDescriptors.add(deleteGameServerConfigMethodDescriptor);
+ return methodDescriptors;
+ }
+
+ public HttpJsonOperationsStub getHttpJsonOperationsStub() {
+ return httpJsonOperationsStub;
+ }
+
+ @Override
+ public UnaryCallable
+ listGameServerConfigsCallable() {
+ return listGameServerConfigsCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ listGameServerConfigsPagedCallable() {
+ return listGameServerConfigsPagedCallable;
+ }
+
+ @Override
+ public UnaryCallable getGameServerConfigCallable() {
+ return getGameServerConfigCallable;
+ }
+
+ @Override
+ public UnaryCallable createGameServerConfigCallable() {
+ return createGameServerConfigCallable;
+ }
+
+ @Override
+ public OperationCallable
+ createGameServerConfigOperationCallable() {
+ return createGameServerConfigOperationCallable;
+ }
+
+ @Override
+ public UnaryCallable deleteGameServerConfigCallable() {
+ return deleteGameServerConfigCallable;
+ }
+
+ @Override
+ public OperationCallable
+ deleteGameServerConfigOperationCallable() {
+ return deleteGameServerConfigOperationCallable;
+ }
+
+ @Override
+ public final void close() {
+ try {
+ backgroundResources.close();
+ } catch (RuntimeException e) {
+ throw e;
+ } catch (Exception e) {
+ throw new IllegalStateException("Failed to close resource", e);
+ }
+ }
+
+ @Override
+ public void shutdown() {
+ backgroundResources.shutdown();
+ }
+
+ @Override
+ public boolean isShutdown() {
+ return backgroundResources.isShutdown();
+ }
+
+ @Override
+ public boolean isTerminated() {
+ return backgroundResources.isTerminated();
+ }
+
+ @Override
+ public void shutdownNow() {
+ backgroundResources.shutdownNow();
+ }
+
+ @Override
+ public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
+ return backgroundResources.awaitTermination(duration, unit);
+ }
+}
diff --git a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/HttpJsonGameServerDeploymentsServiceCallableFactory.java b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/HttpJsonGameServerDeploymentsServiceCallableFactory.java
new file mode 100644
index 000000000000..e70b50fdb704
--- /dev/null
+++ b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/HttpJsonGameServerDeploymentsServiceCallableFactory.java
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.gaming.v1.stub;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.httpjson.HttpJsonCallSettings;
+import com.google.api.gax.httpjson.HttpJsonCallableFactory;
+import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable;
+import com.google.api.gax.httpjson.HttpJsonStubCallableFactory;
+import com.google.api.gax.httpjson.longrunning.stub.OperationsStub;
+import com.google.api.gax.rpc.BatchingCallSettings;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.OperationCallSettings;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.PagedCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallable;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.longrunning.Operation;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * REST callable factory implementation for the GameServerDeploymentsService service API.
+ *
+ * This class is for advanced usage.
+ */
+@Generated("by gapic-generator-java")
+@BetaApi
+public class HttpJsonGameServerDeploymentsServiceCallableFactory
+ implements HttpJsonStubCallableFactory {
+
+ @Override
+ public UnaryCallable createUnaryCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ UnaryCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createUnaryCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ UnaryCallable createPagedCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ PagedCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createPagedCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public UnaryCallable createBatchingCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ BatchingCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createBatchingCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ @Override
+ public
+ OperationCallable createOperationCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ OperationCallSettings callSettings,
+ ClientContext clientContext,
+ OperationsStub operationsStub) {
+ UnaryCallable innerCallable =
+ HttpJsonCallableFactory.createBaseUnaryCallable(
+ httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext);
+ HttpJsonOperationSnapshotCallable initialCallable =
+ new HttpJsonOperationSnapshotCallable(
+ innerCallable,
+ httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory());
+ return HttpJsonCallableFactory.createOperationCallable(
+ callSettings, clientContext, operationsStub.longRunningClient(), initialCallable);
+ }
+
+ @Override
+ public
+ ServerStreamingCallable createServerStreamingCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ ServerStreamingCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createServerStreamingCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+}
diff --git a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/HttpJsonGameServerDeploymentsServiceStub.java b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/HttpJsonGameServerDeploymentsServiceStub.java
new file mode 100644
index 000000000000..8fe0b74443fc
--- /dev/null
+++ b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/HttpJsonGameServerDeploymentsServiceStub.java
@@ -0,0 +1,806 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.gaming.v1.stub;
+
+import static com.google.cloud.gaming.v1.GameServerDeploymentsServiceClient.ListGameServerDeploymentsPagedResponse;
+
+import com.google.api.core.BetaApi;
+import com.google.api.core.InternalApi;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.core.BackgroundResourceAggregation;
+import com.google.api.gax.httpjson.ApiMethodDescriptor;
+import com.google.api.gax.httpjson.HttpJsonCallSettings;
+import com.google.api.gax.httpjson.HttpJsonOperationSnapshot;
+import com.google.api.gax.httpjson.HttpJsonStubCallableFactory;
+import com.google.api.gax.httpjson.ProtoMessageRequestFormatter;
+import com.google.api.gax.httpjson.ProtoMessageResponseParser;
+import com.google.api.gax.httpjson.ProtoRestSerializer;
+import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.gaming.v1.CreateGameServerDeploymentRequest;
+import com.google.cloud.gaming.v1.DeleteGameServerDeploymentRequest;
+import com.google.cloud.gaming.v1.FetchDeploymentStateRequest;
+import com.google.cloud.gaming.v1.FetchDeploymentStateResponse;
+import com.google.cloud.gaming.v1.GameServerDeployment;
+import com.google.cloud.gaming.v1.GameServerDeploymentRollout;
+import com.google.cloud.gaming.v1.GetGameServerDeploymentRequest;
+import com.google.cloud.gaming.v1.GetGameServerDeploymentRolloutRequest;
+import com.google.cloud.gaming.v1.ListGameServerDeploymentsRequest;
+import com.google.cloud.gaming.v1.ListGameServerDeploymentsResponse;
+import com.google.cloud.gaming.v1.OperationMetadata;
+import com.google.cloud.gaming.v1.PreviewGameServerDeploymentRolloutRequest;
+import com.google.cloud.gaming.v1.PreviewGameServerDeploymentRolloutResponse;
+import com.google.cloud.gaming.v1.UpdateGameServerDeploymentRequest;
+import com.google.cloud.gaming.v1.UpdateGameServerDeploymentRolloutRequest;
+import com.google.longrunning.Operation;
+import com.google.protobuf.Empty;
+import com.google.protobuf.TypeRegistry;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * REST stub implementation for the GameServerDeploymentsService service API.
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+@BetaApi
+public class HttpJsonGameServerDeploymentsServiceStub extends GameServerDeploymentsServiceStub {
+ private static final TypeRegistry typeRegistry =
+ TypeRegistry.newBuilder()
+ .add(OperationMetadata.getDescriptor())
+ .add(Empty.getDescriptor())
+ .add(GameServerDeployment.getDescriptor())
+ .build();
+
+ private static final ApiMethodDescriptor<
+ ListGameServerDeploymentsRequest, ListGameServerDeploymentsResponse>
+ listGameServerDeploymentsMethodDescriptor =
+ ApiMethodDescriptor
+ .newBuilder()
+ .setFullMethodName(
+ "google.cloud.gaming.v1.GameServerDeploymentsService/ListGameServerDeployments")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{parent=projects/*/locations/*}/gameServerDeployments",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "parent", request.getParent());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "filter", request.getFilter());
+ serializer.putQueryParam(fields, "orderBy", request.getOrderBy());
+ serializer.putQueryParam(fields, "pageSize", request.getPageSize());
+ serializer.putQueryParam(fields, "pageToken", request.getPageToken());
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(ListGameServerDeploymentsResponse.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ getGameServerDeploymentMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName(
+ "google.cloud.gaming.v1.GameServerDeploymentsService/GetGameServerDeployment")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/gameServerDeployments/*}",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "name", request.getName());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(GameServerDeployment.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ createGameServerDeploymentMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName(
+ "google.cloud.gaming.v1.GameServerDeploymentsService/CreateGameServerDeployment")
+ .setHttpMethod("POST")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{parent=projects/*/locations/*}/gameServerDeployments",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "parent", request.getParent());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(
+ fields, "deploymentId", request.getDeploymentId());
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody(
+ "gameServerDeployment", request.getGameServerDeployment()))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Operation.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .setOperationSnapshotFactory(
+ (CreateGameServerDeploymentRequest request, Operation response) ->
+ HttpJsonOperationSnapshot.create(response))
+ .build();
+
+ private static final ApiMethodDescriptor
+ deleteGameServerDeploymentMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName(
+ "google.cloud.gaming.v1.GameServerDeploymentsService/DeleteGameServerDeployment")
+ .setHttpMethod("DELETE")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/gameServerDeployments/*}",
+ request -> {
+ Map