diff --git a/google-cloud-gameservices-bom/pom.xml b/google-cloud-gameservices-bom/pom.xml
deleted file mode 100644
index 0df5d456..00000000
--- a/google-cloud-gameservices-bom/pom.xml
+++ /dev/null
@@ -1,93 +0,0 @@
-
-
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()) {
- * String formattedName = GameServerClustersServiceClient.formatGameServerClusterName("[PROJECT]", "[LOCATION]", "[REALM]", "[GAME_SERVER_CLUSTER]");
- * GameServerCluster response = gameServerClustersServiceClient.getGameServerCluster(formattedName);
- * }
- *
- *
- *
- * 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;
-
- private static final PathTemplate GAME_SERVER_CLUSTER_PATH_TEMPLATE =
- PathTemplate.createWithoutUrlEncoding(
- "projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{game_server_cluster}");
-
- private static final PathTemplate REALM_PATH_TEMPLATE =
- PathTemplate.createWithoutUrlEncoding(
- "projects/{project}/locations/{location}/realms/{realm}");
-
- /**
- * Formats a string containing the fully-qualified path to represent a game_server_cluster
- * resource.
- *
- * @deprecated Use the {@link GameServerClusterName} class instead.
- */
- @Deprecated
- public static final String formatGameServerClusterName(
- String project, String location, String realm, String gameServerCluster) {
- return GAME_SERVER_CLUSTER_PATH_TEMPLATE.instantiate(
- "project", project,
- "location", location,
- "realm", realm,
- "game_server_cluster", gameServerCluster);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a realm resource.
- *
- * @deprecated Use the {@link RealmName} class instead.
- */
- @Deprecated
- public static final String formatRealmName(String project, String location, String realm) {
- return REALM_PATH_TEMPLATE.instantiate(
- "project", project,
- "location", location,
- "realm", realm);
- }
-
- /**
- * Parses the project from the given fully-qualified path which represents a game_server_cluster
- * resource.
- *
- * @deprecated Use the {@link GameServerClusterName} class instead.
- */
- @Deprecated
- public static final String parseProjectFromGameServerClusterName(String gameServerClusterName) {
- return GAME_SERVER_CLUSTER_PATH_TEMPLATE.parse(gameServerClusterName).get("project");
- }
-
- /**
- * Parses the location from the given fully-qualified path which represents a game_server_cluster
- * resource.
- *
- * @deprecated Use the {@link GameServerClusterName} class instead.
- */
- @Deprecated
- public static final String parseLocationFromGameServerClusterName(String gameServerClusterName) {
- return GAME_SERVER_CLUSTER_PATH_TEMPLATE.parse(gameServerClusterName).get("location");
- }
-
- /**
- * Parses the realm from the given fully-qualified path which represents a game_server_cluster
- * resource.
- *
- * @deprecated Use the {@link GameServerClusterName} class instead.
- */
- @Deprecated
- public static final String parseRealmFromGameServerClusterName(String gameServerClusterName) {
- return GAME_SERVER_CLUSTER_PATH_TEMPLATE.parse(gameServerClusterName).get("realm");
- }
-
- /**
- * Parses the game_server_cluster from the given fully-qualified path which represents a
- * game_server_cluster resource.
- *
- * @deprecated Use the {@link GameServerClusterName} class instead.
- */
- @Deprecated
- public static final String parseGameServerClusterFromGameServerClusterName(
- String gameServerClusterName) {
- return GAME_SERVER_CLUSTER_PATH_TEMPLATE
- .parse(gameServerClusterName)
- .get("game_server_cluster");
- }
-
- /**
- * Parses the project from the given fully-qualified path which represents a realm resource.
- *
- * @deprecated Use the {@link RealmName} class instead.
- */
- @Deprecated
- public static final String parseProjectFromRealmName(String realmName) {
- return REALM_PATH_TEMPLATE.parse(realmName).get("project");
- }
-
- /**
- * Parses the location from the given fully-qualified path which represents a realm resource.
- *
- * @deprecated Use the {@link RealmName} class instead.
- */
- @Deprecated
- public static final String parseLocationFromRealmName(String realmName) {
- return REALM_PATH_TEMPLATE.parse(realmName).get("location");
- }
-
- /**
- * Parses the realm from the given fully-qualified path which represents a realm resource.
- *
- * @deprecated Use the {@link RealmName} class instead.
- */
- @Deprecated
- public static final String parseRealmFromRealmName(String realmName) {
- return REALM_PATH_TEMPLATE.parse(realmName).get("realm");
- }
-
- /** 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()) {
- * String formattedParent = GameServerClustersServiceClient.formatRealmName("[PROJECT]", "[LOCATION]", "[REALM]");
- * for (GameServerCluster element : gameServerClustersServiceClient.listGameServerClusters(formattedParent).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
- *
- * @param parent Required. The parent resource name, using the form:
- * "projects/{project}/locations/{location}/realms/{realm-id}".
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListGameServerClustersPagedResponse listGameServerClusters(String parent) {
- REALM_PATH_TEMPLATE.validate(parent, "listGameServerClusters");
- 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()) {
- * String formattedParent = GameServerClustersServiceClient.formatRealmName("[PROJECT]", "[LOCATION]", "[REALM]");
- * ListGameServerClustersRequest request = ListGameServerClustersRequest.newBuilder()
- * .setParent(formattedParent)
- * .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()) {
- * String formattedParent = GameServerClustersServiceClient.formatRealmName("[PROJECT]", "[LOCATION]", "[REALM]");
- * ListGameServerClustersRequest request = ListGameServerClustersRequest.newBuilder()
- * .setParent(formattedParent)
- * .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()) {
- * String formattedParent = GameServerClustersServiceClient.formatRealmName("[PROJECT]", "[LOCATION]", "[REALM]");
- * ListGameServerClustersRequest request = ListGameServerClustersRequest.newBuilder()
- * .setParent(formattedParent)
- * .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()) {
- * String formattedName = GameServerClustersServiceClient.formatGameServerClusterName("[PROJECT]", "[LOCATION]", "[REALM]", "[GAME_SERVER_CLUSTER]");
- * GameServerCluster response = gameServerClustersServiceClient.getGameServerCluster(formattedName);
- * }
- *
- *
- * @param name Required. The name of the game server cluster to retrieve, using 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) { - GAME_SERVER_CLUSTER_PATH_TEMPLATE.validate(name, "getGameServerCluster"); - 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()) {
- * String formattedName = GameServerClustersServiceClient.formatGameServerClusterName("[PROJECT]", "[LOCATION]", "[REALM]", "[GAME_SERVER_CLUSTER]");
- * GetGameServerClusterRequest request = GetGameServerClusterRequest.newBuilder()
- * .setName(formattedName)
- * .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()) {
- * String formattedName = GameServerClustersServiceClient.formatGameServerClusterName("[PROJECT]", "[LOCATION]", "[REALM]", "[GAME_SERVER_CLUSTER]");
- * GetGameServerClusterRequest request = GetGameServerClusterRequest.newBuilder()
- * .setName(formattedName)
- * .build();
- * ApiFuture<GameServerCluster> future = gameServerClustersServiceClient.getGameServerClusterCallable().futureCall(request);
- * // Do something
- * GameServerCluster response = future.get();
- * }
- *
- */
- public final UnaryCallableSample code: - * - *
- * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
- * String formattedParent = GameServerClustersServiceClient.formatRealmName("[PROJECT]", "[LOCATION]", "[REALM]");
- * String gameServerClusterId = "";
- * GameServerCluster gameServerCluster = GameServerCluster.newBuilder().build();
- * GameServerCluster response = gameServerClustersServiceClient.createGameServerClusterAsync(formattedParent, gameServerClusterId, gameServerCluster).get();
- * }
- *
- *
- * @param parent Required. The parent resource name, using the form:
- * `projects/{project}/locations/{location}/realms/{realm-id}`.
- * @param gameServerClusterId Required. The ID of the game server cluster resource to be created.
- * @param gameServerCluster Required. 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()) {
- * String formattedParent = GameServerClustersServiceClient.formatRealmName("[PROJECT]", "[LOCATION]", "[REALM]");
- * String gameServerClusterId = "";
- * GameServerCluster gameServerCluster = GameServerCluster.newBuilder().build();
- * CreateGameServerClusterRequest request = CreateGameServerClusterRequest.newBuilder()
- * .setParent(formattedParent)
- * .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()) {
- * String formattedParent = GameServerClustersServiceClient.formatRealmName("[PROJECT]", "[LOCATION]", "[REALM]");
- * String gameServerClusterId = "";
- * GameServerCluster gameServerCluster = GameServerCluster.newBuilder().build();
- * CreateGameServerClusterRequest request = CreateGameServerClusterRequest.newBuilder()
- * .setParent(formattedParent)
- * .setGameServerClusterId(gameServerClusterId)
- * .setGameServerCluster(gameServerCluster)
- * .build();
- * OperationFuture<GameServerCluster, Empty> 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 OperationCallableSample code: - * - *
- * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
- * String formattedParent = GameServerClustersServiceClient.formatRealmName("[PROJECT]", "[LOCATION]", "[REALM]");
- * String gameServerClusterId = "";
- * GameServerCluster gameServerCluster = GameServerCluster.newBuilder().build();
- * CreateGameServerClusterRequest request = CreateGameServerClusterRequest.newBuilder()
- * .setParent(formattedParent)
- * .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()) {
- * String formattedName = GameServerClustersServiceClient.formatGameServerClusterName("[PROJECT]", "[LOCATION]", "[REALM]", "[GAME_SERVER_CLUSTER]");
- * gameServerClustersServiceClient.deleteGameServerClusterAsync(formattedName).get();
- * }
- *
- *
- * @param name Required. The name of the game server cluster to delete, using 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()) {
- * String formattedName = GameServerClustersServiceClient.formatGameServerClusterName("[PROJECT]", "[LOCATION]", "[REALM]", "[GAME_SERVER_CLUSTER]");
- * DeleteGameServerClusterRequest request = DeleteGameServerClusterRequest.newBuilder()
- * .setName(formattedName)
- * .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()) {
- * String formattedName = GameServerClustersServiceClient.formatGameServerClusterName("[PROJECT]", "[LOCATION]", "[REALM]", "[GAME_SERVER_CLUSTER]");
- * DeleteGameServerClusterRequest request = DeleteGameServerClusterRequest.newBuilder()
- * .setName(formattedName)
- * .build();
- * OperationFuture<Empty, Empty> 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()) {
- * String formattedName = GameServerClustersServiceClient.formatGameServerClusterName("[PROJECT]", "[LOCATION]", "[REALM]", "[GAME_SERVER_CLUSTER]");
- * DeleteGameServerClusterRequest request = DeleteGameServerClusterRequest.newBuilder()
- * .setName(formattedName)
- * .build();
- * ApiFuture<Operation> future = gameServerClustersServiceClient.deleteGameServerClusterCallable().futureCall(request);
- * // Do something
- * future.get();
- * }
- *
- */
- public final UnaryCallableSample 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:
- *
- * 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 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:
- *
- * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final GameServerDeployment getGameServerDeployment(String name) {
- GAME_SERVER_DEPLOYMENT_PATH_TEMPLATE.validate(name, "getGameServerDeployment");
- 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:
- *
- * `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:
- *
- * 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:
- *
- * 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 deployment is used to control the deployment of game
- * server software to Agones fleets.
- *
- * Sample for GameServerDeploymentsServiceClient:
- *
- * Service Description: Realm provides grouping of game server clusters that are serving a
- * particular gamer population.
- *
- * 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 GameServerDeploymentsServiceStub 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 getGameServerDeployment to 30 seconds:
- *
- *
- *
- * @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
- * 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, Empty> 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 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.
- *
- *
- * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
- * PreviewCreateGameServerClusterRequest request = PreviewCreateGameServerClusterRequest.newBuilder().build();
- * PreviewCreateGameServerClusterResponse response = gameServerClustersServiceClient.previewCreateGameServerCluster(request);
- * }
- *
- */
- public final UnaryCallable<
- PreviewCreateGameServerClusterRequest, PreviewCreateGameServerClusterResponse>
- previewCreateGameServerClusterCallable() {
- return stub.previewCreateGameServerClusterCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Previews deletion of a single game server cluster.
- *
- *
- * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
- * PreviewCreateGameServerClusterRequest request = PreviewCreateGameServerClusterRequest.newBuilder().build();
- * ApiFuture<PreviewCreateGameServerClusterResponse> future = gameServerClustersServiceClient.previewCreateGameServerClusterCallable().futureCall(request);
- * // Do something
- * PreviewCreateGameServerClusterResponse 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 PreviewDeleteGameServerClusterResponse previewDeleteGameServerCluster(
- PreviewDeleteGameServerClusterRequest request) {
- return previewDeleteGameServerClusterCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Previews deletion of a single game server cluster.
- *
- *
- * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
- * PreviewDeleteGameServerClusterRequest request = PreviewDeleteGameServerClusterRequest.newBuilder().build();
- * PreviewDeleteGameServerClusterResponse response = gameServerClustersServiceClient.previewDeleteGameServerCluster(request);
- * }
- *
- */
- public final UnaryCallable<
- PreviewDeleteGameServerClusterRequest, PreviewDeleteGameServerClusterResponse>
- previewDeleteGameServerClusterCallable() {
- return stub.previewDeleteGameServerClusterCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Previews updating a GameServerCluster.
- *
- *
- * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
- * PreviewDeleteGameServerClusterRequest request = PreviewDeleteGameServerClusterRequest.newBuilder().build();
- * ApiFuture<PreviewDeleteGameServerClusterResponse> future = gameServerClustersServiceClient.previewDeleteGameServerClusterCallable().futureCall(request);
- * // Do something
- * PreviewDeleteGameServerClusterResponse 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()) {
- * PreviewUpdateGameServerClusterRequest request = PreviewUpdateGameServerClusterRequest.newBuilder().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()) {
- * PreviewUpdateGameServerClusterRequest request = PreviewUpdateGameServerClusterRequest.newBuilder().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 (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
- * String formattedName = GameServerDeploymentsServiceClient.formatGameServerDeploymentName("[PROJECT]", "[LOCATION]", "[GAME_SERVER_DEPLOYMENT]");
- * GameServerDeployment response = gameServerDeploymentsServiceClient.getGameServerDeployment(formattedName);
- * }
- *
- *
- *
- *
- *
- *
- *
- * 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;
-
- private static final PathTemplate GAME_SERVER_DEPLOYMENT_PATH_TEMPLATE =
- PathTemplate.createWithoutUrlEncoding(
- "projects/{project}/locations/{location}/gameServerDeployments/{game_server_deployment}");
-
- private static final PathTemplate LOCATION_PATH_TEMPLATE =
- PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}");
-
- /**
- * Formats a string containing the fully-qualified path to represent a game_server_deployment
- * resource.
- *
- * @deprecated Use the {@link GameServerDeploymentName} class instead.
- */
- @Deprecated
- public static final String formatGameServerDeploymentName(
- String project, String location, String gameServerDeployment) {
- return GAME_SERVER_DEPLOYMENT_PATH_TEMPLATE.instantiate(
- "project", project,
- "location", location,
- "game_server_deployment", gameServerDeployment);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a location resource.
- *
- * @deprecated Use the {@link LocationName} class instead.
- */
- @Deprecated
- public static final String formatLocationName(String project, String location) {
- return LOCATION_PATH_TEMPLATE.instantiate(
- "project", project,
- "location", location);
- }
-
- /**
- * Parses the project from the given fully-qualified path which represents a
- * game_server_deployment resource.
- *
- * @deprecated Use the {@link GameServerDeploymentName} class instead.
- */
- @Deprecated
- public static final String parseProjectFromGameServerDeploymentName(
- String gameServerDeploymentName) {
- return GAME_SERVER_DEPLOYMENT_PATH_TEMPLATE.parse(gameServerDeploymentName).get("project");
- }
-
- /**
- * Parses the location from the given fully-qualified path which represents a
- * game_server_deployment resource.
- *
- * @deprecated Use the {@link GameServerDeploymentName} class instead.
- */
- @Deprecated
- public static final String parseLocationFromGameServerDeploymentName(
- String gameServerDeploymentName) {
- return GAME_SERVER_DEPLOYMENT_PATH_TEMPLATE.parse(gameServerDeploymentName).get("location");
- }
-
- /**
- * Parses the game_server_deployment from the given fully-qualified path which represents a
- * game_server_deployment resource.
- *
- * @deprecated Use the {@link GameServerDeploymentName} class instead.
- */
- @Deprecated
- public static final String parseGameServerDeploymentFromGameServerDeploymentName(
- String gameServerDeploymentName) {
- return GAME_SERVER_DEPLOYMENT_PATH_TEMPLATE
- .parse(gameServerDeploymentName)
- .get("game_server_deployment");
- }
-
- /**
- * Parses the project from the given fully-qualified path which represents a location resource.
- *
- * @deprecated Use the {@link LocationName} class instead.
- */
- @Deprecated
- public static final String parseProjectFromLocationName(String locationName) {
- return LOCATION_PATH_TEMPLATE.parse(locationName).get("project");
- }
-
- /**
- * Parses the location from the given fully-qualified path which represents a location resource.
- *
- * @deprecated Use the {@link LocationName} class instead.
- */
- @Deprecated
- public static final String parseLocationFromLocationName(String locationName) {
- return LOCATION_PATH_TEMPLATE.parse(locationName).get("location");
- }
-
- /** 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, using the form:
- * `projects/{project}/locations/{location}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListGameServerDeploymentsPagedResponse listGameServerDeployments(String parent) {
- LOCATION_PATH_TEMPLATE.validate(parent, "listGameServerDeployments");
- 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()) {
- * String formattedParent = GameServerDeploymentsServiceClient.formatLocationName("[PROJECT]", "[LOCATION]");
- * for (GameServerDeployment element : gameServerDeploymentsServiceClient.listGameServerDeployments(formattedParent).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()) {
- * String formattedParent = GameServerDeploymentsServiceClient.formatLocationName("[PROJECT]", "[LOCATION]");
- * ListGameServerDeploymentsRequest request = ListGameServerDeploymentsRequest.newBuilder()
- * .setParent(formattedParent)
- * .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()) {
- * String formattedParent = GameServerDeploymentsServiceClient.formatLocationName("[PROJECT]", "[LOCATION]");
- * ListGameServerDeploymentsRequest request = ListGameServerDeploymentsRequest.newBuilder()
- * .setParent(formattedParent)
- * .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()) {
- * String formattedParent = GameServerDeploymentsServiceClient.formatLocationName("[PROJECT]", "[LOCATION]");
- * ListGameServerDeploymentsRequest request = ListGameServerDeploymentsRequest.newBuilder()
- * .setParent(formattedParent)
- * .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 deployment to retrieve, using the form:
- *
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
- * String formattedName = GameServerDeploymentsServiceClient.formatGameServerDeploymentName("[PROJECT]", "[LOCATION]", "[GAME_SERVER_DEPLOYMENT]");
- * GameServerDeployment response = gameServerDeploymentsServiceClient.getGameServerDeployment(formattedName);
- * }
- *
- *
- * @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()) {
- * String formattedName = GameServerDeploymentsServiceClient.formatGameServerDeploymentName("[PROJECT]", "[LOCATION]", "[GAME_SERVER_DEPLOYMENT]");
- * GetGameServerDeploymentRequest request = GetGameServerDeploymentRequest.newBuilder()
- * .setName(formattedName)
- * .build();
- * GameServerDeployment response = gameServerDeploymentsServiceClient.getGameServerDeployment(request);
- * }
- *
- */
- public final UnaryCallable
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
- * String formattedName = GameServerDeploymentsServiceClient.formatGameServerDeploymentName("[PROJECT]", "[LOCATION]", "[GAME_SERVER_DEPLOYMENT]");
- * GetGameServerDeploymentRequest request = GetGameServerDeploymentRequest.newBuilder()
- * .setName(formattedName)
- * .build();
- * ApiFuture<GameServerDeployment> future = gameServerDeploymentsServiceClient.getGameServerDeploymentCallable().futureCall(request);
- * // Do something
- * GameServerDeployment response = future.get();
- * }
- *
- *
- * @param parent Required. The parent resource name, using the form:
- * `projects/{project}/locations/{location}`.
- * @param deploymentId Required. The ID of the game server deployment resource to be created.
- * @param gameServerDeployment Required. The game server deployment 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()) {
- * String formattedParent = GameServerDeploymentsServiceClient.formatLocationName("[PROJECT]", "[LOCATION]");
- * String deploymentId = "";
- * GameServerDeployment gameServerDeployment = GameServerDeployment.newBuilder().build();
- * GameServerDeployment response = gameServerDeploymentsServiceClient.createGameServerDeploymentAsync(formattedParent, deploymentId, 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()) {
- * String formattedParent = GameServerDeploymentsServiceClient.formatLocationName("[PROJECT]", "[LOCATION]");
- * String deploymentId = "";
- * GameServerDeployment gameServerDeployment = GameServerDeployment.newBuilder().build();
- * CreateGameServerDeploymentRequest request = CreateGameServerDeploymentRequest.newBuilder()
- * .setParent(formattedParent)
- * .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
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
- * String formattedParent = GameServerDeploymentsServiceClient.formatLocationName("[PROJECT]", "[LOCATION]");
- * String deploymentId = "";
- * GameServerDeployment gameServerDeployment = GameServerDeployment.newBuilder().build();
- * CreateGameServerDeploymentRequest request = CreateGameServerDeploymentRequest.newBuilder()
- * .setParent(formattedParent)
- * .setDeploymentId(deploymentId)
- * .setGameServerDeployment(gameServerDeployment)
- * .build();
- * OperationFuture<GameServerDeployment, Empty> future = gameServerDeploymentsServiceClient.createGameServerDeploymentOperationCallable().futureCall(request);
- * // Do something
- * GameServerDeployment response = future.get();
- * }
- *
- */
- public final UnaryCallable
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
- * String formattedParent = GameServerDeploymentsServiceClient.formatLocationName("[PROJECT]", "[LOCATION]");
- * String deploymentId = "";
- * GameServerDeployment gameServerDeployment = GameServerDeployment.newBuilder().build();
- * CreateGameServerDeploymentRequest request = CreateGameServerDeploymentRequest.newBuilder()
- * .setParent(formattedParent)
- * .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 deployment to delete, using the form:
- *
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
- * String formattedName = GameServerDeploymentsServiceClient.formatGameServerDeploymentName("[PROJECT]", "[LOCATION]", "[GAME_SERVER_DEPLOYMENT]");
- * gameServerDeploymentsServiceClient.deleteGameServerDeploymentAsync(formattedName).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()) {
- * String formattedName = GameServerDeploymentsServiceClient.formatGameServerDeploymentName("[PROJECT]", "[LOCATION]", "[GAME_SERVER_DEPLOYMENT]");
- * DeleteGameServerDeploymentRequest request = DeleteGameServerDeploymentRequest.newBuilder()
- * .setName(formattedName)
- * .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()) {
- * String formattedName = GameServerDeploymentsServiceClient.formatGameServerDeploymentName("[PROJECT]", "[LOCATION]", "[GAME_SERVER_DEPLOYMENT]");
- * DeleteGameServerDeploymentRequest request = DeleteGameServerDeploymentRequest.newBuilder()
- * .setName(formattedName)
- * .build();
- * OperationFuture<Empty, Empty> future = gameServerDeploymentsServiceClient.deleteGameServerDeploymentOperationCallable().futureCall(request);
- * // Do something
- * future.get();
- * }
- *
- */
- public final UnaryCallable
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
- * String formattedName = GameServerDeploymentsServiceClient.formatGameServerDeploymentName("[PROJECT]", "[LOCATION]", "[GAME_SERVER_DEPLOYMENT]");
- * DeleteGameServerDeploymentRequest request = DeleteGameServerDeploymentRequest.newBuilder()
- * .setName(formattedName)
- * .build();
- * ApiFuture<Operation> future = gameServerDeploymentsServiceClient.deleteGameServerDeploymentCallable().futureCall(request);
- * // Do something
- * future.get();
- * }
- *
- *
- * @param gameServerDeployment Required. The game server deployment 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
- * 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, Empty> 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 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()) {
- * GetGameServerDeploymentRolloutRequest request = GetGameServerDeploymentRolloutRequest.newBuilder().build();
- * GameServerDeploymentRollout response = gameServerDeploymentsServiceClient.getGameServerDeploymentRollout(request);
- * }
- *
- */
- public final UnaryCallable
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
- * GetGameServerDeploymentRolloutRequest request = GetGameServerDeploymentRolloutRequest.newBuilder().build();
- * ApiFuture<GameServerDeploymentRollout> future = gameServerDeploymentsServiceClient.getGameServerDeploymentRolloutCallable().futureCall(request);
- * // Do something
- * GameServerDeploymentRollout 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 Operation updateGameServerDeploymentRollout(
- UpdateGameServerDeploymentRolloutRequest request) {
- return updateGameServerDeploymentRolloutCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Patches a single game server deployment rollout.
- *
- *
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
- * UpdateGameServerDeploymentRolloutRequest request = UpdateGameServerDeploymentRolloutRequest.newBuilder().build();
- * Operation response = gameServerDeploymentsServiceClient.updateGameServerDeploymentRollout(request);
- * }
- *
- */
- public final UnaryCallable
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
- * UpdateGameServerDeploymentRolloutRequest request = UpdateGameServerDeploymentRolloutRequest.newBuilder().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()) {
- * PreviewGameServerDeploymentRolloutRequest request = PreviewGameServerDeploymentRolloutRequest.newBuilder().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 deployment, e.g. it gathers all the fleets
- * and autoscalars for this deployment. This includes fleets running older version of the
- * deployment.
- *
- *
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
- * PreviewGameServerDeploymentRolloutRequest request = PreviewGameServerDeploymentRolloutRequest.newBuilder().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 deployment, e.g. it gathers all the fleets
- * and autoscalars for this deployment. This includes fleets running older version of the
- * deployment.
- *
- *
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
- * FetchDeploymentStateRequest request = FetchDeploymentStateRequest.newBuilder().build();
- * FetchDeploymentStateResponse response = gameServerDeploymentsServiceClient.fetchDeploymentState(request);
- * }
- *
- */
- public final UnaryCallable
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
- * FetchDeploymentStateRequest request = FetchDeploymentStateRequest.newBuilder().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()) {
- * String formattedName = RealmsServiceClient.formatRealmName("[PROJECT]", "[LOCATION]", "[REALM]");
- * Realm response = realmsServiceClient.getRealm(formattedName);
- * }
- *
- *
- *
- *
- *
- *
- *
- * 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;
-
- private static final PathTemplate LOCATION_PATH_TEMPLATE =
- PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}");
-
- private static final PathTemplate REALM_PATH_TEMPLATE =
- PathTemplate.createWithoutUrlEncoding(
- "projects/{project}/locations/{location}/realms/{realm}");
-
- /**
- * Formats a string containing the fully-qualified path to represent a location resource.
- *
- * @deprecated Use the {@link LocationName} class instead.
- */
- @Deprecated
- public static final String formatLocationName(String project, String location) {
- return LOCATION_PATH_TEMPLATE.instantiate(
- "project", project,
- "location", location);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a realm resource.
- *
- * @deprecated Use the {@link RealmName} class instead.
- */
- @Deprecated
- public static final String formatRealmName(String project, String location, String realm) {
- return REALM_PATH_TEMPLATE.instantiate(
- "project", project,
- "location", location,
- "realm", realm);
- }
-
- /**
- * Parses the project from the given fully-qualified path which represents a location resource.
- *
- * @deprecated Use the {@link LocationName} class instead.
- */
- @Deprecated
- public static final String parseProjectFromLocationName(String locationName) {
- return LOCATION_PATH_TEMPLATE.parse(locationName).get("project");
- }
-
- /**
- * Parses the location from the given fully-qualified path which represents a location resource.
- *
- * @deprecated Use the {@link LocationName} class instead.
- */
- @Deprecated
- public static final String parseLocationFromLocationName(String locationName) {
- return LOCATION_PATH_TEMPLATE.parse(locationName).get("location");
- }
-
- /**
- * Parses the project from the given fully-qualified path which represents a realm resource.
- *
- * @deprecated Use the {@link RealmName} class instead.
- */
- @Deprecated
- public static final String parseProjectFromRealmName(String realmName) {
- return REALM_PATH_TEMPLATE.parse(realmName).get("project");
- }
-
- /**
- * Parses the location from the given fully-qualified path which represents a realm resource.
- *
- * @deprecated Use the {@link RealmName} class instead.
- */
- @Deprecated
- public static final String parseLocationFromRealmName(String realmName) {
- return REALM_PATH_TEMPLATE.parse(realmName).get("location");
- }
-
- /**
- * Parses the realm from the given fully-qualified path which represents a realm resource.
- *
- * @deprecated Use the {@link RealmName} class instead.
- */
- @Deprecated
- public static final String parseRealmFromRealmName(String realmName) {
- return REALM_PATH_TEMPLATE.parse(realmName).get("realm");
- }
-
- /** 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, using the form:
- * `projects/{project}/locations/{location}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListRealmsPagedResponse listRealms(String parent) {
- LOCATION_PATH_TEMPLATE.validate(parent, "listRealms");
- 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()) {
- * String formattedParent = RealmsServiceClient.formatLocationName("[PROJECT]", "[LOCATION]");
- * for (Realm element : realmsServiceClient.listRealms(formattedParent).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()) {
- * String formattedParent = RealmsServiceClient.formatLocationName("[PROJECT]", "[LOCATION]");
- * ListRealmsRequest request = ListRealmsRequest.newBuilder()
- * .setParent(formattedParent)
- * .build();
- * for (Realm element : realmsServiceClient.listRealms(request).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
- */
- public final UnaryCallable
- * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
- * String formattedParent = RealmsServiceClient.formatLocationName("[PROJECT]", "[LOCATION]");
- * ListRealmsRequest request = ListRealmsRequest.newBuilder()
- * .setParent(formattedParent)
- * .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()) {
- * String formattedParent = RealmsServiceClient.formatLocationName("[PROJECT]", "[LOCATION]");
- * ListRealmsRequest request = ListRealmsRequest.newBuilder()
- * .setParent(formattedParent)
- * .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, using 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) {
- REALM_PATH_TEMPLATE.validate(name, "getRealm");
- 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()) {
- * String formattedName = RealmsServiceClient.formatRealmName("[PROJECT]", "[LOCATION]", "[REALM]");
- * Realm response = realmsServiceClient.getRealm(formattedName);
- * }
- *
- *
- * @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()) {
- * String formattedName = RealmsServiceClient.formatRealmName("[PROJECT]", "[LOCATION]", "[REALM]");
- * GetRealmRequest request = GetRealmRequest.newBuilder()
- * .setName(formattedName)
- * .build();
- * Realm response = realmsServiceClient.getRealm(request);
- * }
- *
- */
- public final UnaryCallable
- * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
- * String formattedName = RealmsServiceClient.formatRealmName("[PROJECT]", "[LOCATION]", "[REALM]");
- * GetRealmRequest request = GetRealmRequest.newBuilder()
- * .setName(formattedName)
- * .build();
- * ApiFuture<Realm> future = realmsServiceClient.getRealmCallable().futureCall(request);
- * // Do something
- * Realm response = future.get();
- * }
- *
- *
- * @param parent Required. The parent resource name, using the form:
- * `projects/{project}/locations/{location}`.
- * @param realmId Required. The ID of the realm resource to be created.
- * @param realm Required. 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()) {
- * String formattedParent = RealmsServiceClient.formatLocationName("[PROJECT]", "[LOCATION]");
- * String realmId = "";
- * Realm realm = Realm.newBuilder().build();
- * Realm response = realmsServiceClient.createRealmAsync(formattedParent, realmId, realm).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()) {
- * String formattedParent = RealmsServiceClient.formatLocationName("[PROJECT]", "[LOCATION]");
- * String realmId = "";
- * Realm realm = Realm.newBuilder().build();
- * CreateRealmRequest request = CreateRealmRequest.newBuilder()
- * .setParent(formattedParent)
- * .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()) {
- * String formattedParent = RealmsServiceClient.formatLocationName("[PROJECT]", "[LOCATION]");
- * String realmId = "";
- * Realm realm = Realm.newBuilder().build();
- * CreateRealmRequest request = CreateRealmRequest.newBuilder()
- * .setParent(formattedParent)
- * .setRealmId(realmId)
- * .setRealm(realm)
- * .build();
- * OperationFuture<Realm, Empty> future = realmsServiceClient.createRealmOperationCallable().futureCall(request);
- * // Do something
- * Realm response = future.get();
- * }
- *
- */
- public final UnaryCallable
- * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
- * String formattedParent = RealmsServiceClient.formatLocationName("[PROJECT]", "[LOCATION]");
- * String realmId = "";
- * Realm realm = Realm.newBuilder().build();
- * CreateRealmRequest request = CreateRealmRequest.newBuilder()
- * .setParent(formattedParent)
- * .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, using 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()) {
- * String formattedName = RealmsServiceClient.formatRealmName("[PROJECT]", "[LOCATION]", "[REALM]");
- * realmsServiceClient.deleteRealmAsync(formattedName).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()) {
- * String formattedName = RealmsServiceClient.formatRealmName("[PROJECT]", "[LOCATION]", "[REALM]");
- * DeleteRealmRequest request = DeleteRealmRequest.newBuilder()
- * .setName(formattedName)
- * .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()) {
- * String formattedName = RealmsServiceClient.formatRealmName("[PROJECT]", "[LOCATION]", "[REALM]");
- * DeleteRealmRequest request = DeleteRealmRequest.newBuilder()
- * .setName(formattedName)
- * .build();
- * OperationFuture<Empty, Empty> future = realmsServiceClient.deleteRealmOperationCallable().futureCall(request);
- * // Do something
- * future.get();
- * }
- *
- */
- public final UnaryCallable
- * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
- * String formattedName = RealmsServiceClient.formatRealmName("[PROJECT]", "[LOCATION]", "[REALM]");
- * DeleteRealmRequest request = DeleteRealmRequest.newBuilder()
- * .setName(formattedName)
- * .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, Empty> 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()) {
- * PreviewRealmUpdateRequest request = PreviewRealmUpdateRequest.newBuilder().build();
- * PreviewRealmUpdateResponse response = realmsServiceClient.previewRealmUpdate(request);
- * }
- *
- */
- public final UnaryCallable
- * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
- * PreviewRealmUpdateRequest request = PreviewRealmUpdateRequest.newBuilder().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();
- *
- *
- *
- *
- * ================================== GameServerDeploymentsServiceClient
- * ==================================
- *
- *
- * try (GameServerClustersServiceClient gameServerClustersServiceClient = GameServerClustersServiceClient.create()) {
- * String formattedName = GameServerClustersServiceClient.formatGameServerClusterName("[PROJECT]", "[LOCATION]", "[REALM]", "[GAME_SERVER_CLUSTER]");
- * GameServerCluster response = gameServerClustersServiceClient.getGameServerCluster(formattedName);
- * }
- *
- *
- *
- *
- * =================== RealmsServiceClient ===================
- *
- *
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient = GameServerDeploymentsServiceClient.create()) {
- * String formattedName = GameServerDeploymentsServiceClient.formatGameServerDeploymentName("[PROJECT]", "[LOCATION]", "[GAME_SERVER_DEPLOYMENT]");
- * GameServerDeployment response = gameServerDeploymentsServiceClient.getGameServerDeployment(formattedName);
- * }
- *
- *
- *
- */
-@Generated("by gapic-generator")
-package com.google.cloud.gaming.v1alpha;
-
-import javax.annotation.Generated;
diff --git a/google-cloud-gameservices/src/main/java/com/google/cloud/gaming/v1alpha/stub/GameServerClustersServiceStub.java b/google-cloud-gameservices/src/main/java/com/google/cloud/gaming/v1alpha/stub/GameServerClustersServiceStub.java
deleted file mode 100644
index 0dde6653..00000000
--- a/google-cloud-gameservices/src/main/java/com/google/cloud/gaming/v1alpha/stub/GameServerClustersServiceStub.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * 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.v1alpha.stub;
-
-import static com.google.cloud.gaming.v1alpha.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.v1alpha.CreateGameServerClusterRequest;
-import com.google.cloud.gaming.v1alpha.DeleteGameServerClusterRequest;
-import com.google.cloud.gaming.v1alpha.GameServerCluster;
-import com.google.cloud.gaming.v1alpha.GetGameServerClusterRequest;
-import com.google.cloud.gaming.v1alpha.ListGameServerClustersRequest;
-import com.google.cloud.gaming.v1alpha.ListGameServerClustersResponse;
-import com.google.cloud.gaming.v1alpha.PreviewCreateGameServerClusterRequest;
-import com.google.cloud.gaming.v1alpha.PreviewCreateGameServerClusterResponse;
-import com.google.cloud.gaming.v1alpha.PreviewDeleteGameServerClusterRequest;
-import com.google.cloud.gaming.v1alpha.PreviewDeleteGameServerClusterResponse;
-import com.google.cloud.gaming.v1alpha.PreviewUpdateGameServerClusterRequest;
-import com.google.cloud.gaming.v1alpha.PreviewUpdateGameServerClusterResponse;
-import com.google.cloud.gaming.v1alpha.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()) {
- * String formattedName = RealmsServiceClient.formatRealmName("[PROJECT]", "[LOCATION]", "[REALM]");
- * Realm response = realmsServiceClient.getRealm(formattedName);
- * }
- *
- *
- *
- *
- *
- *
- */
-@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();
- *
- *
- *
- *
- *
- *
- */
-@Generated("by gapic-generator")
-@BetaApi
-public class GameServerDeploymentsServiceStubSettings
- extends StubSettings
- * GameServerDeploymentsServiceStubSettings.Builder gameServerDeploymentsServiceSettingsBuilder =
- * GameServerDeploymentsServiceStubSettings.newBuilder();
- * gameServerDeploymentsServiceSettingsBuilder
- * .getGameServerDeploymentSettings()
- * .setRetrySettings(
- * gameServerDeploymentsServiceSettingsBuilder.getGameServerDeploymentSettings().getRetrySettings().toBuilder()
- * .setTotalTimeout(Duration.ofSeconds(30))
- * .build());
- * GameServerDeploymentsServiceStubSettings gameServerDeploymentsServiceSettings = gameServerDeploymentsServiceSettingsBuilder.build();
- *
- *