diff --git a/README.md b/README.md
index 98ad1c23..0215d240 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file
This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *
+ *
+ * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
+ * GameServerClusterName name = GameServerClusterName.of("[PROJECT]", "[LOCATION]", "[REALM]", "[CLUSTER]");
+ * GameServerCluster response = gameServerClustersServiceClient.getGameServerCluster(name);
+ * }
+ *
+ *
+ *
+ * Note: close() needs to be called on the gameServerClustersServiceClient object to clean up + * resources such as threads. In the example above, try-with-resources is used, which automatically + * calls close(). + * + *
The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *
See the individual methods for example code. + * + *
Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *
This class can be customized by passing in a custom instance of + * GameServerClustersServiceSettings to create(). For example: + * + *
To customize credentials: + * + *
+ *
+ * GameServerClustersServiceSettings gameServerClustersServiceSettings =
+ * GameServerClustersServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * GameServerClustersServiceClient gameServerClustersServiceClient =
+ * GameServerClustersServiceClient.create(gameServerClustersServiceSettings);
+ *
+ *
+ *
+ * To customize the endpoint:
+ *
+ *
+ *
+ * GameServerClustersServiceSettings gameServerClustersServiceSettings =
+ * GameServerClustersServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * GameServerClustersServiceClient gameServerClustersServiceClient =
+ * GameServerClustersServiceClient.create(gameServerClustersServiceSettings);
+ *
+ *
+ */
+@Generated("by gapic-generator")
+@BetaApi
+public class GameServerClustersServiceClient implements BackgroundResource {
+ private final GameServerClustersServiceSettings settings;
+ private final GameServerClustersServiceStub stub;
+ private final OperationsClient operationsClient;
+
+ /** Constructs an instance of GameServerClustersServiceClient with default settings. */
+ public static final GameServerClustersServiceClient create() throws IOException {
+ return create(GameServerClustersServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of GameServerClustersServiceClient, using the given settings. The
+ * channels are created based on the settings passed in, or defaults for any settings that are not
+ * set.
+ */
+ public static final GameServerClustersServiceClient create(
+ GameServerClustersServiceSettings settings) throws IOException {
+ return new GameServerClustersServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of GameServerClustersServiceClient, using the given stub for making
+ * calls. This is for advanced usage - prefer to use GameServerClustersServiceSettings}.
+ */
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public static final GameServerClustersServiceClient create(GameServerClustersServiceStub stub) {
+ return new GameServerClustersServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of GameServerClustersServiceClient, 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 GameServerClustersServiceClient(GameServerClustersServiceSettings settings)
+ throws IOException {
+ this.settings = settings;
+ this.stub = ((GameServerClustersServiceStubSettings) settings.getStubSettings()).createStub();
+ this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ protected GameServerClustersServiceClient(GameServerClustersServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ }
+
+ public final GameServerClustersServiceSettings getSettings() {
+ return settings;
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public GameServerClustersServiceStub getStub() {
+ return stub;
+ }
+
+ /**
+ * Returns the OperationsClient that can be used to query the status of a long-running operation
+ * returned by another API method call.
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationsClient getOperationsClient() {
+ return operationsClient;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists game server clusters in a given project and location.
+ *
+ * Sample code: + * + *
+ * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
+ * RealmName parent = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]");
+ * for (GameServerCluster element : gameServerClustersServiceClient.listGameServerClusters(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name. Uses the form:
+ * "projects/{project}/locations/{location}/realms/{realm}".
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListGameServerClustersPagedResponse listGameServerClusters(RealmName parent) {
+ ListGameServerClustersRequest request =
+ ListGameServerClustersRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listGameServerClusters(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists game server clusters in a given project and location.
+ *
+ * Sample code: + * + *
+ * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
+ * RealmName parent = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]");
+ * for (GameServerCluster element : gameServerClustersServiceClient.listGameServerClusters(parent.toString()).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name. Uses the form:
+ * "projects/{project}/locations/{location}/realms/{realm}".
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListGameServerClustersPagedResponse listGameServerClusters(String parent) {
+ ListGameServerClustersRequest request =
+ ListGameServerClustersRequest.newBuilder().setParent(parent).build();
+ return listGameServerClusters(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists game server clusters in a given project and location.
+ *
+ * Sample code: + * + *
+ * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
+ * RealmName parent = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]");
+ * ListGameServerClustersRequest request = ListGameServerClustersRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .build();
+ * for (GameServerCluster element : gameServerClustersServiceClient.listGameServerClusters(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListGameServerClustersPagedResponse listGameServerClusters(
+ ListGameServerClustersRequest request) {
+ return listGameServerClustersPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists game server clusters in a given project and location.
+ *
+ * Sample code: + * + *
+ * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
+ * RealmName parent = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]");
+ * ListGameServerClustersRequest request = ListGameServerClustersRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .build();
+ * ApiFuture<ListGameServerClustersPagedResponse> future = gameServerClustersServiceClient.listGameServerClustersPagedCallable().futureCall(request);
+ * // Do something
+ * for (GameServerCluster element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ */
+ public final UnaryCallableSample code: + * + *
+ * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
+ * RealmName parent = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]");
+ * ListGameServerClustersRequest request = ListGameServerClustersRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .build();
+ * while (true) {
+ * ListGameServerClustersResponse response = gameServerClustersServiceClient.listGameServerClustersCallable().call(request);
+ * for (GameServerCluster element : response.getGameServerClustersList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ *
+ */
+ public final UnaryCallableSample code: + * + *
+ * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
+ * GameServerClusterName name = GameServerClusterName.of("[PROJECT]", "[LOCATION]", "[REALM]", "[CLUSTER]");
+ * GameServerCluster response = gameServerClustersServiceClient.getGameServerCluster(name);
+ * }
+ *
+ *
+ * @param name Required. The name of the game server cluster to retrieve. Uses the form:
+ * `projects/{project}/locations/{location}/realms/{realm-id}/gameServerClusters/{cluster}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final GameServerCluster getGameServerCluster(GameServerClusterName name) { + GetGameServerClusterRequest request = + GetGameServerClusterRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getGameServerCluster(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets details of a single game server cluster. + * + *
Sample code: + * + *
+ * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
+ * GameServerClusterName name = GameServerClusterName.of("[PROJECT]", "[LOCATION]", "[REALM]", "[CLUSTER]");
+ * GameServerCluster response = gameServerClustersServiceClient.getGameServerCluster(name.toString());
+ * }
+ *
+ *
+ * @param name Required. The name of the game server cluster to retrieve. Uses the form:
+ * `projects/{project}/locations/{location}/realms/{realm-id}/gameServerClusters/{cluster}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final GameServerCluster getGameServerCluster(String name) { + GetGameServerClusterRequest request = + GetGameServerClusterRequest.newBuilder().setName(name).build(); + return getGameServerCluster(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets details of a single game server cluster. + * + *
Sample code: + * + *
+ * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
+ * GameServerClusterName name = GameServerClusterName.of("[PROJECT]", "[LOCATION]", "[REALM]", "[CLUSTER]");
+ * GetGameServerClusterRequest request = GetGameServerClusterRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * GameServerCluster response = gameServerClustersServiceClient.getGameServerCluster(request);
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GameServerCluster getGameServerCluster(GetGameServerClusterRequest request) {
+ return getGameServerClusterCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets details of a single game server cluster.
+ *
+ * Sample code: + * + *
+ * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
+ * GameServerClusterName name = GameServerClusterName.of("[PROJECT]", "[LOCATION]", "[REALM]", "[CLUSTER]");
+ * GetGameServerClusterRequest request = GetGameServerClusterRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * ApiFuture<GameServerCluster> future = gameServerClustersServiceClient.getGameServerClusterCallable().futureCall(request);
+ * // Do something
+ * GameServerCluster response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallableSample code: + * + *
+ * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
+ * RealmName parent = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]");
+ * GameServerCluster gameServerCluster = GameServerCluster.newBuilder().build();
+ * String gameServerClusterId = "";
+ * GameServerCluster response = gameServerClustersServiceClient.createGameServerClusterAsync(parent, gameServerCluster, gameServerClusterId).get();
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name. Uses the form:
+ * `projects/{project}/locations/{location}/realms/{realm-id}`.
+ * @param gameServerCluster Required. The game server cluster resource to be created.
+ * @param gameServerClusterId Required. The ID of the game server cluster resource to be created.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFutureSample code: + * + *
+ * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
+ * RealmName parent = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]");
+ * GameServerCluster gameServerCluster = GameServerCluster.newBuilder().build();
+ * String gameServerClusterId = "";
+ * GameServerCluster response = gameServerClustersServiceClient.createGameServerClusterAsync(parent.toString(), gameServerCluster, gameServerClusterId).get();
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name. Uses the form:
+ * `projects/{project}/locations/{location}/realms/{realm-id}`.
+ * @param gameServerCluster Required. The game server cluster resource to be created.
+ * @param gameServerClusterId Required. The ID of the game server cluster resource to be created.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFutureSample code: + * + *
+ * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
+ * RealmName parent = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]");
+ * String gameServerClusterId = "";
+ * GameServerCluster gameServerCluster = GameServerCluster.newBuilder().build();
+ * CreateGameServerClusterRequest request = CreateGameServerClusterRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .setGameServerClusterId(gameServerClusterId)
+ * .setGameServerCluster(gameServerCluster)
+ * .build();
+ * GameServerCluster response = gameServerClustersServiceClient.createGameServerClusterAsync(request).get();
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFutureSample code: + * + *
+ * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
+ * RealmName parent = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]");
+ * String gameServerClusterId = "";
+ * GameServerCluster gameServerCluster = GameServerCluster.newBuilder().build();
+ * CreateGameServerClusterRequest request = CreateGameServerClusterRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .setGameServerClusterId(gameServerClusterId)
+ * .setGameServerCluster(gameServerCluster)
+ * .build();
+ * OperationFuture<GameServerCluster, OperationMetadata> future = gameServerClustersServiceClient.createGameServerClusterOperationCallable().futureCall(request);
+ * // Do something
+ * GameServerCluster response = future.get();
+ * }
+ *
+ */
+ @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+ public final OperationCallable<
+ CreateGameServerClusterRequest, GameServerCluster, OperationMetadata>
+ createGameServerClusterOperationCallable() {
+ return stub.createGameServerClusterOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a new game server cluster in a given project and location.
+ *
+ * Sample code: + * + *
+ * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
+ * RealmName parent = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]");
+ * String gameServerClusterId = "";
+ * GameServerCluster gameServerCluster = GameServerCluster.newBuilder().build();
+ * CreateGameServerClusterRequest request = CreateGameServerClusterRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .setGameServerClusterId(gameServerClusterId)
+ * .setGameServerCluster(gameServerCluster)
+ * .build();
+ * ApiFuture<Operation> future = gameServerClustersServiceClient.createGameServerClusterCallable().futureCall(request);
+ * // Do something
+ * Operation response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallableSample code: + * + *
+ * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
+ * RealmName parent = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]");
+ * String gameServerClusterId = "";
+ * GameServerCluster gameServerCluster = GameServerCluster.newBuilder().build();
+ * PreviewCreateGameServerClusterRequest request = PreviewCreateGameServerClusterRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .setGameServerClusterId(gameServerClusterId)
+ * .setGameServerCluster(gameServerCluster)
+ * .build();
+ * PreviewCreateGameServerClusterResponse response = gameServerClustersServiceClient.previewCreateGameServerCluster(request);
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final PreviewCreateGameServerClusterResponse previewCreateGameServerCluster(
+ PreviewCreateGameServerClusterRequest request) {
+ return previewCreateGameServerClusterCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Previews creation of a new game server cluster in a given project and location.
+ *
+ * Sample code: + * + *
+ * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
+ * RealmName parent = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]");
+ * String gameServerClusterId = "";
+ * GameServerCluster gameServerCluster = GameServerCluster.newBuilder().build();
+ * PreviewCreateGameServerClusterRequest request = PreviewCreateGameServerClusterRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .setGameServerClusterId(gameServerClusterId)
+ * .setGameServerCluster(gameServerCluster)
+ * .build();
+ * ApiFuture<PreviewCreateGameServerClusterResponse> future = gameServerClustersServiceClient.previewCreateGameServerClusterCallable().futureCall(request);
+ * // Do something
+ * PreviewCreateGameServerClusterResponse response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallable<
+ PreviewCreateGameServerClusterRequest, PreviewCreateGameServerClusterResponse>
+ previewCreateGameServerClusterCallable() {
+ return stub.previewCreateGameServerClusterCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes a single game server cluster.
+ *
+ * Sample code: + * + *
+ * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
+ * GameServerClusterName name = GameServerClusterName.of("[PROJECT]", "[LOCATION]", "[REALM]", "[CLUSTER]");
+ * gameServerClustersServiceClient.deleteGameServerClusterAsync(name).get();
+ * }
+ *
+ *
+ * @param name Required. The name of the game server cluster to delete. Uses the form:
+ * `projects/{project}/locations/{location}/gameServerClusters/{cluster}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFutureSample code: + * + *
+ * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
+ * GameServerClusterName name = GameServerClusterName.of("[PROJECT]", "[LOCATION]", "[REALM]", "[CLUSTER]");
+ * gameServerClustersServiceClient.deleteGameServerClusterAsync(name.toString()).get();
+ * }
+ *
+ *
+ * @param name Required. The name of the game server cluster to delete. Uses the form:
+ * `projects/{project}/locations/{location}/gameServerClusters/{cluster}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFutureSample code: + * + *
+ * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
+ * GameServerClusterName name = GameServerClusterName.of("[PROJECT]", "[LOCATION]", "[REALM]", "[CLUSTER]");
+ * DeleteGameServerClusterRequest request = DeleteGameServerClusterRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * gameServerClustersServiceClient.deleteGameServerClusterAsync(request).get();
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFutureSample code: + * + *
+ * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
+ * GameServerClusterName name = GameServerClusterName.of("[PROJECT]", "[LOCATION]", "[REALM]", "[CLUSTER]");
+ * DeleteGameServerClusterRequest request = DeleteGameServerClusterRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * OperationFuture<Empty, OperationMetadata> future = gameServerClustersServiceClient.deleteGameServerClusterOperationCallable().futureCall(request);
+ * // Do something
+ * future.get();
+ * }
+ *
+ */
+ @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+ public final OperationCallableSample code: + * + *
+ * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
+ * GameServerClusterName name = GameServerClusterName.of("[PROJECT]", "[LOCATION]", "[REALM]", "[CLUSTER]");
+ * DeleteGameServerClusterRequest request = DeleteGameServerClusterRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * ApiFuture<Operation> future = gameServerClustersServiceClient.deleteGameServerClusterCallable().futureCall(request);
+ * // Do something
+ * future.get();
+ * }
+ *
+ */
+ public final UnaryCallableSample code: + * + *
+ * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
+ * GameServerClusterName name = GameServerClusterName.of("[PROJECT]", "[LOCATION]", "[REALM]", "[CLUSTER]");
+ * PreviewDeleteGameServerClusterRequest request = PreviewDeleteGameServerClusterRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * PreviewDeleteGameServerClusterResponse response = gameServerClustersServiceClient.previewDeleteGameServerCluster(request);
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final PreviewDeleteGameServerClusterResponse previewDeleteGameServerCluster(
+ PreviewDeleteGameServerClusterRequest request) {
+ return previewDeleteGameServerClusterCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Previews deletion of a single game server cluster.
+ *
+ * Sample code: + * + *
+ * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
+ * GameServerClusterName name = GameServerClusterName.of("[PROJECT]", "[LOCATION]", "[REALM]", "[CLUSTER]");
+ * PreviewDeleteGameServerClusterRequest request = PreviewDeleteGameServerClusterRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * ApiFuture<PreviewDeleteGameServerClusterResponse> future = gameServerClustersServiceClient.previewDeleteGameServerClusterCallable().futureCall(request);
+ * // Do something
+ * PreviewDeleteGameServerClusterResponse response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallable<
+ PreviewDeleteGameServerClusterRequest, PreviewDeleteGameServerClusterResponse>
+ previewDeleteGameServerClusterCallable() {
+ return stub.previewDeleteGameServerClusterCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Patches a single game server cluster.
+ *
+ * Sample code: + * + *
+ * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
+ * GameServerCluster gameServerCluster = GameServerCluster.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * GameServerCluster response = gameServerClustersServiceClient.updateGameServerClusterAsync(gameServerCluster, updateMask).get();
+ * }
+ *
+ *
+ * @param gameServerCluster Required. The game server cluster to be updated. Only fields specified
+ * in update_mask are updated.
+ * @param updateMask Required. Mask of fields to update. At least one path must be supplied in
+ * this field. For the `FieldMask` definition, see
+ * https: //developers.google.com/protocol-buffers //
+ * /docs/reference/google.protobuf#fieldmask
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of getGameServerCluster to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class provides the ability to make remote calls to the backing service through method
+ * calls that map to API methods. Sample code to get started:
+ *
+ * Note: close() needs to be called on the gameServerConfigsServiceClient object to clean up
+ * resources such as threads. In the example above, try-with-resources is used, which automatically
+ * calls close().
+ *
+ * The surface of this class includes several types of Java methods for each of the API's
+ * methods:
+ *
+ * See the individual methods for example code.
+ *
+ * Many parameters require resource names to be formatted in a particular way. To assist with
+ * these names, this class includes a format method for each type of name, and additionally a parse
+ * method to extract the individual identifiers contained within names that are returned.
+ *
+ * This class can be customized by passing in a custom instance of
+ * GameServerConfigsServiceSettings to create(). For example:
+ *
+ * To customize credentials:
+ *
+ * Sample code:
+ *
+ * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/*`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListGameServerConfigsPagedResponse listGameServerConfigs(
+ GameServerDeploymentName parent) {
+ ListGameServerConfigsRequest request =
+ ListGameServerConfigsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listGameServerConfigs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists game server configs in a given project, location, and game server deployment.
+ *
+ * Sample code:
+ *
+ * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/*`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListGameServerConfigsPagedResponse listGameServerConfigs(String parent) {
+ ListGameServerConfigsRequest request =
+ ListGameServerConfigsRequest.newBuilder().setParent(parent).build();
+ return listGameServerConfigs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists game server configs in a given project, location, and game server deployment.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GameServerConfig getGameServerConfig(GameServerConfigName name) {
+ GetGameServerConfigRequest request =
+ GetGameServerConfigRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getGameServerConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets details of a single game server config.
+ *
+ * Sample code:
+ *
+ * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GameServerConfig getGameServerConfig(String name) {
+ GetGameServerConfigRequest request =
+ GetGameServerConfigRequest.newBuilder().setName(name).build();
+ return getGameServerConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets details of a single game server config.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/`.
+ * @param gameServerConfig Required. The game server config resource to be created.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFuture Sample code:
+ *
+ * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/`.
+ * @param gameServerConfig Required. The game server config resource to be created.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFuture Sample code:
+ *
+ * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of getGameServerConfig to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class provides the ability to make remote calls to the backing service through method
+ * calls that map to API methods. Sample code to get started:
+ *
+ * Note: close() needs to be called on the gameServerDeploymentsServiceClient object to clean up
+ * resources such as threads. In the example above, try-with-resources is used, which automatically
+ * calls close().
+ *
+ * The surface of this class includes several types of Java methods for each of the API's
+ * methods:
+ *
+ * See the individual methods for example code.
+ *
+ * Many parameters require resource names to be formatted in a particular way. To assist with
+ * these names, this class includes a format method for each type of name, and additionally a parse
+ * method to extract the individual identifiers contained within names that are returned.
+ *
+ * This class can be customized by passing in a custom instance of
+ * GameServerDeploymentsServiceSettings to create(). For example:
+ *
+ * To customize credentials:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GameServerDeployment getGameServerDeployment(GameServerDeploymentName name) {
+ GetGameServerDeploymentRequest request =
+ GetGameServerDeploymentRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getGameServerDeployment(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets details of a single game server deployment.
+ *
+ * Sample code:
+ *
+ * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GameServerDeployment getGameServerDeployment(String name) {
+ GetGameServerDeploymentRequest request =
+ GetGameServerDeploymentRequest.newBuilder().setName(name).build();
+ return getGameServerDeployment(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets details of a single game server deployment.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFuture Sample code:
+ *
+ * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * https: //developers.google.com/protocol-buffers //
+ * /docs/reference/google.protobuf#fieldmask
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GameServerDeploymentRollout getGameServerDeploymentRollout(
+ GameServerDeploymentName name) {
+ GetGameServerDeploymentRolloutRequest request =
+ GetGameServerDeploymentRolloutRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getGameServerDeploymentRollout(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets details a single game server deployment rollout.
+ *
+ * Sample code:
+ *
+ * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GameServerDeploymentRollout getGameServerDeploymentRollout(String name) {
+ GetGameServerDeploymentRolloutRequest request =
+ GetGameServerDeploymentRolloutRequest.newBuilder().setName(name).build();
+ return getGameServerDeploymentRollout(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets details a single game server deployment rollout.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * https: //developers.google.com/protocol-buffers //
+ * /docs/reference/google.protobuf#fieldmask
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of getGameServerDeployment to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class provides the ability to make remote calls to the backing service through method
+ * calls that map to API methods. Sample code to get started:
+ *
+ * Note: close() needs to be called on the realmsServiceClient object to clean up resources such
+ * as threads. In the example above, try-with-resources is used, which automatically calls close().
+ *
+ * The surface of this class includes several types of Java methods for each of the API's
+ * methods:
+ *
+ * See the individual methods for example code.
+ *
+ * Many parameters require resource names to be formatted in a particular way. To assist with
+ * these names, this class includes a format method for each type of name, and additionally a parse
+ * method to extract the individual identifiers contained within names that are returned.
+ *
+ * This class can be customized by passing in a custom instance of RealmsServiceSettings to
+ * create(). For example:
+ *
+ * To customize credentials:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * https: //developers.google.com/protocol-buffers //
+ * /docs/reference/google.protobuf#fieldmask
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of getRealm to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction The interfaces provided are listed below, along with usage samples.
+ *
+ * =============================== GameServerClustersServiceClient
+ * ===============================
+ *
+ * Service Description: The game server cluster maps to Kubernetes clusters running Agones and is
+ * used to manage fleets within clusters.
+ *
+ * Sample for GameServerClustersServiceClient:
+ *
+ * Service Description: The game server config configures the game servers in an Agones fleet.
+ *
+ * Sample for GameServerConfigsServiceClient:
+ *
+ * Service Description: The game server deployment is used to control the deployment of Agones
+ * fleets.
+ *
+ * Sample for GameServerDeploymentsServiceClient:
+ *
+ * Service Description: A realm is a grouping of game server clusters that are considered
+ * interchangeable.
+ *
+ * Sample for RealmsServiceClient:
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator")
+@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+public abstract class GameServerClustersServiceStub implements BackgroundResource {
+
+ @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+ public OperationsStub getOperationsStub() {
+ throw new UnsupportedOperationException("Not implemented: getOperationsStub()");
+ }
+
+ public UnaryCallable The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of getGameServerCluster to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator")
+@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+public abstract class GameServerConfigsServiceStub implements BackgroundResource {
+
+ @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+ public OperationsStub getOperationsStub() {
+ throw new UnsupportedOperationException("Not implemented: getOperationsStub()");
+ }
+
+ public UnaryCallable
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFuture
+ * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
+ * GameServerCluster gameServerCluster = GameServerCluster.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * UpdateGameServerClusterRequest request = UpdateGameServerClusterRequest.newBuilder()
+ * .setGameServerCluster(gameServerCluster)
+ * .setUpdateMask(updateMask)
+ * .build();
+ * GameServerCluster response = gameServerClustersServiceClient.updateGameServerClusterAsync(request).get();
+ * }
+ *
+ */
+ @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+ public final OperationCallable<
+ UpdateGameServerClusterRequest, GameServerCluster, OperationMetadata>
+ updateGameServerClusterOperationCallable() {
+ return stub.updateGameServerClusterOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Patches a single game server cluster.
+ *
+ *
+ * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
+ * GameServerCluster gameServerCluster = GameServerCluster.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * UpdateGameServerClusterRequest request = UpdateGameServerClusterRequest.newBuilder()
+ * .setGameServerCluster(gameServerCluster)
+ * .setUpdateMask(updateMask)
+ * .build();
+ * OperationFuture<GameServerCluster, OperationMetadata> future = gameServerClustersServiceClient.updateGameServerClusterOperationCallable().futureCall(request);
+ * // Do something
+ * GameServerCluster response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallable
+ * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
+ * GameServerCluster gameServerCluster = GameServerCluster.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * UpdateGameServerClusterRequest request = UpdateGameServerClusterRequest.newBuilder()
+ * .setGameServerCluster(gameServerCluster)
+ * .setUpdateMask(updateMask)
+ * .build();
+ * ApiFuture<Operation> future = gameServerClustersServiceClient.updateGameServerClusterCallable().futureCall(request);
+ * // Do something
+ * Operation response = future.get();
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final PreviewUpdateGameServerClusterResponse previewUpdateGameServerCluster(
+ PreviewUpdateGameServerClusterRequest request) {
+ return previewUpdateGameServerClusterCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Previews updating a GameServerCluster.
+ *
+ *
+ * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
+ * GameServerCluster gameServerCluster = GameServerCluster.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * PreviewUpdateGameServerClusterRequest request = PreviewUpdateGameServerClusterRequest.newBuilder()
+ * .setGameServerCluster(gameServerCluster)
+ * .setUpdateMask(updateMask)
+ * .build();
+ * PreviewUpdateGameServerClusterResponse response = gameServerClustersServiceClient.previewUpdateGameServerCluster(request);
+ * }
+ *
+ */
+ public final UnaryCallable<
+ PreviewUpdateGameServerClusterRequest, PreviewUpdateGameServerClusterResponse>
+ previewUpdateGameServerClusterCallable() {
+ return stub.previewUpdateGameServerClusterCallable();
+ }
+
+ @Override
+ public final void close() {
+ stub.close();
+ }
+
+ @Override
+ public void shutdown() {
+ stub.shutdown();
+ }
+
+ @Override
+ public boolean isShutdown() {
+ return stub.isShutdown();
+ }
+
+ @Override
+ public boolean isTerminated() {
+ return stub.isTerminated();
+ }
+
+ @Override
+ public void shutdownNow() {
+ stub.shutdownNow();
+ }
+
+ @Override
+ public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
+ return stub.awaitTermination(duration, unit);
+ }
+
+ public static class ListGameServerClustersPagedResponse
+ extends AbstractPagedListResponse<
+ ListGameServerClustersRequest,
+ ListGameServerClustersResponse,
+ GameServerCluster,
+ ListGameServerClustersPage,
+ ListGameServerClustersFixedSizeCollection> {
+
+ public static ApiFuture
+ * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
+ * GameServerCluster gameServerCluster = GameServerCluster.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * PreviewUpdateGameServerClusterRequest request = PreviewUpdateGameServerClusterRequest.newBuilder()
+ * .setGameServerCluster(gameServerCluster)
+ * .setUpdateMask(updateMask)
+ * .build();
+ * ApiFuture<PreviewUpdateGameServerClusterResponse> future = gameServerClustersServiceClient.previewUpdateGameServerClusterCallable().futureCall(request);
+ * // Do something
+ * PreviewUpdateGameServerClusterResponse response = future.get();
+ * }
+ *
+ *
+ *
+ *
+ *
+ */
+@Generated("by gapic-generator")
+@BetaApi
+public class GameServerClustersServiceSettings
+ extends ClientSettings
+ * GameServerClustersServiceSettings.Builder gameServerClustersServiceSettingsBuilder =
+ * GameServerClustersServiceSettings.newBuilder();
+ * gameServerClustersServiceSettingsBuilder
+ * .getGameServerClusterSettings()
+ * .setRetrySettings(
+ * gameServerClustersServiceSettingsBuilder.getGameServerClusterSettings().getRetrySettings().toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * GameServerClustersServiceSettings gameServerClustersServiceSettings = gameServerClustersServiceSettingsBuilder.build();
+ *
+ *
+ *
+ *
+ *
+ * try (GameServerConfigsServiceClient gameServerConfigsServiceClient = GameServerConfigsServiceClient.create()) {
+ * GameServerConfigName name = GameServerConfigName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[CONFIG]");
+ * GameServerConfig response = gameServerConfigsServiceClient.getGameServerConfig(name);
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * To customize the endpoint:
+ *
+ *
+ * GameServerConfigsServiceSettings gameServerConfigsServiceSettings =
+ * GameServerConfigsServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * GameServerConfigsServiceClient gameServerConfigsServiceClient =
+ * GameServerConfigsServiceClient.create(gameServerConfigsServiceSettings);
+ *
+ *
+ *
+ */
+@Generated("by gapic-generator")
+@BetaApi
+public class GameServerConfigsServiceClient implements BackgroundResource {
+ private final GameServerConfigsServiceSettings settings;
+ private final GameServerConfigsServiceStub stub;
+ private final OperationsClient operationsClient;
+
+ /** Constructs an instance of GameServerConfigsServiceClient with default settings. */
+ public static final GameServerConfigsServiceClient create() throws IOException {
+ return create(GameServerConfigsServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of GameServerConfigsServiceClient, using the given settings. The
+ * channels are created based on the settings passed in, or defaults for any settings that are not
+ * set.
+ */
+ public static final GameServerConfigsServiceClient create(
+ GameServerConfigsServiceSettings settings) throws IOException {
+ return new GameServerConfigsServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of GameServerConfigsServiceClient, using the given stub for making
+ * calls. This is for advanced usage - prefer to use GameServerConfigsServiceSettings}.
+ */
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public static final GameServerConfigsServiceClient create(GameServerConfigsServiceStub stub) {
+ return new GameServerConfigsServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of GameServerConfigsServiceClient, 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 GameServerConfigsServiceClient(GameServerConfigsServiceSettings settings)
+ throws IOException {
+ this.settings = settings;
+ this.stub = ((GameServerConfigsServiceStubSettings) settings.getStubSettings()).createStub();
+ this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ protected GameServerConfigsServiceClient(GameServerConfigsServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ }
+
+ public final GameServerConfigsServiceSettings getSettings() {
+ return settings;
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public GameServerConfigsServiceStub getStub() {
+ return stub;
+ }
+
+ /**
+ * Returns the OperationsClient that can be used to query the status of a long-running operation
+ * returned by another API method call.
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationsClient getOperationsClient() {
+ return operationsClient;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists game server configs in a given project, location, and game server deployment.
+ *
+ *
+ * GameServerConfigsServiceSettings gameServerConfigsServiceSettings =
+ * GameServerConfigsServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * GameServerConfigsServiceClient gameServerConfigsServiceClient =
+ * GameServerConfigsServiceClient.create(gameServerConfigsServiceSettings);
+ *
+ *
+ *
+ * @param parent Required. The parent resource name. Uses the form:
+ *
+ * try (GameServerConfigsServiceClient gameServerConfigsServiceClient = GameServerConfigsServiceClient.create()) {
+ * GameServerDeploymentName parent = GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
+ * for (GameServerConfig element : gameServerConfigsServiceClient.listGameServerConfigs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name. Uses the form:
+ *
+ * try (GameServerConfigsServiceClient gameServerConfigsServiceClient = GameServerConfigsServiceClient.create()) {
+ * GameServerDeploymentName parent = GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
+ * for (GameServerConfig element : gameServerConfigsServiceClient.listGameServerConfigs(parent.toString()).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListGameServerConfigsPagedResponse listGameServerConfigs(
+ ListGameServerConfigsRequest request) {
+ return listGameServerConfigsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists game server configs in a given project, location, and game server deployment.
+ *
+ *
+ * try (GameServerConfigsServiceClient gameServerConfigsServiceClient = GameServerConfigsServiceClient.create()) {
+ * GameServerDeploymentName parent = GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
+ * ListGameServerConfigsRequest request = ListGameServerConfigsRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .build();
+ * for (GameServerConfig element : gameServerConfigsServiceClient.listGameServerConfigs(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ */
+ public final UnaryCallable
+ * try (GameServerConfigsServiceClient gameServerConfigsServiceClient = GameServerConfigsServiceClient.create()) {
+ * GameServerDeploymentName parent = GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
+ * ListGameServerConfigsRequest request = ListGameServerConfigsRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .build();
+ * ApiFuture<ListGameServerConfigsPagedResponse> future = gameServerConfigsServiceClient.listGameServerConfigsPagedCallable().futureCall(request);
+ * // Do something
+ * for (GameServerConfig element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ */
+ public final UnaryCallable
+ * try (GameServerConfigsServiceClient gameServerConfigsServiceClient = GameServerConfigsServiceClient.create()) {
+ * GameServerDeploymentName parent = GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
+ * ListGameServerConfigsRequest request = ListGameServerConfigsRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .build();
+ * while (true) {
+ * ListGameServerConfigsResponse response = gameServerConfigsServiceClient.listGameServerConfigsCallable().call(request);
+ * for (GameServerConfig element : response.getGameServerConfigsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ *
+ *
+ * @param name Required. The name of the game server config to retrieve. Uses the form:
+ *
+ * try (GameServerConfigsServiceClient gameServerConfigsServiceClient = GameServerConfigsServiceClient.create()) {
+ * GameServerConfigName name = GameServerConfigName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[CONFIG]");
+ * GameServerConfig response = gameServerConfigsServiceClient.getGameServerConfig(name);
+ * }
+ *
+ *
+ * @param name Required. The name of the game server config to retrieve. Uses the form:
+ *
+ * try (GameServerConfigsServiceClient gameServerConfigsServiceClient = GameServerConfigsServiceClient.create()) {
+ * GameServerConfigName name = GameServerConfigName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[CONFIG]");
+ * GameServerConfig response = gameServerConfigsServiceClient.getGameServerConfig(name.toString());
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GameServerConfig getGameServerConfig(GetGameServerConfigRequest request) {
+ return getGameServerConfigCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets details of a single game server config.
+ *
+ *
+ * try (GameServerConfigsServiceClient gameServerConfigsServiceClient = GameServerConfigsServiceClient.create()) {
+ * GameServerConfigName name = GameServerConfigName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[CONFIG]");
+ * GetGameServerConfigRequest request = GetGameServerConfigRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * GameServerConfig response = gameServerConfigsServiceClient.getGameServerConfig(request);
+ * }
+ *
+ */
+ public final UnaryCallable
+ * try (GameServerConfigsServiceClient gameServerConfigsServiceClient = GameServerConfigsServiceClient.create()) {
+ * GameServerConfigName name = GameServerConfigName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[CONFIG]");
+ * GetGameServerConfigRequest request = GetGameServerConfigRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * ApiFuture<GameServerConfig> future = gameServerConfigsServiceClient.getGameServerConfigCallable().futureCall(request);
+ * // Do something
+ * GameServerConfig response = future.get();
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name. Uses the form:
+ *
+ * try (GameServerConfigsServiceClient gameServerConfigsServiceClient = GameServerConfigsServiceClient.create()) {
+ * GameServerDeploymentName parent = GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
+ * GameServerConfig gameServerConfig = GameServerConfig.newBuilder().build();
+ * GameServerConfig response = gameServerConfigsServiceClient.createGameServerConfigAsync(parent, gameServerConfig).get();
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name. Uses the form:
+ *
+ * try (GameServerConfigsServiceClient gameServerConfigsServiceClient = GameServerConfigsServiceClient.create()) {
+ * GameServerDeploymentName parent = GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
+ * GameServerConfig gameServerConfig = GameServerConfig.newBuilder().build();
+ * GameServerConfig response = gameServerConfigsServiceClient.createGameServerConfigAsync(parent.toString(), gameServerConfig).get();
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFuture
+ * try (GameServerConfigsServiceClient gameServerConfigsServiceClient = GameServerConfigsServiceClient.create()) {
+ * GameServerDeploymentName parent = GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
+ * String configId = "";
+ * GameServerConfig gameServerConfig = GameServerConfig.newBuilder().build();
+ * CreateGameServerConfigRequest request = CreateGameServerConfigRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .setConfigId(configId)
+ * .setGameServerConfig(gameServerConfig)
+ * .build();
+ * GameServerConfig response = gameServerConfigsServiceClient.createGameServerConfigAsync(request).get();
+ * }
+ *
+ */
+ @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+ public final OperationCallable
+ * try (GameServerConfigsServiceClient gameServerConfigsServiceClient = GameServerConfigsServiceClient.create()) {
+ * GameServerDeploymentName parent = GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
+ * String configId = "";
+ * GameServerConfig gameServerConfig = GameServerConfig.newBuilder().build();
+ * CreateGameServerConfigRequest request = CreateGameServerConfigRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .setConfigId(configId)
+ * .setGameServerConfig(gameServerConfig)
+ * .build();
+ * OperationFuture<GameServerConfig, OperationMetadata> future = gameServerConfigsServiceClient.createGameServerConfigOperationCallable().futureCall(request);
+ * // Do something
+ * GameServerConfig response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallable
+ * try (GameServerConfigsServiceClient gameServerConfigsServiceClient = GameServerConfigsServiceClient.create()) {
+ * GameServerDeploymentName parent = GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
+ * String configId = "";
+ * GameServerConfig gameServerConfig = GameServerConfig.newBuilder().build();
+ * CreateGameServerConfigRequest request = CreateGameServerConfigRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .setConfigId(configId)
+ * .setGameServerConfig(gameServerConfig)
+ * .build();
+ * ApiFuture<Operation> future = gameServerConfigsServiceClient.createGameServerConfigCallable().futureCall(request);
+ * // Do something
+ * Operation response = future.get();
+ * }
+ *
+ *
+ * @param name Required. The name of the game server config to delete. Uses the form:
+ *
+ * try (GameServerConfigsServiceClient gameServerConfigsServiceClient = GameServerConfigsServiceClient.create()) {
+ * GameServerConfigName name = GameServerConfigName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[CONFIG]");
+ * gameServerConfigsServiceClient.deleteGameServerConfigAsync(name).get();
+ * }
+ *
+ *
+ * @param name Required. The name of the game server config to delete. Uses the form:
+ *
+ * try (GameServerConfigsServiceClient gameServerConfigsServiceClient = GameServerConfigsServiceClient.create()) {
+ * GameServerConfigName name = GameServerConfigName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[CONFIG]");
+ * gameServerConfigsServiceClient.deleteGameServerConfigAsync(name.toString()).get();
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFuture
+ * try (GameServerConfigsServiceClient gameServerConfigsServiceClient = GameServerConfigsServiceClient.create()) {
+ * GameServerConfigName name = GameServerConfigName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[CONFIG]");
+ * DeleteGameServerConfigRequest request = DeleteGameServerConfigRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * gameServerConfigsServiceClient.deleteGameServerConfigAsync(request).get();
+ * }
+ *
+ */
+ @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+ public final OperationCallable
+ * try (GameServerConfigsServiceClient gameServerConfigsServiceClient = GameServerConfigsServiceClient.create()) {
+ * GameServerConfigName name = GameServerConfigName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[CONFIG]");
+ * DeleteGameServerConfigRequest request = DeleteGameServerConfigRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * OperationFuture<Empty, OperationMetadata> future = gameServerConfigsServiceClient.deleteGameServerConfigOperationCallable().futureCall(request);
+ * // Do something
+ * future.get();
+ * }
+ *
+ */
+ public final UnaryCallable
+ * try (GameServerConfigsServiceClient gameServerConfigsServiceClient = GameServerConfigsServiceClient.create()) {
+ * GameServerConfigName name = GameServerConfigName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[CONFIG]");
+ * DeleteGameServerConfigRequest request = DeleteGameServerConfigRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * ApiFuture<Operation> future = gameServerConfigsServiceClient.deleteGameServerConfigCallable().futureCall(request);
+ * // Do something
+ * future.get();
+ * }
+ *
+ *
+ *
+ *
+ *
+ */
+@Generated("by gapic-generator")
+@BetaApi
+public class GameServerConfigsServiceSettings
+ extends ClientSettings
+ * GameServerConfigsServiceSettings.Builder gameServerConfigsServiceSettingsBuilder =
+ * GameServerConfigsServiceSettings.newBuilder();
+ * gameServerConfigsServiceSettingsBuilder
+ * .getGameServerConfigSettings()
+ * .setRetrySettings(
+ * gameServerConfigsServiceSettingsBuilder.getGameServerConfigSettings().getRetrySettings().toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * GameServerConfigsServiceSettings gameServerConfigsServiceSettings = gameServerConfigsServiceSettingsBuilder.build();
+ *
+ *
+ *
+ *
+ *
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * GameServerDeploymentName name = GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
+ * GameServerDeployment response = gameServerDeploymentsServiceClient.getGameServerDeployment(name);
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * To customize the endpoint:
+ *
+ *
+ * GameServerDeploymentsServiceSettings gameServerDeploymentsServiceSettings =
+ * GameServerDeploymentsServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
+ * GameServerDeploymentsServiceClient.create(gameServerDeploymentsServiceSettings);
+ *
+ *
+ *
+ */
+@Generated("by gapic-generator")
+@BetaApi
+public class GameServerDeploymentsServiceClient implements BackgroundResource {
+ private final GameServerDeploymentsServiceSettings settings;
+ private final GameServerDeploymentsServiceStub stub;
+ private final OperationsClient operationsClient;
+
+ /** Constructs an instance of GameServerDeploymentsServiceClient with default settings. */
+ public static final GameServerDeploymentsServiceClient create() throws IOException {
+ return create(GameServerDeploymentsServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of GameServerDeploymentsServiceClient, using the given settings. The
+ * channels are created based on the settings passed in, or defaults for any settings that are not
+ * set.
+ */
+ public static final GameServerDeploymentsServiceClient create(
+ GameServerDeploymentsServiceSettings settings) throws IOException {
+ return new GameServerDeploymentsServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of GameServerDeploymentsServiceClient, using the given stub for making
+ * calls. This is for advanced usage - prefer to use GameServerDeploymentsServiceSettings}.
+ */
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public static final GameServerDeploymentsServiceClient create(
+ GameServerDeploymentsServiceStub stub) {
+ return new GameServerDeploymentsServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of GameServerDeploymentsServiceClient, 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 GameServerDeploymentsServiceClient(GameServerDeploymentsServiceSettings settings)
+ throws IOException {
+ this.settings = settings;
+ this.stub =
+ ((GameServerDeploymentsServiceStubSettings) settings.getStubSettings()).createStub();
+ this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ protected GameServerDeploymentsServiceClient(GameServerDeploymentsServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ }
+
+ public final GameServerDeploymentsServiceSettings getSettings() {
+ return settings;
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public GameServerDeploymentsServiceStub getStub() {
+ return stub;
+ }
+
+ /**
+ * Returns the OperationsClient that can be used to query the status of a long-running operation
+ * returned by another API method call.
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationsClient getOperationsClient() {
+ return operationsClient;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists game server deployments in a given project and location.
+ *
+ *
+ * GameServerDeploymentsServiceSettings gameServerDeploymentsServiceSettings =
+ * GameServerDeploymentsServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
+ * GameServerDeploymentsServiceClient.create(gameServerDeploymentsServiceSettings);
+ *
+ *
+ *
+ * @param parent Required. The parent resource name. Uses the form:
+ * `projects/{project}/locations/{location}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListGameServerDeploymentsPagedResponse listGameServerDeployments(
+ LocationName parent) {
+ ListGameServerDeploymentsRequest request =
+ ListGameServerDeploymentsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listGameServerDeployments(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists game server deployments in a given project and location.
+ *
+ *
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (GameServerDeployment element : gameServerDeploymentsServiceClient.listGameServerDeployments(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name. Uses the form:
+ * `projects/{project}/locations/{location}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListGameServerDeploymentsPagedResponse listGameServerDeployments(String parent) {
+ ListGameServerDeploymentsRequest request =
+ ListGameServerDeploymentsRequest.newBuilder().setParent(parent).build();
+ return listGameServerDeployments(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists game server deployments in a given project and location.
+ *
+ *
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (GameServerDeployment element : gameServerDeploymentsServiceClient.listGameServerDeployments(parent.toString()).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListGameServerDeploymentsPagedResponse listGameServerDeployments(
+ ListGameServerDeploymentsRequest request) {
+ return listGameServerDeploymentsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists game server deployments in a given project and location.
+ *
+ *
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * ListGameServerDeploymentsRequest request = ListGameServerDeploymentsRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .build();
+ * for (GameServerDeployment element : gameServerDeploymentsServiceClient.listGameServerDeployments(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ */
+ public final UnaryCallable<
+ ListGameServerDeploymentsRequest, ListGameServerDeploymentsPagedResponse>
+ listGameServerDeploymentsPagedCallable() {
+ return stub.listGameServerDeploymentsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists game server deployments in a given project and location.
+ *
+ *
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * ListGameServerDeploymentsRequest request = ListGameServerDeploymentsRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .build();
+ * ApiFuture<ListGameServerDeploymentsPagedResponse> future = gameServerDeploymentsServiceClient.listGameServerDeploymentsPagedCallable().futureCall(request);
+ * // Do something
+ * for (GameServerDeployment element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ */
+ public final UnaryCallable
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * ListGameServerDeploymentsRequest request = ListGameServerDeploymentsRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .build();
+ * while (true) {
+ * ListGameServerDeploymentsResponse response = gameServerDeploymentsServiceClient.listGameServerDeploymentsCallable().call(request);
+ * for (GameServerDeployment element : response.getGameServerDeploymentsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ *
+ *
+ * @param name Required. The name of the game server delpoyment to retrieve. Uses the form:
+ *
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * GameServerDeploymentName name = GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
+ * GameServerDeployment response = gameServerDeploymentsServiceClient.getGameServerDeployment(name);
+ * }
+ *
+ *
+ * @param name Required. The name of the game server delpoyment to retrieve. Uses the form:
+ *
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * GameServerDeploymentName name = GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
+ * GameServerDeployment response = gameServerDeploymentsServiceClient.getGameServerDeployment(name.toString());
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GameServerDeployment getGameServerDeployment(
+ GetGameServerDeploymentRequest request) {
+ return getGameServerDeploymentCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets details of a single game server deployment.
+ *
+ *
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * GameServerDeploymentName name = GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
+ * GetGameServerDeploymentRequest request = GetGameServerDeploymentRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * GameServerDeployment response = gameServerDeploymentsServiceClient.getGameServerDeployment(request);
+ * }
+ *
+ */
+ public final UnaryCallable
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * GameServerDeploymentName name = GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
+ * GetGameServerDeploymentRequest request = GetGameServerDeploymentRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * ApiFuture<GameServerDeployment> future = gameServerDeploymentsServiceClient.getGameServerDeploymentCallable().futureCall(request);
+ * // Do something
+ * GameServerDeployment response = future.get();
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name. Uses the form:
+ * `projects/{project}/locations/{location}`.
+ * @param gameServerDeployment Required. The game server delpoyment resource to be created.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFuture
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * GameServerDeployment gameServerDeployment = GameServerDeployment.newBuilder().build();
+ * GameServerDeployment response = gameServerDeploymentsServiceClient.createGameServerDeploymentAsync(parent, gameServerDeployment).get();
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name. Uses the form:
+ * `projects/{project}/locations/{location}`.
+ * @param gameServerDeployment Required. The game server delpoyment resource to be created.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFuture
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * GameServerDeployment gameServerDeployment = GameServerDeployment.newBuilder().build();
+ * GameServerDeployment response = gameServerDeploymentsServiceClient.createGameServerDeploymentAsync(parent.toString(), gameServerDeployment).get();
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFuture
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * String deploymentId = "";
+ * GameServerDeployment gameServerDeployment = GameServerDeployment.newBuilder().build();
+ * CreateGameServerDeploymentRequest request = CreateGameServerDeploymentRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .setDeploymentId(deploymentId)
+ * .setGameServerDeployment(gameServerDeployment)
+ * .build();
+ * GameServerDeployment response = gameServerDeploymentsServiceClient.createGameServerDeploymentAsync(request).get();
+ * }
+ *
+ */
+ @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+ public final OperationCallable<
+ CreateGameServerDeploymentRequest, GameServerDeployment, OperationMetadata>
+ createGameServerDeploymentOperationCallable() {
+ return stub.createGameServerDeploymentOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a new game server deployment in a given project and location.
+ *
+ *
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * String deploymentId = "";
+ * GameServerDeployment gameServerDeployment = GameServerDeployment.newBuilder().build();
+ * CreateGameServerDeploymentRequest request = CreateGameServerDeploymentRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .setDeploymentId(deploymentId)
+ * .setGameServerDeployment(gameServerDeployment)
+ * .build();
+ * OperationFuture<GameServerDeployment, OperationMetadata> future = gameServerDeploymentsServiceClient.createGameServerDeploymentOperationCallable().futureCall(request);
+ * // Do something
+ * GameServerDeployment response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallable
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * String deploymentId = "";
+ * GameServerDeployment gameServerDeployment = GameServerDeployment.newBuilder().build();
+ * CreateGameServerDeploymentRequest request = CreateGameServerDeploymentRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .setDeploymentId(deploymentId)
+ * .setGameServerDeployment(gameServerDeployment)
+ * .build();
+ * ApiFuture<Operation> future = gameServerDeploymentsServiceClient.createGameServerDeploymentCallable().futureCall(request);
+ * // Do something
+ * Operation response = future.get();
+ * }
+ *
+ *
+ * @param name Required. The name of the game server delpoyment to delete. Uses the form:
+ *
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * GameServerDeploymentName name = GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
+ * gameServerDeploymentsServiceClient.deleteGameServerDeploymentAsync(name).get();
+ * }
+ *
+ *
+ * @param name Required. The name of the game server delpoyment to delete. Uses the form:
+ *
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * GameServerDeploymentName name = GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
+ * gameServerDeploymentsServiceClient.deleteGameServerDeploymentAsync(name.toString()).get();
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFuture
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * GameServerDeploymentName name = GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
+ * DeleteGameServerDeploymentRequest request = DeleteGameServerDeploymentRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * gameServerDeploymentsServiceClient.deleteGameServerDeploymentAsync(request).get();
+ * }
+ *
+ */
+ @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+ public final OperationCallable
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * GameServerDeploymentName name = GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
+ * DeleteGameServerDeploymentRequest request = DeleteGameServerDeploymentRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * OperationFuture<Empty, OperationMetadata> future = gameServerDeploymentsServiceClient.deleteGameServerDeploymentOperationCallable().futureCall(request);
+ * // Do something
+ * future.get();
+ * }
+ *
+ */
+ public final UnaryCallable
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * GameServerDeploymentName name = GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
+ * DeleteGameServerDeploymentRequest request = DeleteGameServerDeploymentRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * ApiFuture<Operation> future = gameServerDeploymentsServiceClient.deleteGameServerDeploymentCallable().futureCall(request);
+ * // Do something
+ * future.get();
+ * }
+ *
+ *
+ * @param gameServerDeployment Required. The game server delpoyment to be updated. Only fields
+ * specified in update_mask are updated.
+ * @param updateMask Required. Mask of fields to update. At least one path must be supplied in
+ * this field. For the `FieldMask` definition, see
+ *
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * GameServerDeployment gameServerDeployment = GameServerDeployment.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * GameServerDeployment response = gameServerDeploymentsServiceClient.updateGameServerDeploymentAsync(gameServerDeployment, updateMask).get();
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFuture
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * GameServerDeployment gameServerDeployment = GameServerDeployment.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * UpdateGameServerDeploymentRequest request = UpdateGameServerDeploymentRequest.newBuilder()
+ * .setGameServerDeployment(gameServerDeployment)
+ * .setUpdateMask(updateMask)
+ * .build();
+ * GameServerDeployment response = gameServerDeploymentsServiceClient.updateGameServerDeploymentAsync(request).get();
+ * }
+ *
+ */
+ @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+ public final OperationCallable<
+ UpdateGameServerDeploymentRequest, GameServerDeployment, OperationMetadata>
+ updateGameServerDeploymentOperationCallable() {
+ return stub.updateGameServerDeploymentOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Patches a game server deployment.
+ *
+ *
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * GameServerDeployment gameServerDeployment = GameServerDeployment.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * UpdateGameServerDeploymentRequest request = UpdateGameServerDeploymentRequest.newBuilder()
+ * .setGameServerDeployment(gameServerDeployment)
+ * .setUpdateMask(updateMask)
+ * .build();
+ * OperationFuture<GameServerDeployment, OperationMetadata> future = gameServerDeploymentsServiceClient.updateGameServerDeploymentOperationCallable().futureCall(request);
+ * // Do something
+ * GameServerDeployment response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallable
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * GameServerDeployment gameServerDeployment = GameServerDeployment.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * UpdateGameServerDeploymentRequest request = UpdateGameServerDeploymentRequest.newBuilder()
+ * .setGameServerDeployment(gameServerDeployment)
+ * .setUpdateMask(updateMask)
+ * .build();
+ * ApiFuture<Operation> future = gameServerDeploymentsServiceClient.updateGameServerDeploymentCallable().futureCall(request);
+ * // Do something
+ * Operation response = future.get();
+ * }
+ *
+ *
+ * @param name Required. The name of the game server delpoyment to retrieve. Uses the form:
+ *
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * GameServerDeploymentName name = GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
+ * GameServerDeploymentRollout response = gameServerDeploymentsServiceClient.getGameServerDeploymentRollout(name);
+ * }
+ *
+ *
+ * @param name Required. The name of the game server delpoyment to retrieve. Uses the form:
+ *
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * GameServerDeploymentName name = GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
+ * GameServerDeploymentRollout response = gameServerDeploymentsServiceClient.getGameServerDeploymentRollout(name.toString());
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GameServerDeploymentRollout getGameServerDeploymentRollout(
+ GetGameServerDeploymentRolloutRequest request) {
+ return getGameServerDeploymentRolloutCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets details a single game server deployment rollout.
+ *
+ *
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * GameServerDeploymentName name = GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
+ * GetGameServerDeploymentRolloutRequest request = GetGameServerDeploymentRolloutRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * GameServerDeploymentRollout response = gameServerDeploymentsServiceClient.getGameServerDeploymentRollout(request);
+ * }
+ *
+ */
+ public final UnaryCallable
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * GameServerDeploymentName name = GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
+ * GetGameServerDeploymentRolloutRequest request = GetGameServerDeploymentRolloutRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * ApiFuture<GameServerDeploymentRollout> future = gameServerDeploymentsServiceClient.getGameServerDeploymentRolloutCallable().futureCall(request);
+ * // Do something
+ * GameServerDeploymentRollout response = future.get();
+ * }
+ *
+ *
+ * @param rollout Required. The game server delpoyment rollout to be updated. Only fields
+ * specified in update_mask are updated.
+ * @param updateMask Required. Mask of fields to update. At least one path must be supplied in
+ * this field. For the `FieldMask` definition, see
+ *
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * GameServerDeploymentRollout rollout = GameServerDeploymentRollout.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * GameServerDeployment response = gameServerDeploymentsServiceClient.updateGameServerDeploymentRolloutAsync(rollout, updateMask).get();
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFuture
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * GameServerDeploymentRollout rollout = GameServerDeploymentRollout.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * UpdateGameServerDeploymentRolloutRequest request = UpdateGameServerDeploymentRolloutRequest.newBuilder()
+ * .setRollout(rollout)
+ * .setUpdateMask(updateMask)
+ * .build();
+ * GameServerDeployment response = gameServerDeploymentsServiceClient.updateGameServerDeploymentRolloutAsync(request).get();
+ * }
+ *
+ */
+ @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+ public final OperationCallable<
+ UpdateGameServerDeploymentRolloutRequest, GameServerDeployment, OperationMetadata>
+ updateGameServerDeploymentRolloutOperationCallable() {
+ return stub.updateGameServerDeploymentRolloutOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Patches a single game server deployment rollout. The method will not return an error if the
+ * update does not affect any existing realms. For example - if the default_game_server_config is
+ * changed but all existing realms use the override, that is valid. Similarly, if a non existing
+ * realm is explicitly called out in game_server_config_overrides field, that will also not result
+ * in an error.
+ *
+ *
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * GameServerDeploymentRollout rollout = GameServerDeploymentRollout.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * UpdateGameServerDeploymentRolloutRequest request = UpdateGameServerDeploymentRolloutRequest.newBuilder()
+ * .setRollout(rollout)
+ * .setUpdateMask(updateMask)
+ * .build();
+ * OperationFuture<GameServerDeployment, OperationMetadata> future = gameServerDeploymentsServiceClient.updateGameServerDeploymentRolloutOperationCallable().futureCall(request);
+ * // Do something
+ * GameServerDeployment response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallable
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * GameServerDeploymentRollout rollout = GameServerDeploymentRollout.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * UpdateGameServerDeploymentRolloutRequest request = UpdateGameServerDeploymentRolloutRequest.newBuilder()
+ * .setRollout(rollout)
+ * .setUpdateMask(updateMask)
+ * .build();
+ * ApiFuture<Operation> future = gameServerDeploymentsServiceClient.updateGameServerDeploymentRolloutCallable().futureCall(request);
+ * // Do something
+ * Operation response = future.get();
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final PreviewGameServerDeploymentRolloutResponse previewGameServerDeploymentRollout(
+ PreviewGameServerDeploymentRolloutRequest request) {
+ return previewGameServerDeploymentRolloutCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Previews the game server deployment rollout. This API does not mutate the rollout resource.
+ *
+ *
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * GameServerDeploymentRollout rollout = GameServerDeploymentRollout.newBuilder().build();
+ * PreviewGameServerDeploymentRolloutRequest request = PreviewGameServerDeploymentRolloutRequest.newBuilder()
+ * .setRollout(rollout)
+ * .build();
+ * PreviewGameServerDeploymentRolloutResponse response = gameServerDeploymentsServiceClient.previewGameServerDeploymentRollout(request);
+ * }
+ *
+ */
+ public final UnaryCallable<
+ PreviewGameServerDeploymentRolloutRequest, PreviewGameServerDeploymentRolloutResponse>
+ previewGameServerDeploymentRolloutCallable() {
+ return stub.previewGameServerDeploymentRolloutCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Retrieves information about the current state of the game server deployment. Gathers all the
+ * Agones fleets and Agones autoscalers, including fleets running an older version of the game
+ * server deployment.
+ *
+ *
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * GameServerDeploymentRollout rollout = GameServerDeploymentRollout.newBuilder().build();
+ * PreviewGameServerDeploymentRolloutRequest request = PreviewGameServerDeploymentRolloutRequest.newBuilder()
+ * .setRollout(rollout)
+ * .build();
+ * ApiFuture<PreviewGameServerDeploymentRolloutResponse> future = gameServerDeploymentsServiceClient.previewGameServerDeploymentRolloutCallable().futureCall(request);
+ * // Do something
+ * PreviewGameServerDeploymentRolloutResponse response = future.get();
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final FetchDeploymentStateResponse fetchDeploymentState(
+ FetchDeploymentStateRequest request) {
+ return fetchDeploymentStateCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Retrieves information about the current state of the game server deployment. Gathers all the
+ * Agones fleets and Agones autoscalers, including fleets running an older version of the game
+ * server deployment.
+ *
+ *
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * String name = "";
+ * FetchDeploymentStateRequest request = FetchDeploymentStateRequest.newBuilder()
+ * .setName(name)
+ * .build();
+ * FetchDeploymentStateResponse response = gameServerDeploymentsServiceClient.fetchDeploymentState(request);
+ * }
+ *
+ */
+ public final UnaryCallable
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * String name = "";
+ * FetchDeploymentStateRequest request = FetchDeploymentStateRequest.newBuilder()
+ * .setName(name)
+ * .build();
+ * ApiFuture<FetchDeploymentStateResponse> future = gameServerDeploymentsServiceClient.fetchDeploymentStateCallable().futureCall(request);
+ * // Do something
+ * FetchDeploymentStateResponse response = future.get();
+ * }
+ *
+ *
+ *
+ *
+ *
+ */
+@Generated("by gapic-generator")
+@BetaApi
+public class GameServerDeploymentsServiceSettings
+ extends ClientSettings
+ * GameServerDeploymentsServiceSettings.Builder gameServerDeploymentsServiceSettingsBuilder =
+ * GameServerDeploymentsServiceSettings.newBuilder();
+ * gameServerDeploymentsServiceSettingsBuilder
+ * .getGameServerDeploymentSettings()
+ * .setRetrySettings(
+ * gameServerDeploymentsServiceSettingsBuilder.getGameServerDeploymentSettings().getRetrySettings().toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * GameServerDeploymentsServiceSettings gameServerDeploymentsServiceSettings = gameServerDeploymentsServiceSettingsBuilder.build();
+ *
+ *
+ *
+ *
+ *
+ * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
+ * RealmName name = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]");
+ * Realm response = realmsServiceClient.getRealm(name);
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * To customize the endpoint:
+ *
+ *
+ * RealmsServiceSettings realmsServiceSettings =
+ * RealmsServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * RealmsServiceClient realmsServiceClient =
+ * RealmsServiceClient.create(realmsServiceSettings);
+ *
+ *
+ *
+ */
+@Generated("by gapic-generator")
+@BetaApi
+public class RealmsServiceClient implements BackgroundResource {
+ private final RealmsServiceSettings settings;
+ private final RealmsServiceStub stub;
+ private final OperationsClient operationsClient;
+
+ /** Constructs an instance of RealmsServiceClient with default settings. */
+ public static final RealmsServiceClient create() throws IOException {
+ return create(RealmsServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of RealmsServiceClient, using the given settings. The channels are
+ * created based on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final RealmsServiceClient create(RealmsServiceSettings settings)
+ throws IOException {
+ return new RealmsServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of RealmsServiceClient, using the given stub for making calls. This is
+ * for advanced usage - prefer to use RealmsServiceSettings}.
+ */
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public static final RealmsServiceClient create(RealmsServiceStub stub) {
+ return new RealmsServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of RealmsServiceClient, 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 RealmsServiceClient(RealmsServiceSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((RealmsServiceStubSettings) settings.getStubSettings()).createStub();
+ this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ protected RealmsServiceClient(RealmsServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ }
+
+ public final RealmsServiceSettings getSettings() {
+ return settings;
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public RealmsServiceStub getStub() {
+ return stub;
+ }
+
+ /**
+ * Returns the OperationsClient that can be used to query the status of a long-running operation
+ * returned by another API method call.
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationsClient getOperationsClient() {
+ return operationsClient;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists realms in a given project and location.
+ *
+ *
+ * RealmsServiceSettings realmsServiceSettings =
+ * RealmsServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * RealmsServiceClient realmsServiceClient =
+ * RealmsServiceClient.create(realmsServiceSettings);
+ *
+ *
+ *
+ * @param parent Required. The parent resource name. Uses the form:
+ * `projects/{project}/locations/{location}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListRealmsPagedResponse listRealms(LocationName parent) {
+ ListRealmsRequest request =
+ ListRealmsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build();
+ return listRealms(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists realms in a given project and location.
+ *
+ *
+ * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Realm element : realmsServiceClient.listRealms(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name. Uses the form:
+ * `projects/{project}/locations/{location}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListRealmsPagedResponse listRealms(String parent) {
+ ListRealmsRequest request = ListRealmsRequest.newBuilder().setParent(parent).build();
+ return listRealms(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists realms in a given project and location.
+ *
+ *
+ * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Realm element : realmsServiceClient.listRealms(parent.toString()).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListRealmsPagedResponse listRealms(ListRealmsRequest request) {
+ return listRealmsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists realms in a given project and location.
+ *
+ *
+ * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * ListRealmsRequest request = ListRealmsRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .build();
+ * for (Realm element : realmsServiceClient.listRealms(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ */
+ public final UnaryCallable
+ * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * ListRealmsRequest request = ListRealmsRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .build();
+ * ApiFuture<ListRealmsPagedResponse> future = realmsServiceClient.listRealmsPagedCallable().futureCall(request);
+ * // Do something
+ * for (Realm element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ */
+ public final UnaryCallable
+ * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * ListRealmsRequest request = ListRealmsRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .build();
+ * while (true) {
+ * ListRealmsResponse response = realmsServiceClient.listRealmsCallable().call(request);
+ * for (Realm element : response.getRealmsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ *
+ *
+ * @param name Required. The name of the realm to retrieve. Uses the form:
+ * `projects/{project}/locations/{location}/realms/{realm}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Realm getRealm(RealmName name) {
+ GetRealmRequest request =
+ GetRealmRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getRealm(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets details of a single realm.
+ *
+ *
+ * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
+ * RealmName name = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]");
+ * Realm response = realmsServiceClient.getRealm(name);
+ * }
+ *
+ *
+ * @param name Required. The name of the realm to retrieve. Uses the form:
+ * `projects/{project}/locations/{location}/realms/{realm}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Realm getRealm(String name) {
+ GetRealmRequest request = GetRealmRequest.newBuilder().setName(name).build();
+ return getRealm(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets details of a single realm.
+ *
+ *
+ * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
+ * RealmName name = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]");
+ * Realm response = realmsServiceClient.getRealm(name.toString());
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Realm getRealm(GetRealmRequest request) {
+ return getRealmCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets details of a single realm.
+ *
+ *
+ * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
+ * RealmName name = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]");
+ * GetRealmRequest request = GetRealmRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * Realm response = realmsServiceClient.getRealm(request);
+ * }
+ *
+ */
+ public final UnaryCallable
+ * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
+ * RealmName name = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]");
+ * GetRealmRequest request = GetRealmRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * ApiFuture<Realm> future = realmsServiceClient.getRealmCallable().futureCall(request);
+ * // Do something
+ * Realm response = future.get();
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name. Uses the form:
+ * `projects/{project}/locations/{location}`.
+ * @param realm Required. The realm resource to be created.
+ * @param realmId Required. The ID of the realm resource to be created.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFuture
+ * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * Realm realm = Realm.newBuilder().build();
+ * String realmId = "";
+ * Realm response = realmsServiceClient.createRealmAsync(parent, realm, realmId).get();
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name. Uses the form:
+ * `projects/{project}/locations/{location}`.
+ * @param realm Required. The realm resource to be created.
+ * @param realmId Required. The ID of the realm resource to be created.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFuture
+ * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * Realm realm = Realm.newBuilder().build();
+ * String realmId = "";
+ * Realm response = realmsServiceClient.createRealmAsync(parent.toString(), realm, realmId).get();
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFuture
+ * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * String realmId = "";
+ * Realm realm = Realm.newBuilder().build();
+ * CreateRealmRequest request = CreateRealmRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .setRealmId(realmId)
+ * .setRealm(realm)
+ * .build();
+ * Realm response = realmsServiceClient.createRealmAsync(request).get();
+ * }
+ *
+ */
+ @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+ public final OperationCallable
+ * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * String realmId = "";
+ * Realm realm = Realm.newBuilder().build();
+ * CreateRealmRequest request = CreateRealmRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .setRealmId(realmId)
+ * .setRealm(realm)
+ * .build();
+ * OperationFuture<Realm, OperationMetadata> future = realmsServiceClient.createRealmOperationCallable().futureCall(request);
+ * // Do something
+ * Realm response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallable
+ * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * String realmId = "";
+ * Realm realm = Realm.newBuilder().build();
+ * CreateRealmRequest request = CreateRealmRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .setRealmId(realmId)
+ * .setRealm(realm)
+ * .build();
+ * ApiFuture<Operation> future = realmsServiceClient.createRealmCallable().futureCall(request);
+ * // Do something
+ * Operation response = future.get();
+ * }
+ *
+ *
+ * @param name Required. The name of the realm to delete. Uses the form:
+ * `projects/{project}/locations/{location}/realms/{realm}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFuture
+ * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
+ * RealmName name = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]");
+ * realmsServiceClient.deleteRealmAsync(name).get();
+ * }
+ *
+ *
+ * @param name Required. The name of the realm to delete. Uses the form:
+ * `projects/{project}/locations/{location}/realms/{realm}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFuture
+ * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
+ * RealmName name = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]");
+ * realmsServiceClient.deleteRealmAsync(name.toString()).get();
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFuture
+ * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
+ * RealmName name = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]");
+ * DeleteRealmRequest request = DeleteRealmRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * realmsServiceClient.deleteRealmAsync(request).get();
+ * }
+ *
+ */
+ @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+ public final OperationCallable
+ * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
+ * RealmName name = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]");
+ * DeleteRealmRequest request = DeleteRealmRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * OperationFuture<Empty, OperationMetadata> future = realmsServiceClient.deleteRealmOperationCallable().futureCall(request);
+ * // Do something
+ * future.get();
+ * }
+ *
+ */
+ public final UnaryCallable
+ * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
+ * RealmName name = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]");
+ * DeleteRealmRequest request = DeleteRealmRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * ApiFuture<Operation> future = realmsServiceClient.deleteRealmCallable().futureCall(request);
+ * // Do something
+ * future.get();
+ * }
+ *
+ *
+ * @param realm Required. The realm to be updated. Only fields specified in update_mask are
+ * updated.
+ * @param updateMask Required. The update mask applies to the resource. For the `FieldMask`
+ * definition, see
+ *
+ * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
+ * Realm realm = Realm.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Realm response = realmsServiceClient.updateRealmAsync(realm, updateMask).get();
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFuture
+ * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
+ * Realm realm = Realm.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * UpdateRealmRequest request = UpdateRealmRequest.newBuilder()
+ * .setRealm(realm)
+ * .setUpdateMask(updateMask)
+ * .build();
+ * Realm response = realmsServiceClient.updateRealmAsync(request).get();
+ * }
+ *
+ */
+ @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+ public final OperationCallable
+ * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
+ * Realm realm = Realm.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * UpdateRealmRequest request = UpdateRealmRequest.newBuilder()
+ * .setRealm(realm)
+ * .setUpdateMask(updateMask)
+ * .build();
+ * OperationFuture<Realm, OperationMetadata> future = realmsServiceClient.updateRealmOperationCallable().futureCall(request);
+ * // Do something
+ * Realm response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallable
+ * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
+ * Realm realm = Realm.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * UpdateRealmRequest request = UpdateRealmRequest.newBuilder()
+ * .setRealm(realm)
+ * .setUpdateMask(updateMask)
+ * .build();
+ * ApiFuture<Operation> future = realmsServiceClient.updateRealmCallable().futureCall(request);
+ * // Do something
+ * Operation response = future.get();
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final PreviewRealmUpdateResponse previewRealmUpdate(PreviewRealmUpdateRequest request) {
+ return previewRealmUpdateCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Previews patches to a single realm.
+ *
+ *
+ * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
+ * Realm realm = Realm.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * PreviewRealmUpdateRequest request = PreviewRealmUpdateRequest.newBuilder()
+ * .setRealm(realm)
+ * .setUpdateMask(updateMask)
+ * .build();
+ * PreviewRealmUpdateResponse response = realmsServiceClient.previewRealmUpdate(request);
+ * }
+ *
+ */
+ public final UnaryCallable
+ * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
+ * Realm realm = Realm.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * PreviewRealmUpdateRequest request = PreviewRealmUpdateRequest.newBuilder()
+ * .setRealm(realm)
+ * .setUpdateMask(updateMask)
+ * .build();
+ * ApiFuture<PreviewRealmUpdateResponse> future = realmsServiceClient.previewRealmUpdateCallable().futureCall(request);
+ * // Do something
+ * PreviewRealmUpdateResponse response = future.get();
+ * }
+ *
+ *
+ *
+ *
+ *
+ */
+@Generated("by gapic-generator")
+@BetaApi
+public class RealmsServiceSettings extends ClientSettings
+ * RealmsServiceSettings.Builder realmsServiceSettingsBuilder =
+ * RealmsServiceSettings.newBuilder();
+ * realmsServiceSettingsBuilder
+ * .getRealmSettings()
+ * .setRetrySettings(
+ * realmsServiceSettingsBuilder.getRealmSettings().getRetrySettings().toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * RealmsServiceSettings realmsServiceSettings = realmsServiceSettingsBuilder.build();
+ *
+ *
+ *
+ *
+ * ============================== GameServerConfigsServiceClient ==============================
+ *
+ *
+ * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
+ * GameServerClusterName name = GameServerClusterName.of("[PROJECT]", "[LOCATION]", "[REALM]", "[CLUSTER]");
+ * GameServerCluster response = gameServerClustersServiceClient.getGameServerCluster(name);
+ * }
+ *
+ *
+ *
+ *
+ * ================================== GameServerDeploymentsServiceClient
+ * ==================================
+ *
+ *
+ * try (GameServerConfigsServiceClient gameServerConfigsServiceClient = GameServerConfigsServiceClient.create()) {
+ * GameServerConfigName name = GameServerConfigName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[CONFIG]");
+ * GameServerConfig response = gameServerConfigsServiceClient.getGameServerConfig(name);
+ * }
+ *
+ *
+ *
+ *
+ * =================== RealmsServiceClient ===================
+ *
+ *
+ * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
+ * GameServerDeploymentName name = GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
+ * GameServerDeployment response = gameServerDeploymentsServiceClient.getGameServerDeployment(name);
+ * }
+ *
+ *
+ *
+ */
+@Generated("by gapic-generator")
+package com.google.cloud.gaming.v1beta;
+
+import javax.annotation.Generated;
diff --git a/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1beta/stub/GameServerClustersServiceStub.java b/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1beta/stub/GameServerClustersServiceStub.java
new file mode 100644
index 00000000..5d51f73d
--- /dev/null
+++ b/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1beta/stub/GameServerClustersServiceStub.java
@@ -0,0 +1,133 @@
+/*
+ * Copyright 2020 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.v1beta.stub;
+
+import static com.google.cloud.gaming.v1beta.GameServerClustersServiceClient.ListGameServerClustersPagedResponse;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.gaming.v1beta.CreateGameServerClusterRequest;
+import com.google.cloud.gaming.v1beta.DeleteGameServerClusterRequest;
+import com.google.cloud.gaming.v1beta.GameServerCluster;
+import com.google.cloud.gaming.v1beta.GetGameServerClusterRequest;
+import com.google.cloud.gaming.v1beta.ListGameServerClustersRequest;
+import com.google.cloud.gaming.v1beta.ListGameServerClustersResponse;
+import com.google.cloud.gaming.v1beta.OperationMetadata;
+import com.google.cloud.gaming.v1beta.PreviewCreateGameServerClusterRequest;
+import com.google.cloud.gaming.v1beta.PreviewCreateGameServerClusterResponse;
+import com.google.cloud.gaming.v1beta.PreviewDeleteGameServerClusterRequest;
+import com.google.cloud.gaming.v1beta.PreviewDeleteGameServerClusterResponse;
+import com.google.cloud.gaming.v1beta.PreviewUpdateGameServerClusterRequest;
+import com.google.cloud.gaming.v1beta.PreviewUpdateGameServerClusterResponse;
+import com.google.cloud.gaming.v1beta.UpdateGameServerClusterRequest;
+import com.google.longrunning.Operation;
+import com.google.longrunning.stub.OperationsStub;
+import com.google.protobuf.Empty;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS
+/**
+ * Base stub class for Game Services API.
+ *
+ *
+ * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
+ * RealmName name = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]");
+ * Realm response = realmsServiceClient.getRealm(name);
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ */
+@Generated("by gapic-generator")
+@BetaApi
+public class GameServerClustersServiceStubSettings
+ extends StubSettings
+ * GameServerClustersServiceStubSettings.Builder gameServerClustersServiceSettingsBuilder =
+ * GameServerClustersServiceStubSettings.newBuilder();
+ * gameServerClustersServiceSettingsBuilder
+ * .getGameServerClusterSettings()
+ * .setRetrySettings(
+ * gameServerClustersServiceSettingsBuilder.getGameServerClusterSettings().getRetrySettings().toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * GameServerClustersServiceStubSettings gameServerClustersServiceSettings = gameServerClustersServiceSettingsBuilder.build();
+ *
+ *