@BetaApi @Generated(value="by gapic-generator-java") public class GameServerDeploymentsServiceClient extends Object implements com.google.api.gax.core.BackgroundResource
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:
// 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);
}
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:
// 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);
To customize the endpoint:
// 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);
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:
// 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);
Please refer to the GitHub repository's samples for more quickstart code snippets.
| Modifier and Type | Class and Description |
|---|---|
static class |
GameServerDeploymentsServiceClient.ListGameServerDeploymentsFixedSizeCollection |
static class |
GameServerDeploymentsServiceClient.ListGameServerDeploymentsPage |
static class |
GameServerDeploymentsServiceClient.ListGameServerDeploymentsPagedResponse |
| Modifier | Constructor and Description |
|---|---|
protected |
GameServerDeploymentsServiceClient(GameServerDeploymentsServiceSettings settings)
Constructs an instance of GameServerDeploymentsServiceClient, using the given settings.
|
protected |
GameServerDeploymentsServiceClient(GameServerDeploymentsServiceStub stub) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long duration,
TimeUnit unit) |
void |
close() |
static GameServerDeploymentsServiceClient |
create()
Constructs an instance of GameServerDeploymentsServiceClient with default settings.
|
static GameServerDeploymentsServiceClient |
create(GameServerDeploymentsServiceSettings settings)
Constructs an instance of GameServerDeploymentsServiceClient, using the given settings.
|
static GameServerDeploymentsServiceClient |
create(GameServerDeploymentsServiceStub stub)
Constructs an instance of GameServerDeploymentsServiceClient, using the given stub for making
calls.
|
com.google.api.gax.longrunning.OperationFuture<GameServerDeployment,OperationMetadata> |
createGameServerDeploymentAsync(CreateGameServerDeploymentRequest request)
Creates a new game server deployment in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<GameServerDeployment,OperationMetadata> |
createGameServerDeploymentAsync(LocationName parent,
GameServerDeployment gameServerDeployment)
Creates a new game server deployment in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<GameServerDeployment,OperationMetadata> |
createGameServerDeploymentAsync(String parent,
GameServerDeployment gameServerDeployment)
Creates a new game server deployment in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<CreateGameServerDeploymentRequest,com.google.longrunning.Operation> |
createGameServerDeploymentCallable()
Creates a new game server deployment in a given project and location.
|
com.google.api.gax.rpc.OperationCallable<CreateGameServerDeploymentRequest,GameServerDeployment,OperationMetadata> |
createGameServerDeploymentOperationCallable()
Creates a new game server deployment in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteGameServerDeploymentAsync(DeleteGameServerDeploymentRequest request)
Deletes a single game server deployment.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteGameServerDeploymentAsync(GameServerDeploymentName name)
Deletes a single game server deployment.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteGameServerDeploymentAsync(String name)
Deletes a single game server deployment.
|
com.google.api.gax.rpc.UnaryCallable<DeleteGameServerDeploymentRequest,com.google.longrunning.Operation> |
deleteGameServerDeploymentCallable()
Deletes a single game server deployment.
|
com.google.api.gax.rpc.OperationCallable<DeleteGameServerDeploymentRequest,com.google.protobuf.Empty,OperationMetadata> |
deleteGameServerDeploymentOperationCallable()
Deletes a single game server deployment.
|
FetchDeploymentStateResponse |
fetchDeploymentState(FetchDeploymentStateRequest request)
Retrieves information about the current state of the game server deployment.
|
com.google.api.gax.rpc.UnaryCallable<FetchDeploymentStateRequest,FetchDeploymentStateResponse> |
fetchDeploymentStateCallable()
Retrieves information about the current state of the game server deployment.
|
GameServerDeployment |
getGameServerDeployment(GameServerDeploymentName name)
Gets details of a single game server deployment.
|
GameServerDeployment |
getGameServerDeployment(GetGameServerDeploymentRequest request)
Gets details of a single game server deployment.
|
GameServerDeployment |
getGameServerDeployment(String name)
Gets details of a single game server deployment.
|
com.google.api.gax.rpc.UnaryCallable<GetGameServerDeploymentRequest,GameServerDeployment> |
getGameServerDeploymentCallable()
Gets details of a single game server deployment.
|
GameServerDeploymentRollout |
getGameServerDeploymentRollout(GameServerDeploymentName name)
Gets details a single game server deployment rollout.
|
GameServerDeploymentRollout |
getGameServerDeploymentRollout(GetGameServerDeploymentRolloutRequest request)
Gets details a single game server deployment rollout.
|
GameServerDeploymentRollout |
getGameServerDeploymentRollout(String name)
Gets details a single game server deployment rollout.
|
com.google.api.gax.rpc.UnaryCallable<GetGameServerDeploymentRolloutRequest,GameServerDeploymentRollout> |
getGameServerDeploymentRolloutCallable()
Gets details a single game server deployment rollout.
|
com.google.api.gax.httpjson.longrunning.OperationsClient |
getHttpJsonOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.
|
com.google.longrunning.OperationsClient |
getOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.
|
GameServerDeploymentsServiceSettings |
getSettings() |
GameServerDeploymentsServiceStub |
getStub() |
boolean |
isShutdown() |
boolean |
isTerminated() |
GameServerDeploymentsServiceClient.ListGameServerDeploymentsPagedResponse |
listGameServerDeployments(ListGameServerDeploymentsRequest request)
Lists game server deployments in a given project and location.
|
GameServerDeploymentsServiceClient.ListGameServerDeploymentsPagedResponse |
listGameServerDeployments(LocationName parent)
Lists game server deployments in a given project and location.
|
GameServerDeploymentsServiceClient.ListGameServerDeploymentsPagedResponse |
listGameServerDeployments(String parent)
Lists game server deployments in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListGameServerDeploymentsRequest,ListGameServerDeploymentsResponse> |
listGameServerDeploymentsCallable()
Lists game server deployments in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListGameServerDeploymentsRequest,GameServerDeploymentsServiceClient.ListGameServerDeploymentsPagedResponse> |
listGameServerDeploymentsPagedCallable()
Lists game server deployments in a given project and location.
|
PreviewGameServerDeploymentRolloutResponse |
previewGameServerDeploymentRollout(PreviewGameServerDeploymentRolloutRequest request)
Previews the game server deployment rollout.
|
com.google.api.gax.rpc.UnaryCallable<PreviewGameServerDeploymentRolloutRequest,PreviewGameServerDeploymentRolloutResponse> |
previewGameServerDeploymentRolloutCallable()
Previews the game server deployment rollout.
|
void |
shutdown() |
void |
shutdownNow() |
com.google.api.gax.longrunning.OperationFuture<GameServerDeployment,OperationMetadata> |
updateGameServerDeploymentAsync(GameServerDeployment gameServerDeployment,
com.google.protobuf.FieldMask updateMask)
Patches a game server deployment.
|
com.google.api.gax.longrunning.OperationFuture<GameServerDeployment,OperationMetadata> |
updateGameServerDeploymentAsync(UpdateGameServerDeploymentRequest request)
Patches a game server deployment.
|
com.google.api.gax.rpc.UnaryCallable<UpdateGameServerDeploymentRequest,com.google.longrunning.Operation> |
updateGameServerDeploymentCallable()
Patches a game server deployment.
|
com.google.api.gax.rpc.OperationCallable<UpdateGameServerDeploymentRequest,GameServerDeployment,OperationMetadata> |
updateGameServerDeploymentOperationCallable()
Patches a game server deployment.
|
com.google.api.gax.longrunning.OperationFuture<GameServerDeployment,OperationMetadata> |
updateGameServerDeploymentRolloutAsync(GameServerDeploymentRollout rollout,
com.google.protobuf.FieldMask updateMask)
Patches a single game server deployment rollout.
|
com.google.api.gax.longrunning.OperationFuture<GameServerDeployment,OperationMetadata> |
updateGameServerDeploymentRolloutAsync(UpdateGameServerDeploymentRolloutRequest request)
Patches a single game server deployment rollout.
|
com.google.api.gax.rpc.UnaryCallable<UpdateGameServerDeploymentRolloutRequest,com.google.longrunning.Operation> |
updateGameServerDeploymentRolloutCallable()
Patches a single game server deployment rollout.
|
com.google.api.gax.rpc.OperationCallable<UpdateGameServerDeploymentRolloutRequest,GameServerDeployment,OperationMetadata> |
updateGameServerDeploymentRolloutOperationCallable()
Patches a single game server deployment rollout.
|
protected GameServerDeploymentsServiceClient(GameServerDeploymentsServiceSettings settings) throws IOException
IOExceptionprotected GameServerDeploymentsServiceClient(GameServerDeploymentsServiceStub stub)
public static final GameServerDeploymentsServiceClient create() throws IOException
IOExceptionpublic static final GameServerDeploymentsServiceClient create(GameServerDeploymentsServiceSettings settings) throws IOException
IOExceptionpublic static final GameServerDeploymentsServiceClient create(GameServerDeploymentsServiceStub stub)
public final GameServerDeploymentsServiceSettings getSettings()
public GameServerDeploymentsServiceStub getStub()
public final com.google.longrunning.OperationsClient getOperationsClient()
@BetaApi public final com.google.api.gax.httpjson.longrunning.OperationsClient getHttpJsonOperationsClient()
public final GameServerDeploymentsServiceClient.ListGameServerDeploymentsPagedResponse listGameServerDeployments(LocationName parent)
Sample 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);
}
}
parent - Required. The parent resource name. Uses the form:
`projects/{project}/locations/{location}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final GameServerDeploymentsServiceClient.ListGameServerDeploymentsPagedResponse listGameServerDeployments(String parent)
Sample 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);
}
}
parent - Required. The parent resource name. Uses the form:
`projects/{project}/locations/{location}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final GameServerDeploymentsServiceClient.ListGameServerDeploymentsPagedResponse listGameServerDeployments(ListGameServerDeploymentsRequest request)
Sample 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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListGameServerDeploymentsRequest,GameServerDeploymentsServiceClient.ListGameServerDeploymentsPagedResponse> listGameServerDeploymentsPagedCallable()
Sample 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<GameServerDeployment> future =
gameServerDeploymentsServiceClient
.listGameServerDeploymentsPagedCallable()
.futureCall(request);
// Do something.
for (GameServerDeployment element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListGameServerDeploymentsRequest,ListGameServerDeploymentsResponse> listGameServerDeploymentsCallable()
Sample 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 GameServerDeployment getGameServerDeployment(GameServerDeploymentName name)
Sample 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);
}
name - Required. The name of the game server delpoyment to retrieve. Uses the form:
`projects/{project}/locations/{location}/gameServerDeployments/{deployment}`.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final GameServerDeployment getGameServerDeployment(String name)
Sample 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);
}
name - Required. The name of the game server delpoyment to retrieve. Uses the form:
`projects/{project}/locations/{location}/gameServerDeployments/{deployment}`.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final GameServerDeployment getGameServerDeployment(GetGameServerDeploymentRequest request)
Sample 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetGameServerDeploymentRequest,GameServerDeployment> getGameServerDeploymentCallable()
Sample 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<GameServerDeployment> future =
gameServerDeploymentsServiceClient.getGameServerDeploymentCallable().futureCall(request);
// Do something.
GameServerDeployment response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<GameServerDeployment,OperationMetadata> createGameServerDeploymentAsync(LocationName parent, GameServerDeployment gameServerDeployment)
Sample 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();
}
parent - Required. The parent resource name. Uses the form:
`projects/{project}/locations/{location}`.gameServerDeployment - Required. The game server delpoyment resource to be created.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<GameServerDeployment,OperationMetadata> createGameServerDeploymentAsync(String parent, GameServerDeployment gameServerDeployment)
Sample 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();
}
parent - Required. The parent resource name. Uses the form:
`projects/{project}/locations/{location}`.gameServerDeployment - Required. The game server delpoyment resource to be created.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<GameServerDeployment,OperationMetadata> createGameServerDeploymentAsync(CreateGameServerDeploymentRequest request)
Sample 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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateGameServerDeploymentRequest,GameServerDeployment,OperationMetadata> createGameServerDeploymentOperationCallable()
Sample 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<GameServerDeployment, OperationMetadata> future =
gameServerDeploymentsServiceClient
.createGameServerDeploymentOperationCallable()
.futureCall(request);
// Do something.
GameServerDeployment response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateGameServerDeploymentRequest,com.google.longrunning.Operation> createGameServerDeploymentCallable()
Sample 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<Operation> future =
gameServerDeploymentsServiceClient
.createGameServerDeploymentCallable()
.futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteGameServerDeploymentAsync(GameServerDeploymentName name)
Sample 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();
}
name - Required. The name of the game server delpoyment to delete. Uses the form:
`projects/{project}/locations/{location}/gameServerDeployments/{deployment}`.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteGameServerDeploymentAsync(String name)
Sample 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();
}
name - Required. The name of the game server delpoyment to delete. Uses the form:
`projects/{project}/locations/{location}/gameServerDeployments/{deployment}`.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteGameServerDeploymentAsync(DeleteGameServerDeploymentRequest request)
Sample 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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteGameServerDeploymentRequest,com.google.protobuf.Empty,OperationMetadata> deleteGameServerDeploymentOperationCallable()
Sample 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<Empty, OperationMetadata> future =
gameServerDeploymentsServiceClient
.deleteGameServerDeploymentOperationCallable()
.futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteGameServerDeploymentRequest,com.google.longrunning.Operation> deleteGameServerDeploymentCallable()
Sample 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<Operation> future =
gameServerDeploymentsServiceClient
.deleteGameServerDeploymentCallable()
.futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<GameServerDeployment,OperationMetadata> updateGameServerDeploymentAsync(GameServerDeployment gameServerDeployment, com.google.protobuf.FieldMask updateMask)
Sample 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();
}
gameServerDeployment - Required. The game server delpoyment to be updated. Only fields
specified in update_mask are updated.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
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<GameServerDeployment,OperationMetadata> updateGameServerDeploymentAsync(UpdateGameServerDeploymentRequest request)
Sample 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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UpdateGameServerDeploymentRequest,GameServerDeployment,OperationMetadata> updateGameServerDeploymentOperationCallable()
Sample 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<GameServerDeployment, OperationMetadata> future =
gameServerDeploymentsServiceClient
.updateGameServerDeploymentOperationCallable()
.futureCall(request);
// Do something.
GameServerDeployment response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateGameServerDeploymentRequest,com.google.longrunning.Operation> updateGameServerDeploymentCallable()
Sample 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<Operation> future =
gameServerDeploymentsServiceClient
.updateGameServerDeploymentCallable()
.futureCall(request);
// Do something.
Operation response = future.get();
}
public final GameServerDeploymentRollout getGameServerDeploymentRollout(GameServerDeploymentName name)
Sample 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);
}
name - Required. The name of the game server delpoyment to retrieve. Uses the form:
`projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout`.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final GameServerDeploymentRollout getGameServerDeploymentRollout(String name)
Sample 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);
}
name - Required. The name of the game server delpoyment to retrieve. Uses the form:
`projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout`.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final GameServerDeploymentRollout getGameServerDeploymentRollout(GetGameServerDeploymentRolloutRequest request)
Sample 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetGameServerDeploymentRolloutRequest,GameServerDeploymentRollout> getGameServerDeploymentRolloutCallable()
Sample 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<GameServerDeploymentRollout> future =
gameServerDeploymentsServiceClient
.getGameServerDeploymentRolloutCallable()
.futureCall(request);
// Do something.
GameServerDeploymentRollout response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<GameServerDeployment,OperationMetadata> updateGameServerDeploymentRolloutAsync(GameServerDeploymentRollout rollout, com.google.protobuf.FieldMask updateMask)
Sample 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();
}
rollout - Required. The game server delpoyment rollout to be updated. Only fields
specified in update_mask are updated.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
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<GameServerDeployment,OperationMetadata> updateGameServerDeploymentRolloutAsync(UpdateGameServerDeploymentRolloutRequest request)
Sample 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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UpdateGameServerDeploymentRolloutRequest,GameServerDeployment,OperationMetadata> updateGameServerDeploymentRolloutOperationCallable()
Sample 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<GameServerDeployment, OperationMetadata> future =
gameServerDeploymentsServiceClient
.updateGameServerDeploymentRolloutOperationCallable()
.futureCall(request);
// Do something.
GameServerDeployment response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateGameServerDeploymentRolloutRequest,com.google.longrunning.Operation> updateGameServerDeploymentRolloutCallable()
Sample 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<Operation> future =
gameServerDeploymentsServiceClient
.updateGameServerDeploymentRolloutCallable()
.futureCall(request);
// Do something.
Operation response = future.get();
}
public final PreviewGameServerDeploymentRolloutResponse previewGameServerDeploymentRollout(PreviewGameServerDeploymentRolloutRequest request)
Sample 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<PreviewGameServerDeploymentRolloutRequest,PreviewGameServerDeploymentRolloutResponse> previewGameServerDeploymentRolloutCallable()
Sample 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<PreviewGameServerDeploymentRolloutResponse> future =
gameServerDeploymentsServiceClient
.previewGameServerDeploymentRolloutCallable()
.futureCall(request);
// Do something.
PreviewGameServerDeploymentRolloutResponse response = future.get();
}
public final FetchDeploymentStateResponse fetchDeploymentState(FetchDeploymentStateRequest request)
Sample 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<FetchDeploymentStateRequest,FetchDeploymentStateResponse> fetchDeploymentStateCallable()
Sample 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<FetchDeploymentStateResponse> future =
gameServerDeploymentsServiceClient.fetchDeploymentStateCallable().futureCall(request);
// Do something.
FetchDeploymentStateResponse response = future.get();
}
public final void close()
close in interface AutoCloseablepublic void shutdown()
shutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isShutdown()
isShutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isTerminated()
isTerminated in interface com.google.api.gax.core.BackgroundResourcepublic void shutdownNow()
shutdownNow in interface com.google.api.gax.core.BackgroundResourcepublic boolean awaitTermination(long duration,
TimeUnit unit)
throws InterruptedException
awaitTermination in interface com.google.api.gax.core.BackgroundResourceInterruptedExceptionCopyright © 2023 Google LLC. All rights reserved.