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: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (GameServerClustersServiceClient gameServerClustersServiceClient = - * GameServerClustersServiceClient.create()) { - * GameServerClusterName name = - * GameServerClusterName.of("[PROJECT]", "[LOCATION]", "[REALM]", "[CLUSTER]"); - * GameServerCluster response = gameServerClustersServiceClient.getGameServerCluster(name); - * } - * }- * - *
Note: close() needs to be called on the GameServerClustersServiceClient object to clean up - * resources such as threads. In the example above, try-with-resources is used, which automatically - * calls close(). - * - *
The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *
See the individual methods for example code. - * - *
Many parameters require resource names to be formatted in a particular way. To assist with - * these names, this class includes a format method for each type of name, and additionally a parse - * method to extract the individual identifiers contained within names that are returned. - * - *
This class can be customized by passing in a custom instance of - * GameServerClustersServiceSettings to create(). For example: - * - *
To customize credentials: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * GameServerClustersServiceSettings gameServerClustersServiceSettings = - * GameServerClustersServiceSettings.newBuilder() - * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) - * .build(); - * GameServerClustersServiceClient gameServerClustersServiceClient = - * GameServerClustersServiceClient.create(gameServerClustersServiceSettings); - * }- * - *
To customize the endpoint: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * GameServerClustersServiceSettings gameServerClustersServiceSettings = - * GameServerClustersServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); - * GameServerClustersServiceClient gameServerClustersServiceClient = - * GameServerClustersServiceClient.create(gameServerClustersServiceSettings); - * }- * - *
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over - * the wire: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * GameServerClustersServiceSettings gameServerClustersServiceSettings = - * GameServerClustersServiceSettings.newHttpJsonBuilder().build(); - * GameServerClustersServiceClient gameServerClustersServiceClient = - * GameServerClustersServiceClient.create(gameServerClustersServiceSettings); - * }- * - *
Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@Generated("by gapic-generator-java") -public class GameServerClustersServiceClient implements BackgroundResource { - private final GameServerClustersServiceSettings settings; - private final GameServerClustersServiceStub stub; - private final OperationsClient httpJsonOperationsClient; - private final com.google.longrunning.OperationsClient operationsClient; - - /** Constructs an instance of GameServerClustersServiceClient with default settings. */ - public static final GameServerClustersServiceClient create() throws IOException { - return create(GameServerClustersServiceSettings.newBuilder().build()); - } - - /** - * Constructs an instance of GameServerClustersServiceClient, using the given settings. The - * channels are created based on the settings passed in, or defaults for any settings that are not - * set. - */ - public static final GameServerClustersServiceClient create( - GameServerClustersServiceSettings settings) throws IOException { - return new GameServerClustersServiceClient(settings); - } - - /** - * Constructs an instance of GameServerClustersServiceClient, using the given stub for making - * calls. This is for advanced usage - prefer using create(GameServerClustersServiceSettings). - */ - 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 = - com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); - this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); - } - - protected GameServerClustersServiceClient(GameServerClustersServiceStub stub) { - this.settings = null; - this.stub = stub; - this.operationsClient = - com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); - this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); - } - - public final GameServerClustersServiceSettings getSettings() { - return settings; - } - - 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. - */ - public final com.google.longrunning.OperationsClient getOperationsClient() { - return operationsClient; - } - - /** - * Returns the OperationsClient that can be used to query the status of a long-running operation - * returned by another API method call. - */ - @BetaApi - public final OperationsClient getHttpJsonOperationsClient() { - return httpJsonOperationsClient; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists game server clusters in a given project and location. - * - *
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (GameServerClustersServiceClient gameServerClustersServiceClient = - * GameServerClustersServiceClient.create()) { - * RealmName parent = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]"); - * for (GameServerCluster element : - * gameServerClustersServiceClient.listGameServerClusters(parent).iterateAll()) { - * // doThingsWith(element); - * } - * } - * }- * - * @param parent Required. The parent resource name, in the following form: - * "projects/{project}/locations/{location}/realms/{realm}". - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListGameServerClustersPagedResponse listGameServerClusters(RealmName parent) { - ListGameServerClustersRequest request = - ListGameServerClustersRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listGameServerClusters(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists game server clusters in a given project and location. - * - *
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (GameServerClustersServiceClient gameServerClustersServiceClient = - * GameServerClustersServiceClient.create()) { - * String parent = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString(); - * for (GameServerCluster element : - * gameServerClustersServiceClient.listGameServerClusters(parent).iterateAll()) { - * // doThingsWith(element); - * } - * } - * }- * - * @param parent Required. The parent resource name, in the following form: - * "projects/{project}/locations/{location}/realms/{realm}". - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListGameServerClustersPagedResponse listGameServerClusters(String parent) { - ListGameServerClustersRequest request = - ListGameServerClustersRequest.newBuilder().setParent(parent).build(); - return listGameServerClusters(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists game server clusters in a given project and location. - * - *
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (GameServerClustersServiceClient gameServerClustersServiceClient = - * GameServerClustersServiceClient.create()) { - * ListGameServerClustersRequest request = - * ListGameServerClustersRequest.newBuilder() - * .setParent(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") - * .setFilter("filter-1274492040") - * .setOrderBy("orderBy-1207110587") - * .setView(GameServerClusterView.forNumber(0)) - * .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: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (GameServerClustersServiceClient gameServerClustersServiceClient = - * GameServerClustersServiceClient.create()) { - * ListGameServerClustersRequest request = - * ListGameServerClustersRequest.newBuilder() - * .setParent(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") - * .setFilter("filter-1274492040") - * .setOrderBy("orderBy-1207110587") - * .setView(GameServerClusterView.forNumber(0)) - * .build(); - * ApiFuture- */ - public final UnaryCallablefuture = - * gameServerClustersServiceClient.listGameServerClustersPagedCallable().futureCall(request); - * // Do something. - * for (GameServerCluster element : future.get().iterateAll()) { - * // doThingsWith(element); - * } - * } - * }
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (GameServerClustersServiceClient gameServerClustersServiceClient = - * GameServerClustersServiceClient.create()) { - * ListGameServerClustersRequest request = - * ListGameServerClustersRequest.newBuilder() - * .setParent(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") - * .setFilter("filter-1274492040") - * .setOrderBy("orderBy-1207110587") - * .setView(GameServerClusterView.forNumber(0)) - * .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 UnaryCallable
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (GameServerClustersServiceClient gameServerClustersServiceClient = - * GameServerClustersServiceClient.create()) { - * GameServerClusterName name = - * GameServerClusterName.of("[PROJECT]", "[LOCATION]", "[REALM]", "[CLUSTER]"); - * GameServerCluster response = gameServerClustersServiceClient.getGameServerCluster(name); - * } - * }- * - * @param name Required. The name of the game server cluster to retrieve, in the following form: - * `projects/{project}/locations/{location}/realms/{realm-id}/gameServerClusters/{cluster}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final GameServerCluster getGameServerCluster(GameServerClusterName name) { - GetGameServerClusterRequest request = - GetGameServerClusterRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getGameServerCluster(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single game server cluster. - * - *
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (GameServerClustersServiceClient gameServerClustersServiceClient = - * GameServerClustersServiceClient.create()) { - * String name = - * GameServerClusterName.of("[PROJECT]", "[LOCATION]", "[REALM]", "[CLUSTER]").toString(); - * GameServerCluster response = gameServerClustersServiceClient.getGameServerCluster(name); - * } - * }- * - * @param name Required. The name of the game server cluster to retrieve, in the following form: - * `projects/{project}/locations/{location}/realms/{realm-id}/gameServerClusters/{cluster}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final GameServerCluster getGameServerCluster(String name) { - GetGameServerClusterRequest request = - GetGameServerClusterRequest.newBuilder().setName(name).build(); - return getGameServerCluster(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single game server cluster. - * - *
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (GameServerClustersServiceClient gameServerClustersServiceClient = - * GameServerClustersServiceClient.create()) { - * GetGameServerClusterRequest request = - * GetGameServerClusterRequest.newBuilder() - * .setName( - * GameServerClusterName.of("[PROJECT]", "[LOCATION]", "[REALM]", "[CLUSTER]") - * .toString()) - * .setView(GameServerClusterView.forNumber(0)) - * .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: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (GameServerClustersServiceClient gameServerClustersServiceClient = - * GameServerClustersServiceClient.create()) { - * GetGameServerClusterRequest request = - * GetGameServerClusterRequest.newBuilder() - * .setName( - * GameServerClusterName.of("[PROJECT]", "[LOCATION]", "[REALM]", "[CLUSTER]") - * .toString()) - * .setView(GameServerClusterView.forNumber(0)) - * .build(); - * ApiFuture- */ - public final UnaryCallablefuture = - * gameServerClustersServiceClient.getGameServerClusterCallable().futureCall(request); - * // Do something. - * GameServerCluster response = future.get(); - * } - * }
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (GameServerClustersServiceClient gameServerClustersServiceClient = - * GameServerClustersServiceClient.create()) { - * RealmName parent = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]"); - * GameServerCluster gameServerCluster = GameServerCluster.newBuilder().build(); - * String gameServerClusterId = "gameServerClusterId-1301104032"; - * GameServerCluster response = - * gameServerClustersServiceClient - * .createGameServerClusterAsync(parent, gameServerCluster, gameServerClusterId) - * .get(); - * } - * }- * - * @param parent Required. The parent resource name, in the following form: - * `projects/{project}/locations/{location}/realms/{realm-id}`. - * @param gameServerCluster Required. The game server cluster resource to be created. - * @param gameServerClusterId Required. The ID of the game server cluster resource to be created. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (GameServerClustersServiceClient gameServerClustersServiceClient = - * GameServerClustersServiceClient.create()) { - * String parent = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString(); - * GameServerCluster gameServerCluster = GameServerCluster.newBuilder().build(); - * String gameServerClusterId = "gameServerClusterId-1301104032"; - * GameServerCluster response = - * gameServerClustersServiceClient - * .createGameServerClusterAsync(parent, gameServerCluster, gameServerClusterId) - * .get(); - * } - * }- * - * @param parent Required. The parent resource name, in the following form: - * `projects/{project}/locations/{location}/realms/{realm-id}`. - * @param gameServerCluster Required. The game server cluster resource to be created. - * @param gameServerClusterId Required. The ID of the game server cluster resource to be created. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (GameServerClustersServiceClient gameServerClustersServiceClient = - * GameServerClustersServiceClient.create()) { - * CreateGameServerClusterRequest request = - * CreateGameServerClusterRequest.newBuilder() - * .setParent(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) - * .setGameServerClusterId("gameServerClusterId-1301104032") - * .setGameServerCluster(GameServerCluster.newBuilder().build()) - * .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 - */ - public final OperationFuture
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (GameServerClustersServiceClient gameServerClustersServiceClient = - * GameServerClustersServiceClient.create()) { - * CreateGameServerClusterRequest request = - * CreateGameServerClusterRequest.newBuilder() - * .setParent(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) - * .setGameServerClusterId("gameServerClusterId-1301104032") - * .setGameServerCluster(GameServerCluster.newBuilder().build()) - * .build(); - * OperationFuture- */ - public final OperationCallable< - CreateGameServerClusterRequest, GameServerCluster, OperationMetadata> - createGameServerClusterOperationCallable() { - return stub.createGameServerClusterOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new game server cluster in a given project and location. - * - *future = - * gameServerClustersServiceClient - * .createGameServerClusterOperationCallable() - * .futureCall(request); - * // Do something. - * GameServerCluster response = future.get(); - * } - * }
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (GameServerClustersServiceClient gameServerClustersServiceClient = - * GameServerClustersServiceClient.create()) { - * CreateGameServerClusterRequest request = - * CreateGameServerClusterRequest.newBuilder() - * .setParent(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) - * .setGameServerClusterId("gameServerClusterId-1301104032") - * .setGameServerCluster(GameServerCluster.newBuilder().build()) - * .build(); - * ApiFuture- */ - public final UnaryCallablefuture = - * gameServerClustersServiceClient.createGameServerClusterCallable().futureCall(request); - * // Do something. - * Operation response = future.get(); - * } - * }
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (GameServerClustersServiceClient gameServerClustersServiceClient = - * GameServerClustersServiceClient.create()) { - * PreviewCreateGameServerClusterRequest request = - * PreviewCreateGameServerClusterRequest.newBuilder() - * .setParent(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) - * .setGameServerClusterId("gameServerClusterId-1301104032") - * .setGameServerCluster(GameServerCluster.newBuilder().build()) - * .setPreviewTime(Timestamp.newBuilder().build()) - * .setView(GameServerClusterView.forNumber(0)) - * .build(); - * PreviewCreateGameServerClusterResponse response = - * gameServerClustersServiceClient.previewCreateGameServerCluster(request); - * } - * }- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final PreviewCreateGameServerClusterResponse previewCreateGameServerCluster( - PreviewCreateGameServerClusterRequest request) { - return previewCreateGameServerClusterCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Previews creation of a new game server cluster in a given project and location. - * - *
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (GameServerClustersServiceClient gameServerClustersServiceClient = - * GameServerClustersServiceClient.create()) { - * PreviewCreateGameServerClusterRequest request = - * PreviewCreateGameServerClusterRequest.newBuilder() - * .setParent(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) - * .setGameServerClusterId("gameServerClusterId-1301104032") - * .setGameServerCluster(GameServerCluster.newBuilder().build()) - * .setPreviewTime(Timestamp.newBuilder().build()) - * .setView(GameServerClusterView.forNumber(0)) - * .build(); - * ApiFuture- */ - public final UnaryCallable< - PreviewCreateGameServerClusterRequest, PreviewCreateGameServerClusterResponse> - previewCreateGameServerClusterCallable() { - return stub.previewCreateGameServerClusterCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a single game server cluster. - * - *future = - * gameServerClustersServiceClient - * .previewCreateGameServerClusterCallable() - * .futureCall(request); - * // Do something. - * PreviewCreateGameServerClusterResponse response = future.get(); - * } - * }
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (GameServerClustersServiceClient gameServerClustersServiceClient = - * GameServerClustersServiceClient.create()) { - * GameServerClusterName name = - * GameServerClusterName.of("[PROJECT]", "[LOCATION]", "[REALM]", "[CLUSTER]"); - * gameServerClustersServiceClient.deleteGameServerClusterAsync(name).get(); - * } - * }- * - * @param name Required. The name of the game server cluster to delete, in the following form: - * `projects/{project}/locations/{location}/gameServerClusters/{cluster}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (GameServerClustersServiceClient gameServerClustersServiceClient = - * GameServerClustersServiceClient.create()) { - * String name = - * GameServerClusterName.of("[PROJECT]", "[LOCATION]", "[REALM]", "[CLUSTER]").toString(); - * gameServerClustersServiceClient.deleteGameServerClusterAsync(name).get(); - * } - * }- * - * @param name Required. The name of the game server cluster to delete, in the following form: - * `projects/{project}/locations/{location}/gameServerClusters/{cluster}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (GameServerClustersServiceClient gameServerClustersServiceClient = - * GameServerClustersServiceClient.create()) { - * DeleteGameServerClusterRequest request = - * DeleteGameServerClusterRequest.newBuilder() - * .setName( - * GameServerClusterName.of("[PROJECT]", "[LOCATION]", "[REALM]", "[CLUSTER]") - * .toString()) - * .build(); - * gameServerClustersServiceClient.deleteGameServerClusterAsync(request).get(); - * } - * }- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (GameServerClustersServiceClient gameServerClustersServiceClient = - * GameServerClustersServiceClient.create()) { - * DeleteGameServerClusterRequest request = - * DeleteGameServerClusterRequest.newBuilder() - * .setName( - * GameServerClusterName.of("[PROJECT]", "[LOCATION]", "[REALM]", "[CLUSTER]") - * .toString()) - * .build(); - * OperationFuture- */ - public final OperationCallablefuture = - * gameServerClustersServiceClient - * .deleteGameServerClusterOperationCallable() - * .futureCall(request); - * // Do something. - * future.get(); - * } - * }
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (GameServerClustersServiceClient gameServerClustersServiceClient = - * GameServerClustersServiceClient.create()) { - * DeleteGameServerClusterRequest request = - * DeleteGameServerClusterRequest.newBuilder() - * .setName( - * GameServerClusterName.of("[PROJECT]", "[LOCATION]", "[REALM]", "[CLUSTER]") - * .toString()) - * .build(); - * ApiFuture- */ - public final UnaryCallablefuture = - * gameServerClustersServiceClient.deleteGameServerClusterCallable().futureCall(request); - * // Do something. - * future.get(); - * } - * }
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (GameServerClustersServiceClient gameServerClustersServiceClient = - * GameServerClustersServiceClient.create()) { - * PreviewDeleteGameServerClusterRequest request = - * PreviewDeleteGameServerClusterRequest.newBuilder() - * .setName( - * GameServerClusterName.of("[PROJECT]", "[LOCATION]", "[REALM]", "[CLUSTER]") - * .toString()) - * .setPreviewTime(Timestamp.newBuilder().build()) - * .build(); - * PreviewDeleteGameServerClusterResponse response = - * gameServerClustersServiceClient.previewDeleteGameServerCluster(request); - * } - * }- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final PreviewDeleteGameServerClusterResponse previewDeleteGameServerCluster( - PreviewDeleteGameServerClusterRequest request) { - return previewDeleteGameServerClusterCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Previews deletion of a single game server cluster. - * - *
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (GameServerClustersServiceClient gameServerClustersServiceClient = - * GameServerClustersServiceClient.create()) { - * PreviewDeleteGameServerClusterRequest request = - * PreviewDeleteGameServerClusterRequest.newBuilder() - * .setName( - * GameServerClusterName.of("[PROJECT]", "[LOCATION]", "[REALM]", "[CLUSTER]") - * .toString()) - * .setPreviewTime(Timestamp.newBuilder().build()) - * .build(); - * ApiFuture- */ - public final UnaryCallable< - PreviewDeleteGameServerClusterRequest, PreviewDeleteGameServerClusterResponse> - previewDeleteGameServerClusterCallable() { - return stub.previewDeleteGameServerClusterCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Patches a single game server cluster. - * - *future = - * gameServerClustersServiceClient - * .previewDeleteGameServerClusterCallable() - * .futureCall(request); - * // Do something. - * PreviewDeleteGameServerClusterResponse response = future.get(); - * } - * }
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * 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 - */ - public final OperationFuture
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (GameServerClustersServiceClient gameServerClustersServiceClient = - * GameServerClustersServiceClient.create()) { - * UpdateGameServerClusterRequest request = - * UpdateGameServerClusterRequest.newBuilder() - * .setGameServerCluster(GameServerCluster.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) - * .build(); - * GameServerCluster response = - * gameServerClustersServiceClient.updateGameServerClusterAsync(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 - */ - public final OperationFuture
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (GameServerClustersServiceClient gameServerClustersServiceClient = - * GameServerClustersServiceClient.create()) { - * UpdateGameServerClusterRequest request = - * UpdateGameServerClusterRequest.newBuilder() - * .setGameServerCluster(GameServerCluster.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) - * .build(); - * OperationFuture- */ - public final OperationCallable< - UpdateGameServerClusterRequest, GameServerCluster, OperationMetadata> - updateGameServerClusterOperationCallable() { - return stub.updateGameServerClusterOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Patches a single game server cluster. - * - *future = - * gameServerClustersServiceClient - * .updateGameServerClusterOperationCallable() - * .futureCall(request); - * // Do something. - * GameServerCluster response = future.get(); - * } - * }
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (GameServerClustersServiceClient gameServerClustersServiceClient = - * GameServerClustersServiceClient.create()) { - * UpdateGameServerClusterRequest request = - * UpdateGameServerClusterRequest.newBuilder() - * .setGameServerCluster(GameServerCluster.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) - * .build(); - * ApiFuture- */ - public final UnaryCallablefuture = - * gameServerClustersServiceClient.updateGameServerClusterCallable().futureCall(request); - * // Do something. - * Operation response = future.get(); - * } - * }
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (GameServerClustersServiceClient gameServerClustersServiceClient = - * GameServerClustersServiceClient.create()) { - * PreviewUpdateGameServerClusterRequest request = - * PreviewUpdateGameServerClusterRequest.newBuilder() - * .setGameServerCluster(GameServerCluster.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) - * .setPreviewTime(Timestamp.newBuilder().build()) - * .build(); - * PreviewUpdateGameServerClusterResponse response = - * gameServerClustersServiceClient.previewUpdateGameServerCluster(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 PreviewUpdateGameServerClusterResponse previewUpdateGameServerCluster( - PreviewUpdateGameServerClusterRequest request) { - return previewUpdateGameServerClusterCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Previews updating a GameServerCluster. - * - *
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (GameServerClustersServiceClient gameServerClustersServiceClient = - * GameServerClustersServiceClient.create()) { - * PreviewUpdateGameServerClusterRequest request = - * PreviewUpdateGameServerClusterRequest.newBuilder() - * .setGameServerCluster(GameServerCluster.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) - * .setPreviewTime(Timestamp.newBuilder().build()) - * .build(); - * ApiFuture- */ - 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 ApiFuturefuture = - * gameServerClustersServiceClient - * .previewUpdateGameServerClusterCallable() - * .futureCall(request); - * // Do something. - * PreviewUpdateGameServerClusterResponse response = future.get(); - * } - * }
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: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * GameServerClustersServiceSettings.Builder gameServerClustersServiceSettingsBuilder = - * GameServerClustersServiceSettings.newBuilder(); - * gameServerClustersServiceSettingsBuilder - * .getGameServerClusterSettings() - * .setRetrySettings( - * gameServerClustersServiceSettingsBuilder - * .getGameServerClusterSettings() - * .getRetrySettings() - * .toBuilder() - * .setTotalTimeout(Duration.ofSeconds(30)) - * .build()); - * GameServerClustersServiceSettings gameServerClustersServiceSettings = - * gameServerClustersServiceSettingsBuilder.build(); - * }- */ -@Generated("by gapic-generator-java") -public class GameServerClustersServiceSettings - extends ClientSettings
Note: This method does not support applying settings to streaming methods.
- */
- public Builder applyToAllUnaryMethods(
- ApiFunction This class provides the ability to make remote calls to the backing service through method
- * calls that map to API methods. Sample code to get started:
- *
- * Note: close() needs to be called on the GameServerConfigsServiceClient object to clean up
- * resources such as threads. In the example above, try-with-resources is used, which automatically
- * calls close().
- *
- * The surface of this class includes several types of Java methods for each of the API's
- * methods:
- *
- * See the individual methods for example code.
- *
- * Many parameters require resource names to be formatted in a particular way. To assist with
- * these names, this class includes a format method for each type of name, and additionally a parse
- * method to extract the individual identifiers contained within names that are returned.
- *
- * This class can be customized by passing in a custom instance of
- * GameServerConfigsServiceSettings to create(). For example:
- *
- * To customize credentials:
- *
- * To customize the endpoint:
- *
- * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
- * the wire:
- *
- * Please refer to the GitHub repository's samples for more quickstart code snippets.
- */
-@Generated("by gapic-generator-java")
-public class GameServerConfigsServiceClient implements BackgroundResource {
- private final GameServerConfigsServiceSettings settings;
- private final GameServerConfigsServiceStub stub;
- private final OperationsClient httpJsonOperationsClient;
- private final com.google.longrunning.OperationsClient operationsClient;
-
- /** Constructs an instance of GameServerConfigsServiceClient with default settings. */
- public static final GameServerConfigsServiceClient create() throws IOException {
- return create(GameServerConfigsServiceSettings.newBuilder().build());
- }
-
- /**
- * Constructs an instance of GameServerConfigsServiceClient, using the given settings. The
- * channels are created based on the settings passed in, or defaults for any settings that are not
- * set.
- */
- public static final GameServerConfigsServiceClient create(
- GameServerConfigsServiceSettings settings) throws IOException {
- return new GameServerConfigsServiceClient(settings);
- }
-
- /**
- * Constructs an instance of GameServerConfigsServiceClient, using the given stub for making
- * calls. This is for advanced usage - prefer using create(GameServerConfigsServiceSettings).
- */
- public static final GameServerConfigsServiceClient create(GameServerConfigsServiceStub stub) {
- return new GameServerConfigsServiceClient(stub);
- }
-
- /**
- * Constructs an instance of GameServerConfigsServiceClient, using the given settings. This is
- * protected so that it is easy to make a subclass, but otherwise, the static factory methods
- * should be preferred.
- */
- protected GameServerConfigsServiceClient(GameServerConfigsServiceSettings settings)
- throws IOException {
- this.settings = settings;
- this.stub = ((GameServerConfigsServiceStubSettings) settings.getStubSettings()).createStub();
- this.operationsClient =
- com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
- this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
- }
-
- protected GameServerConfigsServiceClient(GameServerConfigsServiceStub stub) {
- this.settings = null;
- this.stub = stub;
- this.operationsClient =
- com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
- this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
- }
-
- public final GameServerConfigsServiceSettings getSettings() {
- return settings;
- }
-
- public GameServerConfigsServiceStub getStub() {
- return stub;
- }
-
- /**
- * Returns the OperationsClient that can be used to query the status of a long-running operation
- * returned by another API method call.
- */
- public final com.google.longrunning.OperationsClient getOperationsClient() {
- return operationsClient;
- }
-
- /**
- * Returns the OperationsClient that can be used to query the status of a long-running operation
- * returned by another API method call.
- */
- @BetaApi
- public final OperationsClient getHttpJsonOperationsClient() {
- return httpJsonOperationsClient;
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists game server configs in a given project, location, and game server deployment.
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * 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:
- *
- * The default instance has everything set to sensible defaults:
- *
- * The builder of this class is recursive, so contained classes are themselves builders. When
- * build() is called, the tree of builders is called to create the complete settings object.
- *
- * For example, to set the total timeout of getGameServerConfig to 30 seconds:
- *
- * Note: This method does not support applying settings to streaming methods.
- */
- public Builder applyToAllUnaryMethods(
- ApiFunction This class provides the ability to make remote calls to the backing service through method
- * calls that map to API methods. Sample code to get started:
- *
- * Note: close() needs to be called on the GameServerDeploymentsServiceClient object to clean up
- * resources such as threads. In the example above, try-with-resources is used, which automatically
- * calls close().
- *
- * The surface of this class includes several types of Java methods for each of the API's
- * methods:
- *
- * See the individual methods for example code.
- *
- * Many parameters require resource names to be formatted in a particular way. To assist with
- * these names, this class includes a format method for each type of name, and additionally a parse
- * method to extract the individual identifiers contained within names that are returned.
- *
- * This class can be customized by passing in a custom instance of
- * GameServerDeploymentsServiceSettings to create(). For example:
- *
- * To customize credentials:
- *
- * To customize the endpoint:
- *
- * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
- * the wire:
- *
- * Please refer to the GitHub repository's samples for more quickstart code snippets.
- */
-@Generated("by gapic-generator-java")
-public class GameServerDeploymentsServiceClient implements BackgroundResource {
- private final GameServerDeploymentsServiceSettings settings;
- private final GameServerDeploymentsServiceStub stub;
- private final OperationsClient httpJsonOperationsClient;
- private final com.google.longrunning.OperationsClient operationsClient;
-
- /** Constructs an instance of GameServerDeploymentsServiceClient with default settings. */
- public static final GameServerDeploymentsServiceClient create() throws IOException {
- return create(GameServerDeploymentsServiceSettings.newBuilder().build());
- }
-
- /**
- * Constructs an instance of GameServerDeploymentsServiceClient, using the given settings. The
- * channels are created based on the settings passed in, or defaults for any settings that are not
- * set.
- */
- public static final GameServerDeploymentsServiceClient create(
- GameServerDeploymentsServiceSettings settings) throws IOException {
- return new GameServerDeploymentsServiceClient(settings);
- }
-
- /**
- * Constructs an instance of GameServerDeploymentsServiceClient, using the given stub for making
- * calls. This is for advanced usage - prefer using create(GameServerDeploymentsServiceSettings).
- */
- 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 =
- com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
- this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
- }
-
- protected GameServerDeploymentsServiceClient(GameServerDeploymentsServiceStub stub) {
- this.settings = null;
- this.stub = stub;
- this.operationsClient =
- com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
- this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
- }
-
- public final GameServerDeploymentsServiceSettings getSettings() {
- return settings;
- }
-
- 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.
- */
- public final com.google.longrunning.OperationsClient getOperationsClient() {
- return operationsClient;
- }
-
- /**
- * Returns the OperationsClient that can be used to query the status of a long-running operation
- * returned by another API method call.
- */
- @BetaApi
- public final OperationsClient getHttpJsonOperationsClient() {
- return httpJsonOperationsClient;
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists game server deployments in a given project and location.
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * 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:
- *
- * 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:
- *
- * To customize the endpoint:
- *
- * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
- * the wire:
- *
- * Please refer to the GitHub repository's samples for more quickstart code snippets.
- */
-@Generated("by gapic-generator-java")
-public class RealmsServiceClient implements BackgroundResource {
- private final RealmsServiceSettings settings;
- private final RealmsServiceStub stub;
- private final OperationsClient httpJsonOperationsClient;
- private final com.google.longrunning.OperationsClient operationsClient;
-
- /** Constructs an instance of RealmsServiceClient with default settings. */
- public static final RealmsServiceClient create() throws IOException {
- return create(RealmsServiceSettings.newBuilder().build());
- }
-
- /**
- * Constructs an instance of RealmsServiceClient, using the given settings. The channels are
- * created based on the settings passed in, or defaults for any settings that are not set.
- */
- public static final RealmsServiceClient create(RealmsServiceSettings settings)
- throws IOException {
- return new RealmsServiceClient(settings);
- }
-
- /**
- * Constructs an instance of RealmsServiceClient, using the given stub for making calls. This is
- * for advanced usage - prefer using create(RealmsServiceSettings).
- */
- 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 =
- com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
- this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
- }
-
- protected RealmsServiceClient(RealmsServiceStub stub) {
- this.settings = null;
- this.stub = stub;
- this.operationsClient =
- com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
- this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
- }
-
- public final RealmsServiceSettings getSettings() {
- return settings;
- }
-
- 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.
- */
- public final com.google.longrunning.OperationsClient getOperationsClient() {
- return operationsClient;
- }
-
- /**
- * Returns the OperationsClient that can be used to query the status of a long-running operation
- * returned by another API method call.
- */
- @BetaApi
- public final OperationsClient getHttpJsonOperationsClient() {
- return httpJsonOperationsClient;
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists realms in a given project and location.
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * 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:
- *
- * ======================= GameServerConfigsServiceClient =======================
- *
- * Service Description: The game server config configures the game servers in an Agones fleet.
- *
- * Sample for GameServerConfigsServiceClient:
- *
- * ======================= GameServerDeploymentsServiceClient =======================
- *
- * Service Description: The game server deployment is used to control the deployment of Agones
- * fleets.
- *
- * Sample for GameServerDeploymentsServiceClient:
- *
- * ======================= RealmsServiceClient =======================
- *
- * Service Description: A realm is a grouping of game server clusters that are considered
- * interchangeable.
- *
- * Sample for RealmsServiceClient:
- *
- * This class is for advanced usage and reflects the underlying API directly.
- */
-@Generated("by gapic-generator-java")
-public abstract class GameServerClustersServiceStub implements BackgroundResource {
-
- public OperationsStub getOperationsStub() {
- return null;
- }
-
- public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() {
- return null;
- }
-
- 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-java")
-public abstract class GameServerConfigsServiceStub implements BackgroundResource {
-
- public OperationsStub getOperationsStub() {
- return null;
- }
-
- public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() {
- return null;
- }
-
- 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 getGameServerConfig to 30 seconds:
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerConfigsServiceClient gameServerConfigsServiceClient =
- * GameServerConfigsServiceClient.create()) {
- * GameServerConfigName name =
- * GameServerConfigName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[CONFIG]");
- * GameServerConfig response = gameServerConfigsServiceClient.getGameServerConfig(name);
- * }
- * }
- *
- *
- *
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * GameServerConfigsServiceSettings gameServerConfigsServiceSettings =
- * GameServerConfigsServiceSettings.newBuilder()
- * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- * .build();
- * GameServerConfigsServiceClient gameServerConfigsServiceClient =
- * GameServerConfigsServiceClient.create(gameServerConfigsServiceSettings);
- * }
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * GameServerConfigsServiceSettings gameServerConfigsServiceSettings =
- * GameServerConfigsServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * GameServerConfigsServiceClient gameServerConfigsServiceClient =
- * GameServerConfigsServiceClient.create(gameServerConfigsServiceSettings);
- * }
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * GameServerConfigsServiceSettings gameServerConfigsServiceSettings =
- * GameServerConfigsServiceSettings.newHttpJsonBuilder().build();
- * GameServerConfigsServiceClient gameServerConfigsServiceClient =
- * GameServerConfigsServiceClient.create(gameServerConfigsServiceSettings);
- * }
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerConfigsServiceClient gameServerConfigsServiceClient =
- * GameServerConfigsServiceClient.create()) {
- * GameServerDeploymentName parent =
- * GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
- * for (GameServerConfig element :
- * gameServerConfigsServiceClient.listGameServerConfigs(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param parent Required. The parent resource name, in the following form:
- * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListGameServerConfigsPagedResponse listGameServerConfigs(
- GameServerDeploymentName parent) {
- ListGameServerConfigsRequest request =
- ListGameServerConfigsRequest.newBuilder()
- .setParent(parent == null ? null : parent.toString())
- .build();
- return listGameServerConfigs(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists game server configs in a given project, location, and game server deployment.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerConfigsServiceClient gameServerConfigsServiceClient =
- * GameServerConfigsServiceClient.create()) {
- * String parent =
- * GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString();
- * for (GameServerConfig element :
- * gameServerConfigsServiceClient.listGameServerConfigs(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param parent Required. The parent resource name, in the following form:
- * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListGameServerConfigsPagedResponse listGameServerConfigs(String parent) {
- ListGameServerConfigsRequest request =
- ListGameServerConfigsRequest.newBuilder().setParent(parent).build();
- return listGameServerConfigs(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists game server configs in a given project, location, and game server deployment.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerConfigsServiceClient gameServerConfigsServiceClient =
- * GameServerConfigsServiceClient.create()) {
- * ListGameServerConfigsRequest request =
- * ListGameServerConfigsRequest.newBuilder()
- * .setParent(
- * GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setFilter("filter-1274492040")
- * .setOrderBy("orderBy-1207110587")
- * .build();
- * for (GameServerConfig element :
- * gameServerConfigsServiceClient.listGameServerConfigs(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 ListGameServerConfigsPagedResponse listGameServerConfigs(
- ListGameServerConfigsRequest request) {
- return listGameServerConfigsPagedCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists game server configs in a given project, location, and game server deployment.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerConfigsServiceClient gameServerConfigsServiceClient =
- * GameServerConfigsServiceClient.create()) {
- * ListGameServerConfigsRequest request =
- * ListGameServerConfigsRequest.newBuilder()
- * .setParent(
- * GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setFilter("filter-1274492040")
- * .setOrderBy("orderBy-1207110587")
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerConfigsServiceClient gameServerConfigsServiceClient =
- * GameServerConfigsServiceClient.create()) {
- * ListGameServerConfigsRequest request =
- * ListGameServerConfigsRequest.newBuilder()
- * .setParent(
- * GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setFilter("filter-1274492040")
- * .setOrderBy("orderBy-1207110587")
- * .build();
- * while (true) {
- * ListGameServerConfigsResponse response =
- * gameServerConfigsServiceClient.listGameServerConfigsCallable().call(request);
- * for (GameServerConfig element : response.getGameServerConfigsList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
- * }
- * }
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerConfigsServiceClient gameServerConfigsServiceClient =
- * GameServerConfigsServiceClient.create()) {
- * GameServerConfigName name =
- * GameServerConfigName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[CONFIG]");
- * GameServerConfig response = gameServerConfigsServiceClient.getGameServerConfig(name);
- * }
- * }
- *
- * @param name Required. The name of the game server config to retrieve, in the following form:
- * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final GameServerConfig getGameServerConfig(GameServerConfigName name) {
- GetGameServerConfigRequest request =
- GetGameServerConfigRequest.newBuilder()
- .setName(name == null ? null : name.toString())
- .build();
- return getGameServerConfig(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets details of a single game server config.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerConfigsServiceClient gameServerConfigsServiceClient =
- * GameServerConfigsServiceClient.create()) {
- * String name =
- * GameServerConfigName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[CONFIG]").toString();
- * GameServerConfig response = gameServerConfigsServiceClient.getGameServerConfig(name);
- * }
- * }
- *
- * @param name Required. The name of the game server config to retrieve, in the following form:
- * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final GameServerConfig getGameServerConfig(String name) {
- GetGameServerConfigRequest request =
- GetGameServerConfigRequest.newBuilder().setName(name).build();
- return getGameServerConfig(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets details of a single game server config.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerConfigsServiceClient gameServerConfigsServiceClient =
- * GameServerConfigsServiceClient.create()) {
- * GetGameServerConfigRequest request =
- * GetGameServerConfigRequest.newBuilder()
- * .setName(
- * GameServerConfigName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[CONFIG]")
- * .toString())
- * .build();
- * GameServerConfig response = gameServerConfigsServiceClient.getGameServerConfig(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 GameServerConfig getGameServerConfig(GetGameServerConfigRequest request) {
- return getGameServerConfigCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets details of a single game server config.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerConfigsServiceClient gameServerConfigsServiceClient =
- * GameServerConfigsServiceClient.create()) {
- * GetGameServerConfigRequest request =
- * GetGameServerConfigRequest.newBuilder()
- * .setName(
- * GameServerConfigName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[CONFIG]")
- * .toString())
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerConfigsServiceClient gameServerConfigsServiceClient =
- * GameServerConfigsServiceClient.create()) {
- * GameServerDeploymentName parent =
- * GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
- * GameServerConfig gameServerConfig = GameServerConfig.newBuilder().build();
- * GameServerConfig response =
- * gameServerConfigsServiceClient
- * .createGameServerConfigAsync(parent, gameServerConfig)
- * .get();
- * }
- * }
- *
- * @param parent Required. The parent resource name, in the following form:
- * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/`.
- * @param gameServerConfig Required. The game server config resource to be created.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerConfigsServiceClient gameServerConfigsServiceClient =
- * GameServerConfigsServiceClient.create()) {
- * String parent =
- * GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString();
- * GameServerConfig gameServerConfig = GameServerConfig.newBuilder().build();
- * GameServerConfig response =
- * gameServerConfigsServiceClient
- * .createGameServerConfigAsync(parent, gameServerConfig)
- * .get();
- * }
- * }
- *
- * @param parent Required. The parent resource name, in the following form:
- * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/`.
- * @param gameServerConfig Required. The game server config resource to be created.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerConfigsServiceClient gameServerConfigsServiceClient =
- * GameServerConfigsServiceClient.create()) {
- * CreateGameServerConfigRequest request =
- * CreateGameServerConfigRequest.newBuilder()
- * .setParent(
- * GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
- * .setConfigId("configId-580140035")
- * .setGameServerConfig(GameServerConfig.newBuilder().build())
- * .build();
- * GameServerConfig response =
- * gameServerConfigsServiceClient.createGameServerConfigAsync(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
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerConfigsServiceClient gameServerConfigsServiceClient =
- * GameServerConfigsServiceClient.create()) {
- * CreateGameServerConfigRequest request =
- * CreateGameServerConfigRequest.newBuilder()
- * .setParent(
- * GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
- * .setConfigId("configId-580140035")
- * .setGameServerConfig(GameServerConfig.newBuilder().build())
- * .build();
- * OperationFuture
- */
- public final OperationCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerConfigsServiceClient gameServerConfigsServiceClient =
- * GameServerConfigsServiceClient.create()) {
- * CreateGameServerConfigRequest request =
- * CreateGameServerConfigRequest.newBuilder()
- * .setParent(
- * GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
- * .setConfigId("configId-580140035")
- * .setGameServerConfig(GameServerConfig.newBuilder().build())
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerConfigsServiceClient gameServerConfigsServiceClient =
- * GameServerConfigsServiceClient.create()) {
- * GameServerConfigName name =
- * GameServerConfigName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[CONFIG]");
- * gameServerConfigsServiceClient.deleteGameServerConfigAsync(name).get();
- * }
- * }
- *
- * @param name Required. The name of the game server config to delete, in the following form:
- * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerConfigsServiceClient gameServerConfigsServiceClient =
- * GameServerConfigsServiceClient.create()) {
- * String name =
- * GameServerConfigName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[CONFIG]").toString();
- * gameServerConfigsServiceClient.deleteGameServerConfigAsync(name).get();
- * }
- * }
- *
- * @param name Required. The name of the game server config to delete, in the following form:
- * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerConfigsServiceClient gameServerConfigsServiceClient =
- * GameServerConfigsServiceClient.create()) {
- * DeleteGameServerConfigRequest request =
- * DeleteGameServerConfigRequest.newBuilder()
- * .setName(
- * GameServerConfigName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[CONFIG]")
- * .toString())
- * .build();
- * gameServerConfigsServiceClient.deleteGameServerConfigAsync(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
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerConfigsServiceClient gameServerConfigsServiceClient =
- * GameServerConfigsServiceClient.create()) {
- * DeleteGameServerConfigRequest request =
- * DeleteGameServerConfigRequest.newBuilder()
- * .setName(
- * GameServerConfigName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[CONFIG]")
- * .toString())
- * .build();
- * OperationFuture
- */
- public final OperationCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerConfigsServiceClient gameServerConfigsServiceClient =
- * GameServerConfigsServiceClient.create()) {
- * DeleteGameServerConfigRequest request =
- * DeleteGameServerConfigRequest.newBuilder()
- * .setName(
- * GameServerConfigName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[CONFIG]")
- * .toString())
- * .build();
- * ApiFuture
- */
- public final UnaryCallable
- *
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * GameServerConfigsServiceSettings.Builder gameServerConfigsServiceSettingsBuilder =
- * GameServerConfigsServiceSettings.newBuilder();
- * gameServerConfigsServiceSettingsBuilder
- * .getGameServerConfigSettings()
- * .setRetrySettings(
- * gameServerConfigsServiceSettingsBuilder
- * .getGameServerConfigSettings()
- * .getRetrySettings()
- * .toBuilder()
- * .setTotalTimeout(Duration.ofSeconds(30))
- * .build());
- * GameServerConfigsServiceSettings gameServerConfigsServiceSettings =
- * gameServerConfigsServiceSettingsBuilder.build();
- * }
- */
-@Generated("by gapic-generator-java")
-public class GameServerConfigsServiceSettings
- extends ClientSettings{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * GameServerDeploymentName name =
- * GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
- * GameServerDeployment response =
- * gameServerDeploymentsServiceClient.getGameServerDeployment(name);
- * }
- * }
- *
- *
- *
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * GameServerDeploymentsServiceSettings gameServerDeploymentsServiceSettings =
- * GameServerDeploymentsServiceSettings.newBuilder()
- * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- * .build();
- * GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create(gameServerDeploymentsServiceSettings);
- * }
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * GameServerDeploymentsServiceSettings gameServerDeploymentsServiceSettings =
- * GameServerDeploymentsServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create(gameServerDeploymentsServiceSettings);
- * }
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * GameServerDeploymentsServiceSettings gameServerDeploymentsServiceSettings =
- * GameServerDeploymentsServiceSettings.newHttpJsonBuilder().build();
- * GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create(gameServerDeploymentsServiceSettings);
- * }
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * for (GameServerDeployment element :
- * gameServerDeploymentsServiceClient.listGameServerDeployments(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param parent Required. The parent resource name, in the following form:
- * `projects/{project}/locations/{location}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListGameServerDeploymentsPagedResponse listGameServerDeployments(
- LocationName parent) {
- ListGameServerDeploymentsRequest request =
- ListGameServerDeploymentsRequest.newBuilder()
- .setParent(parent == null ? null : parent.toString())
- .build();
- return listGameServerDeployments(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists game server deployments in a given project and location.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
- * for (GameServerDeployment element :
- * gameServerDeploymentsServiceClient.listGameServerDeployments(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param parent Required. The parent resource name, in the following form:
- * `projects/{project}/locations/{location}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListGameServerDeploymentsPagedResponse listGameServerDeployments(String parent) {
- ListGameServerDeploymentsRequest request =
- ListGameServerDeploymentsRequest.newBuilder().setParent(parent).build();
- return listGameServerDeployments(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists game server deployments in a given project and location.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * ListGameServerDeploymentsRequest request =
- * ListGameServerDeploymentsRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setFilter("filter-1274492040")
- * .setOrderBy("orderBy-1207110587")
- * .build();
- * for (GameServerDeployment element :
- * gameServerDeploymentsServiceClient.listGameServerDeployments(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 ListGameServerDeploymentsPagedResponse listGameServerDeployments(
- ListGameServerDeploymentsRequest request) {
- return listGameServerDeploymentsPagedCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists game server deployments in a given project and location.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * ListGameServerDeploymentsRequest request =
- * ListGameServerDeploymentsRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setFilter("filter-1274492040")
- * .setOrderBy("orderBy-1207110587")
- * .build();
- * ApiFuture
- */
- public final UnaryCallable<
- ListGameServerDeploymentsRequest, ListGameServerDeploymentsPagedResponse>
- listGameServerDeploymentsPagedCallable() {
- return stub.listGameServerDeploymentsPagedCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists game server deployments in a given project and location.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * ListGameServerDeploymentsRequest request =
- * ListGameServerDeploymentsRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setFilter("filter-1274492040")
- * .setOrderBy("orderBy-1207110587")
- * .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;
- * }
- * }
- * }
- * }
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * GameServerDeploymentName name =
- * GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
- * GameServerDeployment response =
- * gameServerDeploymentsServiceClient.getGameServerDeployment(name);
- * }
- * }
- *
- * @param name Required. The name of the game server delpoyment to retrieve, in the following
- * form: `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final GameServerDeployment getGameServerDeployment(GameServerDeploymentName name) {
- GetGameServerDeploymentRequest request =
- GetGameServerDeploymentRequest.newBuilder()
- .setName(name == null ? null : name.toString())
- .build();
- return getGameServerDeployment(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets details of a single game server deployment.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * String name =
- * GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString();
- * GameServerDeployment response =
- * gameServerDeploymentsServiceClient.getGameServerDeployment(name);
- * }
- * }
- *
- * @param name Required. The name of the game server delpoyment to retrieve, in the following
- * form: `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final GameServerDeployment getGameServerDeployment(String name) {
- GetGameServerDeploymentRequest request =
- GetGameServerDeploymentRequest.newBuilder().setName(name).build();
- return getGameServerDeployment(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets details of a single game server deployment.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * GetGameServerDeploymentRequest request =
- * GetGameServerDeploymentRequest.newBuilder()
- * .setName(
- * GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
- * .build();
- * GameServerDeployment response =
- * gameServerDeploymentsServiceClient.getGameServerDeployment(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 GameServerDeployment getGameServerDeployment(
- GetGameServerDeploymentRequest request) {
- return getGameServerDeploymentCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets details of a single game server deployment.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * GetGameServerDeploymentRequest request =
- * GetGameServerDeploymentRequest.newBuilder()
- * .setName(
- * GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * GameServerDeployment gameServerDeployment = GameServerDeployment.newBuilder().build();
- * GameServerDeployment response =
- * gameServerDeploymentsServiceClient
- * .createGameServerDeploymentAsync(parent, gameServerDeployment)
- * .get();
- * }
- * }
- *
- * @param parent Required. The parent resource name, in the following form:
- * `projects/{project}/locations/{location}`.
- * @param gameServerDeployment Required. The game server delpoyment resource to be created.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
- * GameServerDeployment gameServerDeployment = GameServerDeployment.newBuilder().build();
- * GameServerDeployment response =
- * gameServerDeploymentsServiceClient
- * .createGameServerDeploymentAsync(parent, gameServerDeployment)
- * .get();
- * }
- * }
- *
- * @param parent Required. The parent resource name, in the following form:
- * `projects/{project}/locations/{location}`.
- * @param gameServerDeployment Required. The game server delpoyment resource to be created.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * CreateGameServerDeploymentRequest request =
- * CreateGameServerDeploymentRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setDeploymentId("deploymentId-136894784")
- * .setGameServerDeployment(GameServerDeployment.newBuilder().build())
- * .build();
- * GameServerDeployment response =
- * gameServerDeploymentsServiceClient.createGameServerDeploymentAsync(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
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * CreateGameServerDeploymentRequest request =
- * CreateGameServerDeploymentRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setDeploymentId("deploymentId-136894784")
- * .setGameServerDeployment(GameServerDeployment.newBuilder().build())
- * .build();
- * OperationFuture
- */
- public final OperationCallable<
- CreateGameServerDeploymentRequest, GameServerDeployment, OperationMetadata>
- createGameServerDeploymentOperationCallable() {
- return stub.createGameServerDeploymentOperationCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Creates a new game server deployment in a given project and location.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * CreateGameServerDeploymentRequest request =
- * CreateGameServerDeploymentRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setDeploymentId("deploymentId-136894784")
- * .setGameServerDeployment(GameServerDeployment.newBuilder().build())
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * GameServerDeploymentName name =
- * GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
- * gameServerDeploymentsServiceClient.deleteGameServerDeploymentAsync(name).get();
- * }
- * }
- *
- * @param name Required. The name of the game server delpoyment to delete, in the following form:
- * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * String name =
- * GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString();
- * gameServerDeploymentsServiceClient.deleteGameServerDeploymentAsync(name).get();
- * }
- * }
- *
- * @param name Required. The name of the game server delpoyment to delete, in the following form:
- * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * DeleteGameServerDeploymentRequest request =
- * DeleteGameServerDeploymentRequest.newBuilder()
- * .setName(
- * GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
- * .build();
- * gameServerDeploymentsServiceClient.deleteGameServerDeploymentAsync(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
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * DeleteGameServerDeploymentRequest request =
- * DeleteGameServerDeploymentRequest.newBuilder()
- * .setName(
- * GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
- * .build();
- * OperationFuture
- */
- public final OperationCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * DeleteGameServerDeploymentRequest request =
- * DeleteGameServerDeploymentRequest.newBuilder()
- * .setName(
- * GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * GameServerDeployment gameServerDeployment = GameServerDeployment.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * GameServerDeployment response =
- * gameServerDeploymentsServiceClient
- * .updateGameServerDeploymentAsync(gameServerDeployment, updateMask)
- * .get();
- * }
- * }
- *
- * @param gameServerDeployment Required. The game server delpoyment to be updated. Only fields
- * specified in update_mask are updated.
- * @param updateMask Required. Mask of fields to update. At least one path must be supplied in
- * this field. For the `FieldMask` definition, see
- * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * UpdateGameServerDeploymentRequest request =
- * UpdateGameServerDeploymentRequest.newBuilder()
- * .setGameServerDeployment(GameServerDeployment.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .build();
- * GameServerDeployment response =
- * gameServerDeploymentsServiceClient.updateGameServerDeploymentAsync(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
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * UpdateGameServerDeploymentRequest request =
- * UpdateGameServerDeploymentRequest.newBuilder()
- * .setGameServerDeployment(GameServerDeployment.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .build();
- * OperationFuture
- */
- public final OperationCallable<
- UpdateGameServerDeploymentRequest, GameServerDeployment, OperationMetadata>
- updateGameServerDeploymentOperationCallable() {
- return stub.updateGameServerDeploymentOperationCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Patches a game server deployment.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * UpdateGameServerDeploymentRequest request =
- * UpdateGameServerDeploymentRequest.newBuilder()
- * .setGameServerDeployment(GameServerDeployment.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * GameServerDeploymentName name =
- * GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
- * GameServerDeploymentRollout response =
- * gameServerDeploymentsServiceClient.getGameServerDeploymentRollout(name);
- * }
- * }
- *
- * @param name Required. The name of the game server delpoyment to retrieve, in the following
- * form: `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final GameServerDeploymentRollout getGameServerDeploymentRollout(
- GameServerDeploymentName name) {
- GetGameServerDeploymentRolloutRequest request =
- GetGameServerDeploymentRolloutRequest.newBuilder()
- .setName(name == null ? null : name.toString())
- .build();
- return getGameServerDeploymentRollout(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets details a single game server deployment rollout.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * String name =
- * GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString();
- * GameServerDeploymentRollout response =
- * gameServerDeploymentsServiceClient.getGameServerDeploymentRollout(name);
- * }
- * }
- *
- * @param name Required. The name of the game server delpoyment to retrieve, in the following
- * form: `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final GameServerDeploymentRollout getGameServerDeploymentRollout(String name) {
- GetGameServerDeploymentRolloutRequest request =
- GetGameServerDeploymentRolloutRequest.newBuilder().setName(name).build();
- return getGameServerDeploymentRollout(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets details a single game server deployment rollout.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * GetGameServerDeploymentRolloutRequest request =
- * GetGameServerDeploymentRolloutRequest.newBuilder()
- * .setName(
- * GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
- * .build();
- * GameServerDeploymentRollout response =
- * gameServerDeploymentsServiceClient.getGameServerDeploymentRollout(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 GameServerDeploymentRollout getGameServerDeploymentRollout(
- GetGameServerDeploymentRolloutRequest request) {
- return getGameServerDeploymentRolloutCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets details a single game server deployment rollout.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * GetGameServerDeploymentRolloutRequest request =
- * GetGameServerDeploymentRolloutRequest.newBuilder()
- * .setName(
- * GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * GameServerDeploymentRollout rollout = GameServerDeploymentRollout.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * GameServerDeployment response =
- * gameServerDeploymentsServiceClient
- * .updateGameServerDeploymentRolloutAsync(rollout, updateMask)
- * .get();
- * }
- * }
- *
- * @param rollout Required. The game server delpoyment rollout to be updated. Only fields
- * specified in update_mask are updated.
- * @param updateMask Required. Mask of fields to update. At least one path must be supplied in
- * this field. For the `FieldMask` definition, see
- * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * UpdateGameServerDeploymentRolloutRequest request =
- * UpdateGameServerDeploymentRolloutRequest.newBuilder()
- * .setRollout(GameServerDeploymentRollout.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .build();
- * GameServerDeployment response =
- * gameServerDeploymentsServiceClient.updateGameServerDeploymentRolloutAsync(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
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * UpdateGameServerDeploymentRolloutRequest request =
- * UpdateGameServerDeploymentRolloutRequest.newBuilder()
- * .setRollout(GameServerDeploymentRollout.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .build();
- * OperationFuture
- */
- public final OperationCallable<
- UpdateGameServerDeploymentRolloutRequest, GameServerDeployment, OperationMetadata>
- updateGameServerDeploymentRolloutOperationCallable() {
- return stub.updateGameServerDeploymentRolloutOperationCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Patches a single game server deployment rollout. The method will not return an error if the
- * update does not affect any existing realms. For example - if the default_game_server_config is
- * changed but all existing realms use the override, that is valid. Similarly, if a non existing
- * realm is explicitly called out in game_server_config_overrides field, that will also not result
- * in an error.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * UpdateGameServerDeploymentRolloutRequest request =
- * UpdateGameServerDeploymentRolloutRequest.newBuilder()
- * .setRollout(GameServerDeploymentRollout.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * PreviewGameServerDeploymentRolloutRequest request =
- * PreviewGameServerDeploymentRolloutRequest.newBuilder()
- * .setRollout(GameServerDeploymentRollout.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .setPreviewTime(Timestamp.newBuilder().build())
- * .build();
- * PreviewGameServerDeploymentRolloutResponse response =
- * gameServerDeploymentsServiceClient.previewGameServerDeploymentRollout(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 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.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * PreviewGameServerDeploymentRolloutRequest request =
- * PreviewGameServerDeploymentRolloutRequest.newBuilder()
- * .setRollout(GameServerDeploymentRollout.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .setPreviewTime(Timestamp.newBuilder().build())
- * .build();
- * ApiFuture
- */
- public final UnaryCallable<
- PreviewGameServerDeploymentRolloutRequest, PreviewGameServerDeploymentRolloutResponse>
- previewGameServerDeploymentRolloutCallable() {
- return stub.previewGameServerDeploymentRolloutCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Retrieves information about the current state of the game server deployment. Gathers all the
- * Agones fleets and Agones autoscalers, including fleets running an older version of the game
- * server deployment.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * FetchDeploymentStateRequest request =
- * FetchDeploymentStateRequest.newBuilder().setName("name3373707").build();
- * FetchDeploymentStateResponse response =
- * gameServerDeploymentsServiceClient.fetchDeploymentState(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 FetchDeploymentStateResponse fetchDeploymentState(
- FetchDeploymentStateRequest request) {
- return fetchDeploymentStateCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Retrieves information about the current state of the game server deployment. Gathers all the
- * Agones fleets and Agones autoscalers, including fleets running an older version of the game
- * server deployment.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * FetchDeploymentStateRequest request =
- * FetchDeploymentStateRequest.newBuilder().setName("name3373707").build();
- * ApiFuture
- */
- public final UnaryCallable
- *
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * GameServerDeploymentsServiceSettings.Builder gameServerDeploymentsServiceSettingsBuilder =
- * GameServerDeploymentsServiceSettings.newBuilder();
- * gameServerDeploymentsServiceSettingsBuilder
- * .getGameServerDeploymentSettings()
- * .setRetrySettings(
- * gameServerDeploymentsServiceSettingsBuilder
- * .getGameServerDeploymentSettings()
- * .getRetrySettings()
- * .toBuilder()
- * .setTotalTimeout(Duration.ofSeconds(30))
- * .build());
- * GameServerDeploymentsServiceSettings gameServerDeploymentsServiceSettings =
- * gameServerDeploymentsServiceSettingsBuilder.build();
- * }
- */
-@Generated("by gapic-generator-java")
-public class GameServerDeploymentsServiceSettings
- extends ClientSettings{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
- * RealmName name = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]");
- * Realm response = realmsServiceClient.getRealm(name);
- * }
- * }
- *
- *
- *
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * RealmsServiceSettings realmsServiceSettings =
- * RealmsServiceSettings.newBuilder()
- * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- * .build();
- * RealmsServiceClient realmsServiceClient = RealmsServiceClient.create(realmsServiceSettings);
- * }
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * RealmsServiceSettings realmsServiceSettings =
- * RealmsServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * RealmsServiceClient realmsServiceClient = RealmsServiceClient.create(realmsServiceSettings);
- * }
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * RealmsServiceSettings realmsServiceSettings =
- * RealmsServiceSettings.newHttpJsonBuilder().build();
- * RealmsServiceClient realmsServiceClient = RealmsServiceClient.create(realmsServiceSettings);
- * }
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * for (Realm element : realmsServiceClient.listRealms(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param parent Required. The parent resource name, in the following form:
- * `projects/{project}/locations/{location}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListRealmsPagedResponse listRealms(LocationName parent) {
- ListRealmsRequest request =
- ListRealmsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build();
- return listRealms(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists realms in a given project and location.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
- * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
- * for (Realm element : realmsServiceClient.listRealms(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param parent Required. The parent resource name, in the following form:
- * `projects/{project}/locations/{location}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListRealmsPagedResponse listRealms(String parent) {
- ListRealmsRequest request = ListRealmsRequest.newBuilder().setParent(parent).build();
- return listRealms(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists realms in a given project and location.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
- * ListRealmsRequest request =
- * ListRealmsRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setFilter("filter-1274492040")
- * .setOrderBy("orderBy-1207110587")
- * .build();
- * for (Realm element : realmsServiceClient.listRealms(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 ListRealmsPagedResponse listRealms(ListRealmsRequest request) {
- return listRealmsPagedCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists realms in a given project and location.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
- * ListRealmsRequest request =
- * ListRealmsRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setFilter("filter-1274492040")
- * .setOrderBy("orderBy-1207110587")
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
- * ListRealmsRequest request =
- * ListRealmsRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setFilter("filter-1274492040")
- * .setOrderBy("orderBy-1207110587")
- * .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;
- * }
- * }
- * }
- * }
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
- * RealmName name = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]");
- * Realm response = realmsServiceClient.getRealm(name);
- * }
- * }
- *
- * @param name Required. The name of the realm to retrieve, in the following form:
- * `projects/{project}/locations/{location}/realms/{realm}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Realm getRealm(RealmName name) {
- GetRealmRequest request =
- GetRealmRequest.newBuilder().setName(name == null ? null : name.toString()).build();
- return getRealm(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets details of a single realm.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
- * String name = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString();
- * Realm response = realmsServiceClient.getRealm(name);
- * }
- * }
- *
- * @param name Required. The name of the realm to retrieve, in the following form:
- * `projects/{project}/locations/{location}/realms/{realm}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Realm getRealm(String name) {
- GetRealmRequest request = GetRealmRequest.newBuilder().setName(name).build();
- return getRealm(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets details of a single realm.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
- * GetRealmRequest request =
- * GetRealmRequest.newBuilder()
- * .setName(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString())
- * .build();
- * Realm response = realmsServiceClient.getRealm(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 Realm getRealm(GetRealmRequest request) {
- return getRealmCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets details of a single realm.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
- * GetRealmRequest request =
- * GetRealmRequest.newBuilder()
- * .setName(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString())
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * Realm realm = Realm.newBuilder().build();
- * String realmId = "realmId1080654858";
- * Realm response = realmsServiceClient.createRealmAsync(parent, realm, realmId).get();
- * }
- * }
- *
- * @param parent Required. The parent resource name, in the following form:
- * `projects/{project}/locations/{location}`.
- * @param realm Required. The realm resource to be created.
- * @param realmId Required. The ID of the realm resource to be created.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
- * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
- * Realm realm = Realm.newBuilder().build();
- * String realmId = "realmId1080654858";
- * Realm response = realmsServiceClient.createRealmAsync(parent, realm, realmId).get();
- * }
- * }
- *
- * @param parent Required. The parent resource name, in the following form:
- * `projects/{project}/locations/{location}`.
- * @param realm Required. The realm resource to be created.
- * @param realmId Required. The ID of the realm resource to be created.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
- * CreateRealmRequest request =
- * CreateRealmRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setRealmId("realmId1080654858")
- * .setRealm(Realm.newBuilder().build())
- * .build();
- * Realm response = realmsServiceClient.createRealmAsync(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
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
- * CreateRealmRequest request =
- * CreateRealmRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setRealmId("realmId1080654858")
- * .setRealm(Realm.newBuilder().build())
- * .build();
- * OperationFuture
- */
- public final OperationCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
- * CreateRealmRequest request =
- * CreateRealmRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setRealmId("realmId1080654858")
- * .setRealm(Realm.newBuilder().build())
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
- * RealmName name = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]");
- * realmsServiceClient.deleteRealmAsync(name).get();
- * }
- * }
- *
- * @param name Required. The name of the realm to delete, in the following form:
- * `projects/{project}/locations/{location}/realms/{realm}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
- * String name = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString();
- * realmsServiceClient.deleteRealmAsync(name).get();
- * }
- * }
- *
- * @param name Required. The name of the realm to delete, in the following form:
- * `projects/{project}/locations/{location}/realms/{realm}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
- * DeleteRealmRequest request =
- * DeleteRealmRequest.newBuilder()
- * .setName(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString())
- * .build();
- * realmsServiceClient.deleteRealmAsync(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
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
- * DeleteRealmRequest request =
- * DeleteRealmRequest.newBuilder()
- * .setName(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString())
- * .build();
- * OperationFuture
- */
- public final OperationCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
- * DeleteRealmRequest request =
- * DeleteRealmRequest.newBuilder()
- * .setName(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString())
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
- * Realm realm = Realm.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * Realm response = realmsServiceClient.updateRealmAsync(realm, updateMask).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
- * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
- * UpdateRealmRequest request =
- * UpdateRealmRequest.newBuilder()
- * .setRealm(Realm.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .build();
- * Realm response = realmsServiceClient.updateRealmAsync(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
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
- * UpdateRealmRequest request =
- * UpdateRealmRequest.newBuilder()
- * .setRealm(Realm.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .build();
- * OperationFuture
- */
- public final OperationCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
- * UpdateRealmRequest request =
- * UpdateRealmRequest.newBuilder()
- * .setRealm(Realm.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
- * PreviewRealmUpdateRequest request =
- * PreviewRealmUpdateRequest.newBuilder()
- * .setRealm(Realm.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .setPreviewTime(Timestamp.newBuilder().build())
- * .build();
- * PreviewRealmUpdateResponse response = realmsServiceClient.previewRealmUpdate(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 PreviewRealmUpdateResponse previewRealmUpdate(PreviewRealmUpdateRequest request) {
- return previewRealmUpdateCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Previews patches to a single realm.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
- * PreviewRealmUpdateRequest request =
- * PreviewRealmUpdateRequest.newBuilder()
- * .setRealm(Realm.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .setPreviewTime(Timestamp.newBuilder().build())
- * .build();
- * ApiFuture
- */
- public final UnaryCallable
- *
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * RealmsServiceSettings.Builder realmsServiceSettingsBuilder = RealmsServiceSettings.newBuilder();
- * realmsServiceSettingsBuilder
- * .getRealmSettings()
- * .setRetrySettings(
- * realmsServiceSettingsBuilder
- * .getRealmSettings()
- * .getRetrySettings()
- * .toBuilder()
- * .setTotalTimeout(Duration.ofSeconds(30))
- * .build());
- * RealmsServiceSettings realmsServiceSettings = realmsServiceSettingsBuilder.build();
- * }
- */
-@Generated("by gapic-generator-java")
-public class RealmsServiceSettings extends ClientSettings{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerClustersServiceClient gameServerClustersServiceClient =
- * GameServerClustersServiceClient.create()) {
- * GameServerClusterName name =
- * GameServerClusterName.of("[PROJECT]", "[LOCATION]", "[REALM]", "[CLUSTER]");
- * GameServerCluster response = gameServerClustersServiceClient.getGameServerCluster(name);
- * }
- * }
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerConfigsServiceClient gameServerConfigsServiceClient =
- * GameServerConfigsServiceClient.create()) {
- * GameServerConfigName name =
- * GameServerConfigName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[CONFIG]");
- * GameServerConfig response = gameServerConfigsServiceClient.getGameServerConfig(name);
- * }
- * }
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (GameServerDeploymentsServiceClient gameServerDeploymentsServiceClient =
- * GameServerDeploymentsServiceClient.create()) {
- * GameServerDeploymentName name =
- * GameServerDeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
- * GameServerDeployment response =
- * gameServerDeploymentsServiceClient.getGameServerDeployment(name);
- * }
- * }
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (RealmsServiceClient realmsServiceClient = RealmsServiceClient.create()) {
- * RealmName name = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]");
- * Realm response = realmsServiceClient.getRealm(name);
- * }
- * }
- */
-@Generated("by gapic-generator-java")
-package com.google.cloud.gaming.v1;
-
-import javax.annotation.Generated;
diff --git a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/GameServerClustersServiceStub.java b/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/GameServerClustersServiceStub.java
deleted file mode 100644
index 6c153c560542..000000000000
--- a/java-game-servers/google-cloud-game-servers/src/main/java/com/google/cloud/gaming/v1/stub/GameServerClustersServiceStub.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright 2023 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.cloud.gaming.v1.stub;
-
-import static com.google.cloud.gaming.v1.GameServerClustersServiceClient.ListGameServerClustersPagedResponse;
-
-import com.google.api.gax.core.BackgroundResource;
-import com.google.api.gax.rpc.OperationCallable;
-import com.google.api.gax.rpc.UnaryCallable;
-import com.google.cloud.gaming.v1.CreateGameServerClusterRequest;
-import com.google.cloud.gaming.v1.DeleteGameServerClusterRequest;
-import com.google.cloud.gaming.v1.GameServerCluster;
-import com.google.cloud.gaming.v1.GetGameServerClusterRequest;
-import com.google.cloud.gaming.v1.ListGameServerClustersRequest;
-import com.google.cloud.gaming.v1.ListGameServerClustersResponse;
-import com.google.cloud.gaming.v1.OperationMetadata;
-import com.google.cloud.gaming.v1.PreviewCreateGameServerClusterRequest;
-import com.google.cloud.gaming.v1.PreviewCreateGameServerClusterResponse;
-import com.google.cloud.gaming.v1.PreviewDeleteGameServerClusterRequest;
-import com.google.cloud.gaming.v1.PreviewDeleteGameServerClusterResponse;
-import com.google.cloud.gaming.v1.PreviewUpdateGameServerClusterRequest;
-import com.google.cloud.gaming.v1.PreviewUpdateGameServerClusterResponse;
-import com.google.cloud.gaming.v1.UpdateGameServerClusterRequest;
-import com.google.longrunning.Operation;
-import com.google.longrunning.stub.OperationsStub;
-import com.google.protobuf.Empty;
-import javax.annotation.Generated;
-
-// AUTO-GENERATED DOCUMENTATION AND CLASS.
-/**
- * Base stub class for the GameServerClustersService service API.
- *
- *
- *
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * 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-java")
-public class GameServerClustersServiceStubSettings
- extends StubSettings
- *
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * GameServerConfigsServiceStubSettings.Builder gameServerConfigsServiceSettingsBuilder =
- * GameServerConfigsServiceStubSettings.newBuilder();
- * gameServerConfigsServiceSettingsBuilder
- * .getGameServerConfigSettings()
- * .setRetrySettings(
- * gameServerConfigsServiceSettingsBuilder
- * .getGameServerConfigSettings()
- * .getRetrySettings()
- * .toBuilder()
- * .setTotalTimeout(Duration.ofSeconds(30))
- * .build());
- * GameServerConfigsServiceStubSettings gameServerConfigsServiceSettings =
- * gameServerConfigsServiceSettingsBuilder.build();
- * }
- */
-@Generated("by gapic-generator-java")
-public class GameServerConfigsServiceStubSettings
- extends StubSettings