com.google.cloud.gkemulticloud.v1.AzureClustersClient Maven / Gradle / Ivy
Show all versions of google-cloud-gke-multi-cloud Show documentation
/*
* Copyright 2024 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.gkemulticloud.v1;
import com.google.api.core.ApiFuture;
import com.google.api.core.ApiFutures;
import com.google.api.core.BetaApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.httpjson.longrunning.OperationsClient;
import com.google.api.gax.longrunning.OperationFuture;
import com.google.api.gax.paging.AbstractFixedSizeCollection;
import com.google.api.gax.paging.AbstractPage;
import com.google.api.gax.paging.AbstractPagedListResponse;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.PageContext;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.gkemulticloud.v1.stub.AzureClustersStub;
import com.google.cloud.gkemulticloud.v1.stub.AzureClustersStubSettings;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.longrunning.Operation;
import com.google.protobuf.Empty;
import com.google.protobuf.FieldMask;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;
// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
* Service Description: The AzureClusters API provides a single centrally managed service to create
* and manage Anthos clusters that run on Azure infrastructure.
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* AzureClientName name = AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]");
* AzureClient response = azureClustersClient.getAzureClient(name);
* }
* }
*
* Note: close() needs to be called on the AzureClustersClient object to clean up resources such
* as threads. In the example above, try-with-resources is used, which automatically calls close().
*
*
* Methods
*
* Method
* Description
* Method Variants
*
*
* CreateAzureClient
* Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource on a given Google Cloud project and region.
*
`AzureClient` resources hold client authentication information needed by the Anthos Multicloud API to manage Azure resources on your Azure subscription on your behalf.
*
If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* createAzureClientAsync(CreateAzureClientRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* createAzureClientAsync(LocationName parent, AzureClient azureClient, String azureClientId)
*
createAzureClientAsync(String parent, AzureClient azureClient, String azureClientId)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* createAzureClientOperationCallable()
*
createAzureClientCallable()
*
*
*
*
* GetAzureClient
* Describes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* getAzureClient(GetAzureClientRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* getAzureClient(AzureClientName name)
*
getAzureClient(String name)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* getAzureClientCallable()
*
*
*
*
* ListAzureClients
* Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources on a given Google Cloud project and region.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* listAzureClients(ListAzureClientsRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* listAzureClients(LocationName parent)
*
listAzureClients(String parent)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* listAzureClientsPagedCallable()
*
listAzureClientsCallable()
*
*
*
*
* DeleteAzureClient
* Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.
*
If the client is used by one or more clusters, deletion will fail and a `FAILED_PRECONDITION` error will be returned.
*
If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* deleteAzureClientAsync(DeleteAzureClientRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* deleteAzureClientAsync(AzureClientName name)
*
deleteAzureClientAsync(String name)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* deleteAzureClientOperationCallable()
*
deleteAzureClientCallable()
*
*
*
*
* CreateAzureCluster
* Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource on a given Google Cloud Platform project and region.
*
If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* createAzureClusterAsync(CreateAzureClusterRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* createAzureClusterAsync(LocationName parent, AzureCluster azureCluster, String azureClusterId)
*
createAzureClusterAsync(String parent, AzureCluster azureCluster, String azureClusterId)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* createAzureClusterOperationCallable()
*
createAzureClusterCallable()
*
*
*
*
* UpdateAzureCluster
* Updates an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* updateAzureClusterAsync(UpdateAzureClusterRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* updateAzureClusterAsync(AzureCluster azureCluster, FieldMask updateMask)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* updateAzureClusterOperationCallable()
*
updateAzureClusterCallable()
*
*
*
*
* GetAzureCluster
* Describes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* getAzureCluster(GetAzureClusterRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* getAzureCluster(AzureClusterName name)
*
getAzureCluster(String name)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* getAzureClusterCallable()
*
*
*
*
* ListAzureClusters
* Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources on a given Google Cloud project and region.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* listAzureClusters(ListAzureClustersRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* listAzureClusters(LocationName parent)
*
listAzureClusters(String parent)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* listAzureClustersPagedCallable()
*
listAzureClustersCallable()
*
*
*
*
* DeleteAzureCluster
* Deletes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
*
Fails if the cluster has one or more associated [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources.
*
If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* deleteAzureClusterAsync(DeleteAzureClusterRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* deleteAzureClusterAsync(AzureClusterName name)
*
deleteAzureClusterAsync(String name)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* deleteAzureClusterOperationCallable()
*
deleteAzureClusterCallable()
*
*
*
*
* GenerateAzureClusterAgentToken
* Generates an access token for a cluster agent.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* generateAzureClusterAgentToken(GenerateAzureClusterAgentTokenRequest request)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* generateAzureClusterAgentTokenCallable()
*
*
*
*
* GenerateAzureAccessToken
* Generates a short-lived access token to authenticate to a given [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* generateAzureAccessToken(GenerateAzureAccessTokenRequest request)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* generateAzureAccessTokenCallable()
*
*
*
*
* CreateAzureNodePool
* Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], attached to a given [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
*
If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* createAzureNodePoolAsync(CreateAzureNodePoolRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* createAzureNodePoolAsync(AzureClusterName parent, AzureNodePool azureNodePool, String azureNodePoolId)
*
createAzureNodePoolAsync(String parent, AzureNodePool azureNodePool, String azureNodePoolId)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* createAzureNodePoolOperationCallable()
*
createAzureNodePoolCallable()
*
*
*
*
* UpdateAzureNodePool
* Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool].
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* updateAzureNodePoolAsync(UpdateAzureNodePoolRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* updateAzureNodePoolAsync(AzureNodePool azureNodePool, FieldMask updateMask)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* updateAzureNodePoolOperationCallable()
*
updateAzureNodePoolCallable()
*
*
*
*
* GetAzureNodePool
* Describes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* getAzureNodePool(GetAzureNodePoolRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* getAzureNodePool(AzureNodePoolName name)
*
getAzureNodePool(String name)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* getAzureNodePoolCallable()
*
*
*
*
* ListAzureNodePools
* Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources on a given [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* listAzureNodePools(ListAzureNodePoolsRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* listAzureNodePools(AzureClusterName parent)
*
listAzureNodePools(String parent)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* listAzureNodePoolsPagedCallable()
*
listAzureNodePoolsCallable()
*
*
*
*
* DeleteAzureNodePool
* Deletes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.
*
If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* deleteAzureNodePoolAsync(DeleteAzureNodePoolRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* deleteAzureNodePoolAsync(AzureNodePoolName name)
*
deleteAzureNodePoolAsync(String name)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* deleteAzureNodePoolOperationCallable()
*
deleteAzureNodePoolCallable()
*
*
*
*
* GetAzureOpenIdConfig
* Gets the OIDC discovery document for the cluster. See the [OpenID Connect Discovery 1.0 specification](https://openid.net/specs/openid-connect-discovery-1_0.html) for details.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* getAzureOpenIdConfig(GetAzureOpenIdConfigRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* getAzureOpenIdConfig(AzureClusterName azureCluster)
*
getAzureOpenIdConfig(String azureCluster)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* getAzureOpenIdConfigCallable()
*
*
*
*
* GetAzureJsonWebKeys
* Gets the public component of the cluster signing keys in JSON Web Key format.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* getAzureJsonWebKeys(GetAzureJsonWebKeysRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* getAzureJsonWebKeys(AzureClusterName azureCluster)
*
getAzureJsonWebKeys(String azureCluster)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* getAzureJsonWebKeysCallable()
*
*
*
*
* GetAzureServerConfig
* Returns information, such as supported Azure regions and Kubernetes versions, on a given Google Cloud location.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* getAzureServerConfig(GetAzureServerConfigRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* getAzureServerConfig(AzureServerConfigName name)
*
getAzureServerConfig(String name)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* getAzureServerConfigCallable()
*
*
*
*
*
* 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 AzureClustersSettings 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
* AzureClustersSettings azureClustersSettings =
* AzureClustersSettings.newBuilder()
* .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
* .build();
* AzureClustersClient azureClustersClient = AzureClustersClient.create(azureClustersSettings);
* }
*
* 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
* AzureClustersSettings azureClustersSettings =
* AzureClustersSettings.newBuilder().setEndpoint(myEndpoint).build();
* AzureClustersClient azureClustersClient = AzureClustersClient.create(azureClustersSettings);
* }
*
* 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
* AzureClustersSettings azureClustersSettings =
* AzureClustersSettings.newHttpJsonBuilder().build();
* AzureClustersClient azureClustersClient = AzureClustersClient.create(azureClustersSettings);
* }
*
* Please refer to the GitHub repository's samples for more quickstart code snippets.
*/
@Generated("by gapic-generator-java")
public class AzureClustersClient implements BackgroundResource {
private final AzureClustersSettings settings;
private final AzureClustersStub stub;
private final OperationsClient httpJsonOperationsClient;
private final com.google.longrunning.OperationsClient operationsClient;
/** Constructs an instance of AzureClustersClient with default settings. */
public static final AzureClustersClient create() throws IOException {
return create(AzureClustersSettings.newBuilder().build());
}
/**
* Constructs an instance of AzureClustersClient, 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 AzureClustersClient create(AzureClustersSettings settings)
throws IOException {
return new AzureClustersClient(settings);
}
/**
* Constructs an instance of AzureClustersClient, using the given stub for making calls. This is
* for advanced usage - prefer using create(AzureClustersSettings).
*/
public static final AzureClustersClient create(AzureClustersStub stub) {
return new AzureClustersClient(stub);
}
/**
* Constructs an instance of AzureClustersClient, 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 AzureClustersClient(AzureClustersSettings settings) throws IOException {
this.settings = settings;
this.stub = ((AzureClustersStubSettings) settings.getStubSettings()).createStub();
this.operationsClient =
com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
}
protected AzureClustersClient(AzureClustersStub 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 AzureClustersSettings getSettings() {
return settings;
}
public AzureClustersStub 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.
/**
* Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource on a given
* Google Cloud project and region.
*
*
`AzureClient` resources hold client authentication information needed by the Anthos
* Multicloud API to manage Azure resources on your Azure subscription on your behalf.
*
*
If successful, the response contains a newly created
* [Operation][google.longrunning.Operation] resource that can be described to track the status of
* the operation.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* AzureClient azureClient = AzureClient.newBuilder().build();
* String azureClientId = "azureClientId-1735934475";
* AzureClient response =
* azureClustersClient.createAzureClientAsync(parent, azureClient, azureClientId).get();
* }
* }
*
* @param parent Required. The parent location where this
* [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource will be created.
* Location names are formatted as `projects/<project-id>/locations/<region>`.
*
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
* details on Google Cloud resource names.
* @param azureClient Required. The specification of the
* [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create.
* @param azureClientId Required. A client provided ID the resource. Must be unique within the
* parent resource.
*
The provided ID will be part of the
* [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name formatted as
* `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
*
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createAzureClientAsync(
LocationName parent, AzureClient azureClient, String azureClientId) {
CreateAzureClientRequest request =
CreateAzureClientRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.setAzureClient(azureClient)
.setAzureClientId(azureClientId)
.build();
return createAzureClientAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource on a given
* Google Cloud project and region.
*
* `AzureClient` resources hold client authentication information needed by the Anthos
* Multicloud API to manage Azure resources on your Azure subscription on your behalf.
*
*
If successful, the response contains a newly created
* [Operation][google.longrunning.Operation] resource that can be described to track the status of
* the operation.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
* AzureClient azureClient = AzureClient.newBuilder().build();
* String azureClientId = "azureClientId-1735934475";
* AzureClient response =
* azureClustersClient.createAzureClientAsync(parent, azureClient, azureClientId).get();
* }
* }
*
* @param parent Required. The parent location where this
* [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource will be created.
* Location names are formatted as `projects/<project-id>/locations/<region>`.
*
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
* details on Google Cloud resource names.
* @param azureClient Required. The specification of the
* [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create.
* @param azureClientId Required. A client provided ID the resource. Must be unique within the
* parent resource.
*
The provided ID will be part of the
* [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name formatted as
* `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
*
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createAzureClientAsync(
String parent, AzureClient azureClient, String azureClientId) {
CreateAzureClientRequest request =
CreateAzureClientRequest.newBuilder()
.setParent(parent)
.setAzureClient(azureClient)
.setAzureClientId(azureClientId)
.build();
return createAzureClientAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource on a given
* Google Cloud project and region.
*
* `AzureClient` resources hold client authentication information needed by the Anthos
* Multicloud API to manage Azure resources on your Azure subscription on your behalf.
*
*
If successful, the response contains a newly created
* [Operation][google.longrunning.Operation] resource that can be described to track the status of
* the operation.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* CreateAzureClientRequest request =
* CreateAzureClientRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setAzureClient(AzureClient.newBuilder().build())
* .setAzureClientId("azureClientId-1735934475")
* .setValidateOnly(true)
* .build();
* AzureClient response = azureClustersClient.createAzureClientAsync(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 createAzureClientAsync(
CreateAzureClientRequest request) {
return createAzureClientOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource on a given
* Google Cloud project and region.
*
* `AzureClient` resources hold client authentication information needed by the Anthos
* Multicloud API to manage Azure resources on your Azure subscription on your behalf.
*
*
If successful, the response contains a newly created
* [Operation][google.longrunning.Operation] resource that can be described to track the status of
* the operation.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* CreateAzureClientRequest request =
* CreateAzureClientRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setAzureClient(AzureClient.newBuilder().build())
* .setAzureClientId("azureClientId-1735934475")
* .setValidateOnly(true)
* .build();
* OperationFuture future =
* azureClustersClient.createAzureClientOperationCallable().futureCall(request);
* // Do something.
* AzureClient response = future.get();
* }
* }
*/
public final OperationCallable
createAzureClientOperationCallable() {
return stub.createAzureClientOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource on a given
* Google Cloud project and region.
*
* `AzureClient` resources hold client authentication information needed by the Anthos
* Multicloud API to manage Azure resources on your Azure subscription on your behalf.
*
*
If successful, the response contains a newly created
* [Operation][google.longrunning.Operation] resource that can be described to track the status of
* the operation.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* CreateAzureClientRequest request =
* CreateAzureClientRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setAzureClient(AzureClient.newBuilder().build())
* .setAzureClientId("azureClientId-1735934475")
* .setValidateOnly(true)
* .build();
* ApiFuture future =
* azureClustersClient.createAzureClientCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable createAzureClientCallable() {
return stub.createAzureClientCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Describes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* AzureClientName name = AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]");
* AzureClient response = azureClustersClient.getAzureClient(name);
* }
* }
*
* @param name Required. The name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient]
* resource to describe.
* [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as
* `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
*
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
* details on Google Cloud resource names.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final AzureClient getAzureClient(AzureClientName name) {
GetAzureClientRequest request =
GetAzureClientRequest.newBuilder().setName(name == null ? null : name.toString()).build();
return getAzureClient(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Describes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* String name = AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]").toString();
* AzureClient response = azureClustersClient.getAzureClient(name);
* }
* }
*
* @param name Required. The name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient]
* resource to describe.
* [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as
* `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
*
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
* details on Google Cloud resource names.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final AzureClient getAzureClient(String name) {
GetAzureClientRequest request = GetAzureClientRequest.newBuilder().setName(name).build();
return getAzureClient(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Describes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* GetAzureClientRequest request =
* GetAzureClientRequest.newBuilder()
* .setName(AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]").toString())
* .build();
* AzureClient response = azureClustersClient.getAzureClient(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 AzureClient getAzureClient(GetAzureClientRequest request) {
return getAzureClientCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Describes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* GetAzureClientRequest request =
* GetAzureClientRequest.newBuilder()
* .setName(AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]").toString())
* .build();
* ApiFuture future =
* azureClustersClient.getAzureClientCallable().futureCall(request);
* // Do something.
* AzureClient response = future.get();
* }
* }
*/
public final UnaryCallable getAzureClientCallable() {
return stub.getAzureClientCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources on a given Google
* Cloud project and region.
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* for (AzureClient element : azureClustersClient.listAzureClients(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. The parent location which owns this collection of
* [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources.
* Location names are formatted as `projects/<project-id>/locations/<region>`.
*
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
* details on Google Cloud Platform resource names.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListAzureClientsPagedResponse listAzureClients(LocationName parent) {
ListAzureClientsRequest request =
ListAzureClientsRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.build();
return listAzureClients(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources on a given Google
* Cloud project and region.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
* for (AzureClient element : azureClustersClient.listAzureClients(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. The parent location which owns this collection of
* [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources.
* Location names are formatted as `projects/<project-id>/locations/<region>`.
*
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
* details on Google Cloud Platform resource names.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListAzureClientsPagedResponse listAzureClients(String parent) {
ListAzureClientsRequest request =
ListAzureClientsRequest.newBuilder().setParent(parent).build();
return listAzureClients(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources on a given Google
* Cloud project and region.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* ListAzureClientsRequest request =
* ListAzureClientsRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
* for (AzureClient element : azureClustersClient.listAzureClients(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 ListAzureClientsPagedResponse listAzureClients(ListAzureClientsRequest request) {
return listAzureClientsPagedCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources on a given Google
* Cloud project and region.
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* ListAzureClientsRequest request =
* ListAzureClientsRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
* ApiFuture future =
* azureClustersClient.listAzureClientsPagedCallable().futureCall(request);
* // Do something.
* for (AzureClient element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*/
public final UnaryCallable
listAzureClientsPagedCallable() {
return stub.listAzureClientsPagedCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources on a given Google
* Cloud project and region.
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* ListAzureClientsRequest request =
* ListAzureClientsRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
* while (true) {
* ListAzureClientsResponse response =
* azureClustersClient.listAzureClientsCallable().call(request);
* for (AzureClient element : response.getAzureClientsList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
* if (!Strings.isNullOrEmpty(nextPageToken)) {
* request = request.toBuilder().setPageToken(nextPageToken).build();
* } else {
* break;
* }
* }
* }
* }
*/
public final UnaryCallable
listAzureClientsCallable() {
return stub.listAzureClientsCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.
*
* If the client is used by one or more clusters, deletion will fail and a
* `FAILED_PRECONDITION` error will be returned.
*
*
If successful, the response contains a newly created
* [Operation][google.longrunning.Operation] resource that can be described to track the status of
* the operation.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* AzureClientName name = AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]");
* azureClustersClient.deleteAzureClientAsync(name).get();
* }
* }
*
* @param name Required. The resource name the
* [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete.
* [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as
* `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
*
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
* details on Google Cloud resource names.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteAzureClientAsync(
AzureClientName name) {
DeleteAzureClientRequest request =
DeleteAzureClientRequest.newBuilder()
.setName(name == null ? null : name.toString())
.build();
return deleteAzureClientAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.
*
* If the client is used by one or more clusters, deletion will fail and a
* `FAILED_PRECONDITION` error will be returned.
*
*
If successful, the response contains a newly created
* [Operation][google.longrunning.Operation] resource that can be described to track the status of
* the operation.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* String name = AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]").toString();
* azureClustersClient.deleteAzureClientAsync(name).get();
* }
* }
*
* @param name Required. The resource name the
* [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete.
* [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as
* `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
*
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
* details on Google Cloud resource names.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteAzureClientAsync(String name) {
DeleteAzureClientRequest request = DeleteAzureClientRequest.newBuilder().setName(name).build();
return deleteAzureClientAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.
*
* If the client is used by one or more clusters, deletion will fail and a
* `FAILED_PRECONDITION` error will be returned.
*
*
If successful, the response contains a newly created
* [Operation][google.longrunning.Operation] resource that can be described to track the status of
* the operation.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* DeleteAzureClientRequest request =
* DeleteAzureClientRequest.newBuilder()
* .setName(AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]").toString())
* .setAllowMissing(true)
* .setValidateOnly(true)
* .build();
* azureClustersClient.deleteAzureClientAsync(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 deleteAzureClientAsync(
DeleteAzureClientRequest request) {
return deleteAzureClientOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.
*
* If the client is used by one or more clusters, deletion will fail and a
* `FAILED_PRECONDITION` error will be returned.
*
*
If successful, the response contains a newly created
* [Operation][google.longrunning.Operation] resource that can be described to track the status of
* the operation.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* DeleteAzureClientRequest request =
* DeleteAzureClientRequest.newBuilder()
* .setName(AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]").toString())
* .setAllowMissing(true)
* .setValidateOnly(true)
* .build();
* OperationFuture future =
* azureClustersClient.deleteAzureClientOperationCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final OperationCallable
deleteAzureClientOperationCallable() {
return stub.deleteAzureClientOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.
*
* If the client is used by one or more clusters, deletion will fail and a
* `FAILED_PRECONDITION` error will be returned.
*
*
If successful, the response contains a newly created
* [Operation][google.longrunning.Operation] resource that can be described to track the status of
* the operation.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* DeleteAzureClientRequest request =
* DeleteAzureClientRequest.newBuilder()
* .setName(AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]").toString())
* .setAllowMissing(true)
* .setValidateOnly(true)
* .build();
* ApiFuture future =
* azureClustersClient.deleteAzureClientCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final UnaryCallable deleteAzureClientCallable() {
return stub.deleteAzureClientCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource on a given
* Google Cloud Platform project and region.
*
* If successful, the response contains a newly created
* [Operation][google.longrunning.Operation] resource that can be described to track the status of
* the operation.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* AzureCluster azureCluster = AzureCluster.newBuilder().build();
* String azureClusterId = "azureClusterId191689446";
* AzureCluster response =
* azureClustersClient.createAzureClusterAsync(parent, azureCluster, azureClusterId).get();
* }
* }
*
* @param parent Required. The parent location where this
* [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will be created.
* Location names are formatted as `projects/<project-id>/locations/<region>`.
*
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
* details on Google Cloud resource names.
* @param azureCluster Required. The specification of the
* [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create.
* @param azureClusterId Required. A client provided ID the resource. Must be unique within the
* parent resource.
*
The provided ID will be part of the
* [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name formatted as
* `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
*
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createAzureClusterAsync(
LocationName parent, AzureCluster azureCluster, String azureClusterId) {
CreateAzureClusterRequest request =
CreateAzureClusterRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.setAzureCluster(azureCluster)
.setAzureClusterId(azureClusterId)
.build();
return createAzureClusterAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource on a given
* Google Cloud Platform project and region.
*
* If successful, the response contains a newly created
* [Operation][google.longrunning.Operation] resource that can be described to track the status of
* the operation.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
* AzureCluster azureCluster = AzureCluster.newBuilder().build();
* String azureClusterId = "azureClusterId191689446";
* AzureCluster response =
* azureClustersClient.createAzureClusterAsync(parent, azureCluster, azureClusterId).get();
* }
* }
*
* @param parent Required. The parent location where this
* [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will be created.
* Location names are formatted as `projects/<project-id>/locations/<region>`.
*
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
* details on Google Cloud resource names.
* @param azureCluster Required. The specification of the
* [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create.
* @param azureClusterId Required. A client provided ID the resource. Must be unique within the
* parent resource.
*
The provided ID will be part of the
* [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name formatted as
* `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
*
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createAzureClusterAsync(
String parent, AzureCluster azureCluster, String azureClusterId) {
CreateAzureClusterRequest request =
CreateAzureClusterRequest.newBuilder()
.setParent(parent)
.setAzureCluster(azureCluster)
.setAzureClusterId(azureClusterId)
.build();
return createAzureClusterAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource on a given
* Google Cloud Platform project and region.
*
* If successful, the response contains a newly created
* [Operation][google.longrunning.Operation] resource that can be described to track the status of
* the operation.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* CreateAzureClusterRequest request =
* CreateAzureClusterRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setAzureCluster(AzureCluster.newBuilder().build())
* .setAzureClusterId("azureClusterId191689446")
* .setValidateOnly(true)
* .build();
* AzureCluster response = azureClustersClient.createAzureClusterAsync(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 createAzureClusterAsync(
CreateAzureClusterRequest request) {
return createAzureClusterOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource on a given
* Google Cloud Platform project and region.
*
* If successful, the response contains a newly created
* [Operation][google.longrunning.Operation] resource that can be described to track the status of
* the operation.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* CreateAzureClusterRequest request =
* CreateAzureClusterRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setAzureCluster(AzureCluster.newBuilder().build())
* .setAzureClusterId("azureClusterId191689446")
* .setValidateOnly(true)
* .build();
* OperationFuture future =
* azureClustersClient.createAzureClusterOperationCallable().futureCall(request);
* // Do something.
* AzureCluster response = future.get();
* }
* }
*/
public final OperationCallable
createAzureClusterOperationCallable() {
return stub.createAzureClusterOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource on a given
* Google Cloud Platform project and region.
*
* If successful, the response contains a newly created
* [Operation][google.longrunning.Operation] resource that can be described to track the status of
* the operation.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* CreateAzureClusterRequest request =
* CreateAzureClusterRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setAzureCluster(AzureCluster.newBuilder().build())
* .setAzureClusterId("azureClusterId191689446")
* .setValidateOnly(true)
* .build();
* ApiFuture future =
* azureClustersClient.createAzureClusterCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable createAzureClusterCallable() {
return stub.createAzureClusterCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* AzureCluster azureCluster = AzureCluster.newBuilder().build();
* FieldMask updateMask = FieldMask.newBuilder().build();
* AzureCluster response =
* azureClustersClient.updateAzureClusterAsync(azureCluster, updateMask).get();
* }
* }
*
* @param azureCluster Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]
* resource to update.
* @param updateMask Required. Mask of fields to update. At least one path must be supplied in
* this field. The elements of the repeated paths field can only include these fields from
* [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]:
* * `description`. * `azureClient`. * `control_plane.version`. *
* `control_plane.vm_size`. * `annotations`. * `authorization.admin_users`. *
* `authorization.admin_groups`. * `control_plane.root_volume.size_gib`. *
* `azure_services_authentication`. * `azure_services_authentication.tenant_id`. *
* `azure_services_authentication.application_id`. * `control_plane.proxy_config`. *
* `control_plane.proxy_config.resource_group_id`. *
* `control_plane.proxy_config.secret_id`. * `control_plane.ssh_config.authorized_key`.
* * `logging_config.component_config.enable_components` *
* `monitoring_config.managed_prometheus_config.enabled`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture updateAzureClusterAsync(
AzureCluster azureCluster, FieldMask updateMask) {
UpdateAzureClusterRequest request =
UpdateAzureClusterRequest.newBuilder()
.setAzureCluster(azureCluster)
.setUpdateMask(updateMask)
.build();
return updateAzureClusterAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* UpdateAzureClusterRequest request =
* UpdateAzureClusterRequest.newBuilder()
* .setAzureCluster(AzureCluster.newBuilder().build())
* .setValidateOnly(true)
* .setUpdateMask(FieldMask.newBuilder().build())
* .build();
* AzureCluster response = azureClustersClient.updateAzureClusterAsync(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 updateAzureClusterAsync(
UpdateAzureClusterRequest request) {
return updateAzureClusterOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* UpdateAzureClusterRequest request =
* UpdateAzureClusterRequest.newBuilder()
* .setAzureCluster(AzureCluster.newBuilder().build())
* .setValidateOnly(true)
* .setUpdateMask(FieldMask.newBuilder().build())
* .build();
* OperationFuture future =
* azureClustersClient.updateAzureClusterOperationCallable().futureCall(request);
* // Do something.
* AzureCluster response = future.get();
* }
* }
*/
public final OperationCallable
updateAzureClusterOperationCallable() {
return stub.updateAzureClusterOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* UpdateAzureClusterRequest request =
* UpdateAzureClusterRequest.newBuilder()
* .setAzureCluster(AzureCluster.newBuilder().build())
* .setValidateOnly(true)
* .setUpdateMask(FieldMask.newBuilder().build())
* .build();
* ApiFuture future =
* azureClustersClient.updateAzureClusterCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable updateAzureClusterCallable() {
return stub.updateAzureClusterCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Describes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* AzureClusterName name = AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]");
* AzureCluster response = azureClustersClient.getAzureCluster(name);
* }
* }
*
* @param name Required. The name of the
* [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to describe.
* `AzureCluster` names are formatted as
* `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
*
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
* details on Google Cloud Platform resource names.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final AzureCluster getAzureCluster(AzureClusterName name) {
GetAzureClusterRequest request =
GetAzureClusterRequest.newBuilder().setName(name == null ? null : name.toString()).build();
return getAzureCluster(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Describes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* String name = AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString();
* AzureCluster response = azureClustersClient.getAzureCluster(name);
* }
* }
*
* @param name Required. The name of the
* [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to describe.
* `AzureCluster` names are formatted as
* `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
*
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
* details on Google Cloud Platform resource names.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final AzureCluster getAzureCluster(String name) {
GetAzureClusterRequest request = GetAzureClusterRequest.newBuilder().setName(name).build();
return getAzureCluster(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Describes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* GetAzureClusterRequest request =
* GetAzureClusterRequest.newBuilder()
* .setName(AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
* .build();
* AzureCluster response = azureClustersClient.getAzureCluster(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 AzureCluster getAzureCluster(GetAzureClusterRequest request) {
return getAzureClusterCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Describes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* GetAzureClusterRequest request =
* GetAzureClusterRequest.newBuilder()
* .setName(AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
* .build();
* ApiFuture future =
* azureClustersClient.getAzureClusterCallable().futureCall(request);
* // Do something.
* AzureCluster response = future.get();
* }
* }
*/
public final UnaryCallable getAzureClusterCallable() {
return stub.getAzureClusterCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources on a given
* Google Cloud project and region.
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* for (AzureCluster element : azureClustersClient.listAzureClusters(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. The parent location which owns this collection of
* [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources.
* Location names are formatted as `projects/<project-id>/locations/<region>`.
*
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
* details on Google Cloud Platform resource names.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListAzureClustersPagedResponse listAzureClusters(LocationName parent) {
ListAzureClustersRequest request =
ListAzureClustersRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.build();
return listAzureClusters(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources on a given
* Google Cloud project and region.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
* for (AzureCluster element : azureClustersClient.listAzureClusters(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. The parent location which owns this collection of
* [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources.
* Location names are formatted as `projects/<project-id>/locations/<region>`.
*
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
* details on Google Cloud Platform resource names.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListAzureClustersPagedResponse listAzureClusters(String parent) {
ListAzureClustersRequest request =
ListAzureClustersRequest.newBuilder().setParent(parent).build();
return listAzureClusters(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources on a given
* Google Cloud project and region.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* ListAzureClustersRequest request =
* ListAzureClustersRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
* for (AzureCluster element : azureClustersClient.listAzureClusters(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 ListAzureClustersPagedResponse listAzureClusters(ListAzureClustersRequest request) {
return listAzureClustersPagedCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources on a given
* Google Cloud project and region.
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* ListAzureClustersRequest request =
* ListAzureClustersRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
* ApiFuture future =
* azureClustersClient.listAzureClustersPagedCallable().futureCall(request);
* // Do something.
* for (AzureCluster element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*/
public final UnaryCallable
listAzureClustersPagedCallable() {
return stub.listAzureClustersPagedCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources on a given
* Google Cloud project and region.
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* ListAzureClustersRequest request =
* ListAzureClustersRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
* while (true) {
* ListAzureClustersResponse response =
* azureClustersClient.listAzureClustersCallable().call(request);
* for (AzureCluster element : response.getAzureClustersList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
* if (!Strings.isNullOrEmpty(nextPageToken)) {
* request = request.toBuilder().setPageToken(nextPageToken).build();
* } else {
* break;
* }
* }
* }
* }
*/
public final UnaryCallable
listAzureClustersCallable() {
return stub.listAzureClustersCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
*
* Fails if the cluster has one or more associated
* [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources.
*
*
If successful, the response contains a newly created
* [Operation][google.longrunning.Operation] resource that can be described to track the status of
* the operation.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* AzureClusterName name = AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]");
* azureClustersClient.deleteAzureClusterAsync(name).get();
* }
* }
*
* @param name Required. The resource name the
* [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete.
* `AzureCluster` names are formatted as
* `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
*
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
* details on Google Cloud Platform resource names.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteAzureClusterAsync(
AzureClusterName name) {
DeleteAzureClusterRequest request =
DeleteAzureClusterRequest.newBuilder()
.setName(name == null ? null : name.toString())
.build();
return deleteAzureClusterAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
*
* Fails if the cluster has one or more associated
* [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources.
*
*
If successful, the response contains a newly created
* [Operation][google.longrunning.Operation] resource that can be described to track the status of
* the operation.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* String name = AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString();
* azureClustersClient.deleteAzureClusterAsync(name).get();
* }
* }
*
* @param name Required. The resource name the
* [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete.
* `AzureCluster` names are formatted as
* `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
*
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
* details on Google Cloud Platform resource names.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteAzureClusterAsync(String name) {
DeleteAzureClusterRequest request =
DeleteAzureClusterRequest.newBuilder().setName(name).build();
return deleteAzureClusterAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
*
* Fails if the cluster has one or more associated
* [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources.
*
*
If successful, the response contains a newly created
* [Operation][google.longrunning.Operation] resource that can be described to track the status of
* the operation.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* DeleteAzureClusterRequest request =
* DeleteAzureClusterRequest.newBuilder()
* .setName(AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
* .setAllowMissing(true)
* .setValidateOnly(true)
* .setEtag("etag3123477")
* .setIgnoreErrors(true)
* .build();
* azureClustersClient.deleteAzureClusterAsync(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 deleteAzureClusterAsync(
DeleteAzureClusterRequest request) {
return deleteAzureClusterOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
*
* Fails if the cluster has one or more associated
* [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources.
*
*
If successful, the response contains a newly created
* [Operation][google.longrunning.Operation] resource that can be described to track the status of
* the operation.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* DeleteAzureClusterRequest request =
* DeleteAzureClusterRequest.newBuilder()
* .setName(AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
* .setAllowMissing(true)
* .setValidateOnly(true)
* .setEtag("etag3123477")
* .setIgnoreErrors(true)
* .build();
* OperationFuture future =
* azureClustersClient.deleteAzureClusterOperationCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final OperationCallable
deleteAzureClusterOperationCallable() {
return stub.deleteAzureClusterOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
*
* Fails if the cluster has one or more associated
* [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources.
*
*
If successful, the response contains a newly created
* [Operation][google.longrunning.Operation] resource that can be described to track the status of
* the operation.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* DeleteAzureClusterRequest request =
* DeleteAzureClusterRequest.newBuilder()
* .setName(AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
* .setAllowMissing(true)
* .setValidateOnly(true)
* .setEtag("etag3123477")
* .setIgnoreErrors(true)
* .build();
* ApiFuture future =
* azureClustersClient.deleteAzureClusterCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final UnaryCallable deleteAzureClusterCallable() {
return stub.deleteAzureClusterCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Generates an access token for a cluster agent.
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* GenerateAzureClusterAgentTokenRequest request =
* GenerateAzureClusterAgentTokenRequest.newBuilder()
* .setAzureCluster(
* AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
* .setSubjectToken("subjectToken-1519661011")
* .setSubjectTokenType("subjectTokenType1839592711")
* .setVersion("version351608024")
* .setNodePoolId("nodePoolId1121557241")
* .setGrantType("grantType-1219832202")
* .setAudience("audience975628804")
* .setScope("scope109264468")
* .setRequestedTokenType("requestedTokenType1733106949")
* .setOptions("options-1249474914")
* .build();
* GenerateAzureClusterAgentTokenResponse response =
* azureClustersClient.generateAzureClusterAgentToken(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 GenerateAzureClusterAgentTokenResponse generateAzureClusterAgentToken(
GenerateAzureClusterAgentTokenRequest request) {
return generateAzureClusterAgentTokenCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Generates an access token for a cluster agent.
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* GenerateAzureClusterAgentTokenRequest request =
* GenerateAzureClusterAgentTokenRequest.newBuilder()
* .setAzureCluster(
* AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
* .setSubjectToken("subjectToken-1519661011")
* .setSubjectTokenType("subjectTokenType1839592711")
* .setVersion("version351608024")
* .setNodePoolId("nodePoolId1121557241")
* .setGrantType("grantType-1219832202")
* .setAudience("audience975628804")
* .setScope("scope109264468")
* .setRequestedTokenType("requestedTokenType1733106949")
* .setOptions("options-1249474914")
* .build();
* ApiFuture future =
* azureClustersClient.generateAzureClusterAgentTokenCallable().futureCall(request);
* // Do something.
* GenerateAzureClusterAgentTokenResponse response = future.get();
* }
* }
*/
public final UnaryCallable<
GenerateAzureClusterAgentTokenRequest, GenerateAzureClusterAgentTokenResponse>
generateAzureClusterAgentTokenCallable() {
return stub.generateAzureClusterAgentTokenCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Generates a short-lived access token to authenticate to a given
* [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* GenerateAzureAccessTokenRequest request =
* GenerateAzureAccessTokenRequest.newBuilder()
* .setAzureCluster(
* AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
* .build();
* GenerateAzureAccessTokenResponse response =
* azureClustersClient.generateAzureAccessToken(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 GenerateAzureAccessTokenResponse generateAzureAccessToken(
GenerateAzureAccessTokenRequest request) {
return generateAzureAccessTokenCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Generates a short-lived access token to authenticate to a given
* [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* GenerateAzureAccessTokenRequest request =
* GenerateAzureAccessTokenRequest.newBuilder()
* .setAzureCluster(
* AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
* .build();
* ApiFuture future =
* azureClustersClient.generateAzureAccessTokenCallable().futureCall(request);
* // Do something.
* GenerateAzureAccessTokenResponse response = future.get();
* }
* }
*/
public final UnaryCallable
generateAzureAccessTokenCallable() {
return stub.generateAzureAccessTokenCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], attached to a given
* [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
*
* If successful, the response contains a newly created
* [Operation][google.longrunning.Operation] resource that can be described to track the status of
* the operation.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* AzureClusterName parent = AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]");
* AzureNodePool azureNodePool = AzureNodePool.newBuilder().build();
* String azureNodePoolId = "azureNodePoolId-1766264088";
* AzureNodePool response =
* azureClustersClient
* .createAzureNodePoolAsync(parent, azureNodePool, azureNodePoolId)
* .get();
* }
* }
*
* @param parent Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource
* where this node pool will be created.
* `AzureCluster` names are formatted as
* `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
*
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
* details on Google Cloud resource names.
* @param azureNodePool Required. The specification of the
* [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create.
* @param azureNodePoolId Required. A client provided ID the resource. Must be unique within the
* parent resource.
*
The provided ID will be part of the
* [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name formatted as
* `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
*
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createAzureNodePoolAsync(
AzureClusterName parent, AzureNodePool azureNodePool, String azureNodePoolId) {
CreateAzureNodePoolRequest request =
CreateAzureNodePoolRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.setAzureNodePool(azureNodePool)
.setAzureNodePoolId(azureNodePoolId)
.build();
return createAzureNodePoolAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], attached to a given
* [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
*
* If successful, the response contains a newly created
* [Operation][google.longrunning.Operation] resource that can be described to track the status of
* the operation.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* String parent = AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString();
* AzureNodePool azureNodePool = AzureNodePool.newBuilder().build();
* String azureNodePoolId = "azureNodePoolId-1766264088";
* AzureNodePool response =
* azureClustersClient
* .createAzureNodePoolAsync(parent, azureNodePool, azureNodePoolId)
* .get();
* }
* }
*
* @param parent Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource
* where this node pool will be created.
* `AzureCluster` names are formatted as
* `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
*
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
* details on Google Cloud resource names.
* @param azureNodePool Required. The specification of the
* [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create.
* @param azureNodePoolId Required. A client provided ID the resource. Must be unique within the
* parent resource.
*
The provided ID will be part of the
* [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name formatted as
* `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
*
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createAzureNodePoolAsync(
String parent, AzureNodePool azureNodePool, String azureNodePoolId) {
CreateAzureNodePoolRequest request =
CreateAzureNodePoolRequest.newBuilder()
.setParent(parent)
.setAzureNodePool(azureNodePool)
.setAzureNodePoolId(azureNodePoolId)
.build();
return createAzureNodePoolAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], attached to a given
* [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
*
* If successful, the response contains a newly created
* [Operation][google.longrunning.Operation] resource that can be described to track the status of
* the operation.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* CreateAzureNodePoolRequest request =
* CreateAzureNodePoolRequest.newBuilder()
* .setParent(
* AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
* .setAzureNodePool(AzureNodePool.newBuilder().build())
* .setAzureNodePoolId("azureNodePoolId-1766264088")
* .setValidateOnly(true)
* .build();
* AzureNodePool response = azureClustersClient.createAzureNodePoolAsync(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 createAzureNodePoolAsync(
CreateAzureNodePoolRequest request) {
return createAzureNodePoolOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], attached to a given
* [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
*
* If successful, the response contains a newly created
* [Operation][google.longrunning.Operation] resource that can be described to track the status of
* the operation.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* CreateAzureNodePoolRequest request =
* CreateAzureNodePoolRequest.newBuilder()
* .setParent(
* AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
* .setAzureNodePool(AzureNodePool.newBuilder().build())
* .setAzureNodePoolId("azureNodePoolId-1766264088")
* .setValidateOnly(true)
* .build();
* OperationFuture future =
* azureClustersClient.createAzureNodePoolOperationCallable().futureCall(request);
* // Do something.
* AzureNodePool response = future.get();
* }
* }
*/
public final OperationCallable
createAzureNodePoolOperationCallable() {
return stub.createAzureNodePoolOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], attached to a given
* [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
*
* If successful, the response contains a newly created
* [Operation][google.longrunning.Operation] resource that can be described to track the status of
* the operation.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* CreateAzureNodePoolRequest request =
* CreateAzureNodePoolRequest.newBuilder()
* .setParent(
* AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
* .setAzureNodePool(AzureNodePool.newBuilder().build())
* .setAzureNodePoolId("azureNodePoolId-1766264088")
* .setValidateOnly(true)
* .build();
* ApiFuture future =
* azureClustersClient.createAzureNodePoolCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable createAzureNodePoolCallable() {
return stub.createAzureNodePoolCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool].
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* AzureNodePool azureNodePool = AzureNodePool.newBuilder().build();
* FieldMask updateMask = FieldMask.newBuilder().build();
* AzureNodePool response =
* azureClustersClient.updateAzureNodePoolAsync(azureNodePool, updateMask).get();
* }
* }
*
* @param azureNodePool Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]
* resource to update.
* @param updateMask Required. Mask of fields to update. At least one path must be supplied in
* this field. The elements of the repeated paths field can only include these fields from
* [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]:
* *. `annotations`. * `version`. * `autoscaling.min_node_count`. *
* `autoscaling.max_node_count`. * `config.ssh_config.authorized_key`. *
* `management.auto_repair`. * `management`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture updateAzureNodePoolAsync(
AzureNodePool azureNodePool, FieldMask updateMask) {
UpdateAzureNodePoolRequest request =
UpdateAzureNodePoolRequest.newBuilder()
.setAzureNodePool(azureNodePool)
.setUpdateMask(updateMask)
.build();
return updateAzureNodePoolAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool].
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* UpdateAzureNodePoolRequest request =
* UpdateAzureNodePoolRequest.newBuilder()
* .setAzureNodePool(AzureNodePool.newBuilder().build())
* .setValidateOnly(true)
* .setUpdateMask(FieldMask.newBuilder().build())
* .build();
* AzureNodePool response = azureClustersClient.updateAzureNodePoolAsync(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 updateAzureNodePoolAsync(
UpdateAzureNodePoolRequest request) {
return updateAzureNodePoolOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool].
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* UpdateAzureNodePoolRequest request =
* UpdateAzureNodePoolRequest.newBuilder()
* .setAzureNodePool(AzureNodePool.newBuilder().build())
* .setValidateOnly(true)
* .setUpdateMask(FieldMask.newBuilder().build())
* .build();
* OperationFuture future =
* azureClustersClient.updateAzureNodePoolOperationCallable().futureCall(request);
* // Do something.
* AzureNodePool response = future.get();
* }
* }
*/
public final OperationCallable
updateAzureNodePoolOperationCallable() {
return stub.updateAzureNodePoolOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool].
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* UpdateAzureNodePoolRequest request =
* UpdateAzureNodePoolRequest.newBuilder()
* .setAzureNodePool(AzureNodePool.newBuilder().build())
* .setValidateOnly(true)
* .setUpdateMask(FieldMask.newBuilder().build())
* .build();
* ApiFuture future =
* azureClustersClient.updateAzureNodePoolCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable updateAzureNodePoolCallable() {
return stub.updateAzureNodePoolCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Describes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* AzureNodePoolName name =
* AzureNodePoolName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]");
* AzureNodePool response = azureClustersClient.getAzureNodePool(name);
* }
* }
*
* @param name Required. The name of the
* [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to describe.
* `AzureNodePool` names are formatted as
* `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
*
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
* details on Google Cloud resource names.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final AzureNodePool getAzureNodePool(AzureNodePoolName name) {
GetAzureNodePoolRequest request =
GetAzureNodePoolRequest.newBuilder().setName(name == null ? null : name.toString()).build();
return getAzureNodePool(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Describes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* String name =
* AzureNodePoolName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]")
* .toString();
* AzureNodePool response = azureClustersClient.getAzureNodePool(name);
* }
* }
*
* @param name Required. The name of the
* [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to describe.
* `AzureNodePool` names are formatted as
* `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
*
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
* details on Google Cloud resource names.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final AzureNodePool getAzureNodePool(String name) {
GetAzureNodePoolRequest request = GetAzureNodePoolRequest.newBuilder().setName(name).build();
return getAzureNodePool(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Describes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* GetAzureNodePoolRequest request =
* GetAzureNodePoolRequest.newBuilder()
* .setName(
* AzureNodePoolName.of(
* "[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]")
* .toString())
* .build();
* AzureNodePool response = azureClustersClient.getAzureNodePool(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 AzureNodePool getAzureNodePool(GetAzureNodePoolRequest request) {
return getAzureNodePoolCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Describes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* GetAzureNodePoolRequest request =
* GetAzureNodePoolRequest.newBuilder()
* .setName(
* AzureNodePoolName.of(
* "[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]")
* .toString())
* .build();
* ApiFuture future =
* azureClustersClient.getAzureNodePoolCallable().futureCall(request);
* // Do something.
* AzureNodePool response = future.get();
* }
* }
*/
public final UnaryCallable getAzureNodePoolCallable() {
return stub.getAzureNodePoolCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources on a given
* [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* AzureClusterName parent = AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]");
* for (AzureNodePool element : azureClustersClient.listAzureNodePools(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. The parent `AzureCluster` which owns this collection of
* [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources.
* `AzureCluster` names are formatted as
* `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
*
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
* details on Google Cloud resource names.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListAzureNodePoolsPagedResponse listAzureNodePools(AzureClusterName parent) {
ListAzureNodePoolsRequest request =
ListAzureNodePoolsRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.build();
return listAzureNodePools(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources on a given
* [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* String parent = AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString();
* for (AzureNodePool element : azureClustersClient.listAzureNodePools(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. The parent `AzureCluster` which owns this collection of
* [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources.
* `AzureCluster` names are formatted as
* `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
*
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
* details on Google Cloud resource names.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListAzureNodePoolsPagedResponse listAzureNodePools(String parent) {
ListAzureNodePoolsRequest request =
ListAzureNodePoolsRequest.newBuilder().setParent(parent).build();
return listAzureNodePools(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources on a given
* [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* ListAzureNodePoolsRequest request =
* ListAzureNodePoolsRequest.newBuilder()
* .setParent(
* AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
* for (AzureNodePool element : azureClustersClient.listAzureNodePools(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 ListAzureNodePoolsPagedResponse listAzureNodePools(
ListAzureNodePoolsRequest request) {
return listAzureNodePoolsPagedCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources on a given
* [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* ListAzureNodePoolsRequest request =
* ListAzureNodePoolsRequest.newBuilder()
* .setParent(
* AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
* ApiFuture future =
* azureClustersClient.listAzureNodePoolsPagedCallable().futureCall(request);
* // Do something.
* for (AzureNodePool element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*/
public final UnaryCallable
listAzureNodePoolsPagedCallable() {
return stub.listAzureNodePoolsPagedCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources on a given
* [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* ListAzureNodePoolsRequest request =
* ListAzureNodePoolsRequest.newBuilder()
* .setParent(
* AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
* while (true) {
* ListAzureNodePoolsResponse response =
* azureClustersClient.listAzureNodePoolsCallable().call(request);
* for (AzureNodePool element : response.getAzureNodePoolsList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
* if (!Strings.isNullOrEmpty(nextPageToken)) {
* request = request.toBuilder().setPageToken(nextPageToken).build();
* } else {
* break;
* }
* }
* }
* }
*/
public final UnaryCallable
listAzureNodePoolsCallable() {
return stub.listAzureNodePoolsCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.
*
* If successful, the response contains a newly created
* [Operation][google.longrunning.Operation] resource that can be described to track the status of
* the operation.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* AzureNodePoolName name =
* AzureNodePoolName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]");
* azureClustersClient.deleteAzureNodePoolAsync(name).get();
* }
* }
*
* @param name Required. The resource name the
* [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete.
* `AzureNodePool` names are formatted as
* `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
*
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
* details on Google Cloud resource names.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteAzureNodePoolAsync(
AzureNodePoolName name) {
DeleteAzureNodePoolRequest request =
DeleteAzureNodePoolRequest.newBuilder()
.setName(name == null ? null : name.toString())
.build();
return deleteAzureNodePoolAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.
*
* If successful, the response contains a newly created
* [Operation][google.longrunning.Operation] resource that can be described to track the status of
* the operation.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* String name =
* AzureNodePoolName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]")
* .toString();
* azureClustersClient.deleteAzureNodePoolAsync(name).get();
* }
* }
*
* @param name Required. The resource name the
* [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete.
* `AzureNodePool` names are formatted as
* `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
*
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
* details on Google Cloud resource names.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteAzureNodePoolAsync(String name) {
DeleteAzureNodePoolRequest request =
DeleteAzureNodePoolRequest.newBuilder().setName(name).build();
return deleteAzureNodePoolAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.
*
* If successful, the response contains a newly created
* [Operation][google.longrunning.Operation] resource that can be described to track the status of
* the operation.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* DeleteAzureNodePoolRequest request =
* DeleteAzureNodePoolRequest.newBuilder()
* .setName(
* AzureNodePoolName.of(
* "[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]")
* .toString())
* .setValidateOnly(true)
* .setAllowMissing(true)
* .setEtag("etag3123477")
* .setIgnoreErrors(true)
* .build();
* azureClustersClient.deleteAzureNodePoolAsync(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 deleteAzureNodePoolAsync(
DeleteAzureNodePoolRequest request) {
return deleteAzureNodePoolOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.
*
* If successful, the response contains a newly created
* [Operation][google.longrunning.Operation] resource that can be described to track the status of
* the operation.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* DeleteAzureNodePoolRequest request =
* DeleteAzureNodePoolRequest.newBuilder()
* .setName(
* AzureNodePoolName.of(
* "[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]")
* .toString())
* .setValidateOnly(true)
* .setAllowMissing(true)
* .setEtag("etag3123477")
* .setIgnoreErrors(true)
* .build();
* OperationFuture future =
* azureClustersClient.deleteAzureNodePoolOperationCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final OperationCallable
deleteAzureNodePoolOperationCallable() {
return stub.deleteAzureNodePoolOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.
*
* If successful, the response contains a newly created
* [Operation][google.longrunning.Operation] resource that can be described to track the status of
* the operation.
*
*
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* DeleteAzureNodePoolRequest request =
* DeleteAzureNodePoolRequest.newBuilder()
* .setName(
* AzureNodePoolName.of(
* "[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]")
* .toString())
* .setValidateOnly(true)
* .setAllowMissing(true)
* .setEtag("etag3123477")
* .setIgnoreErrors(true)
* .build();
* ApiFuture future =
* azureClustersClient.deleteAzureNodePoolCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final UnaryCallable deleteAzureNodePoolCallable() {
return stub.deleteAzureNodePoolCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the OIDC discovery document for the cluster. See the [OpenID Connect Discovery 1.0
* specification](https://openid.net/specs/openid-connect-discovery-1_0.html) for details.
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* AzureClusterName azureCluster =
* AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]");
* AzureOpenIdConfig response = azureClustersClient.getAzureOpenIdConfig(azureCluster);
* }
* }
*
* @param azureCluster Required. The AzureCluster, which owns the OIDC discovery document. Format:
* projects/<project-id>/locations/<region>/azureClusters/<cluster-id>
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final AzureOpenIdConfig getAzureOpenIdConfig(AzureClusterName azureCluster) {
GetAzureOpenIdConfigRequest request =
GetAzureOpenIdConfigRequest.newBuilder()
.setAzureCluster(azureCluster == null ? null : azureCluster.toString())
.build();
return getAzureOpenIdConfig(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the OIDC discovery document for the cluster. See the [OpenID Connect Discovery 1.0
* specification](https://openid.net/specs/openid-connect-discovery-1_0.html) for details.
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* String azureCluster =
* AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString();
* AzureOpenIdConfig response = azureClustersClient.getAzureOpenIdConfig(azureCluster);
* }
* }
*
* @param azureCluster Required. The AzureCluster, which owns the OIDC discovery document. Format:
* projects/<project-id>/locations/<region>/azureClusters/<cluster-id>
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final AzureOpenIdConfig getAzureOpenIdConfig(String azureCluster) {
GetAzureOpenIdConfigRequest request =
GetAzureOpenIdConfigRequest.newBuilder().setAzureCluster(azureCluster).build();
return getAzureOpenIdConfig(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the OIDC discovery document for the cluster. See the [OpenID Connect Discovery 1.0
* specification](https://openid.net/specs/openid-connect-discovery-1_0.html) for details.
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* GetAzureOpenIdConfigRequest request =
* GetAzureOpenIdConfigRequest.newBuilder()
* .setAzureCluster(
* AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
* .build();
* AzureOpenIdConfig response = azureClustersClient.getAzureOpenIdConfig(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 AzureOpenIdConfig getAzureOpenIdConfig(GetAzureOpenIdConfigRequest request) {
return getAzureOpenIdConfigCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the OIDC discovery document for the cluster. See the [OpenID Connect Discovery 1.0
* specification](https://openid.net/specs/openid-connect-discovery-1_0.html) for details.
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* GetAzureOpenIdConfigRequest request =
* GetAzureOpenIdConfigRequest.newBuilder()
* .setAzureCluster(
* AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
* .build();
* ApiFuture future =
* azureClustersClient.getAzureOpenIdConfigCallable().futureCall(request);
* // Do something.
* AzureOpenIdConfig response = future.get();
* }
* }
*/
public final UnaryCallable
getAzureOpenIdConfigCallable() {
return stub.getAzureOpenIdConfigCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the public component of the cluster signing keys in JSON Web Key format.
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* AzureClusterName azureCluster =
* AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]");
* AzureJsonWebKeys response = azureClustersClient.getAzureJsonWebKeys(azureCluster);
* }
* }
*
* @param azureCluster Required. The AzureCluster, which owns the JsonWebKeys. Format:
* `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final AzureJsonWebKeys getAzureJsonWebKeys(AzureClusterName azureCluster) {
GetAzureJsonWebKeysRequest request =
GetAzureJsonWebKeysRequest.newBuilder()
.setAzureCluster(azureCluster == null ? null : azureCluster.toString())
.build();
return getAzureJsonWebKeys(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the public component of the cluster signing keys in JSON Web Key format.
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* String azureCluster =
* AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString();
* AzureJsonWebKeys response = azureClustersClient.getAzureJsonWebKeys(azureCluster);
* }
* }
*
* @param azureCluster Required. The AzureCluster, which owns the JsonWebKeys. Format:
* `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final AzureJsonWebKeys getAzureJsonWebKeys(String azureCluster) {
GetAzureJsonWebKeysRequest request =
GetAzureJsonWebKeysRequest.newBuilder().setAzureCluster(azureCluster).build();
return getAzureJsonWebKeys(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the public component of the cluster signing keys in JSON Web Key format.
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* GetAzureJsonWebKeysRequest request =
* GetAzureJsonWebKeysRequest.newBuilder()
* .setAzureCluster(
* AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
* .build();
* AzureJsonWebKeys response = azureClustersClient.getAzureJsonWebKeys(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 AzureJsonWebKeys getAzureJsonWebKeys(GetAzureJsonWebKeysRequest request) {
return getAzureJsonWebKeysCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the public component of the cluster signing keys in JSON Web Key format.
*
* 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* GetAzureJsonWebKeysRequest request =
* GetAzureJsonWebKeysRequest.newBuilder()
* .setAzureCluster(
* AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
* .build();
* ApiFuture future =
* azureClustersClient.getAzureJsonWebKeysCallable().futureCall(request);
* // Do something.
* AzureJsonWebKeys response = future.get();
* }
* }
*/
public final UnaryCallable
getAzureJsonWebKeysCallable() {
return stub.getAzureJsonWebKeysCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns information, such as supported Azure regions and Kubernetes versions, on a given Google
* Cloud 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* AzureServerConfigName name = AzureServerConfigName.of("[PROJECT]", "[LOCATION]");
* AzureServerConfig response = azureClustersClient.getAzureServerConfig(name);
* }
* }
*
* @param name Required. The name of the
* [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] resource to describe.
* `AzureServerConfig` names are formatted as
* `projects/<project-id>/locations/<region>/azureServerConfig`.
*
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
* details on Google Cloud resource names.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final AzureServerConfig getAzureServerConfig(AzureServerConfigName name) {
GetAzureServerConfigRequest request =
GetAzureServerConfigRequest.newBuilder()
.setName(name == null ? null : name.toString())
.build();
return getAzureServerConfig(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns information, such as supported Azure regions and Kubernetes versions, on a given Google
* Cloud 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* String name = AzureServerConfigName.of("[PROJECT]", "[LOCATION]").toString();
* AzureServerConfig response = azureClustersClient.getAzureServerConfig(name);
* }
* }
*
* @param name Required. The name of the
* [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] resource to describe.
* `AzureServerConfig` names are formatted as
* `projects/<project-id>/locations/<region>/azureServerConfig`.
*
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
* details on Google Cloud resource names.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final AzureServerConfig getAzureServerConfig(String name) {
GetAzureServerConfigRequest request =
GetAzureServerConfigRequest.newBuilder().setName(name).build();
return getAzureServerConfig(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns information, such as supported Azure regions and Kubernetes versions, on a given Google
* Cloud 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* GetAzureServerConfigRequest request =
* GetAzureServerConfigRequest.newBuilder()
* .setName(AzureServerConfigName.of("[PROJECT]", "[LOCATION]").toString())
* .build();
* AzureServerConfig response = azureClustersClient.getAzureServerConfig(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 AzureServerConfig getAzureServerConfig(GetAzureServerConfigRequest request) {
return getAzureServerConfigCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns information, such as supported Azure regions and Kubernetes versions, on a given Google
* Cloud 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
* GetAzureServerConfigRequest request =
* GetAzureServerConfigRequest.newBuilder()
* .setName(AzureServerConfigName.of("[PROJECT]", "[LOCATION]").toString())
* .build();
* ApiFuture future =
* azureClustersClient.getAzureServerConfigCallable().futureCall(request);
* // Do something.
* AzureServerConfig response = future.get();
* }
* }
*/
public final UnaryCallable
getAzureServerConfigCallable() {
return stub.getAzureServerConfigCallable();
}
@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 ListAzureClientsPagedResponse
extends AbstractPagedListResponse<
ListAzureClientsRequest,
ListAzureClientsResponse,
AzureClient,
ListAzureClientsPage,
ListAzureClientsFixedSizeCollection> {
public static ApiFuture createAsync(
PageContext context,
ApiFuture futureResponse) {
ApiFuture futurePage =
ListAzureClientsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
input -> new ListAzureClientsPagedResponse(input),
MoreExecutors.directExecutor());
}
private ListAzureClientsPagedResponse(ListAzureClientsPage page) {
super(page, ListAzureClientsFixedSizeCollection.createEmptyCollection());
}
}
public static class ListAzureClientsPage
extends AbstractPage<
ListAzureClientsRequest, ListAzureClientsResponse, AzureClient, ListAzureClientsPage> {
private ListAzureClientsPage(
PageContext context,
ListAzureClientsResponse response) {
super(context, response);
}
private static ListAzureClientsPage createEmptyPage() {
return new ListAzureClientsPage(null, null);
}
@Override
protected ListAzureClientsPage createPage(
PageContext context,
ListAzureClientsResponse response) {
return new ListAzureClientsPage(context, response);
}
@Override
public ApiFuture createPageAsync(
PageContext context,
ApiFuture futureResponse) {
return super.createPageAsync(context, futureResponse);
}
}
public static class ListAzureClientsFixedSizeCollection
extends AbstractFixedSizeCollection<
ListAzureClientsRequest,
ListAzureClientsResponse,
AzureClient,
ListAzureClientsPage,
ListAzureClientsFixedSizeCollection> {
private ListAzureClientsFixedSizeCollection(
List pages, int collectionSize) {
super(pages, collectionSize);
}
private static ListAzureClientsFixedSizeCollection createEmptyCollection() {
return new ListAzureClientsFixedSizeCollection(null, 0);
}
@Override
protected ListAzureClientsFixedSizeCollection createCollection(
List pages, int collectionSize) {
return new ListAzureClientsFixedSizeCollection(pages, collectionSize);
}
}
public static class ListAzureClustersPagedResponse
extends AbstractPagedListResponse<
ListAzureClustersRequest,
ListAzureClustersResponse,
AzureCluster,
ListAzureClustersPage,
ListAzureClustersFixedSizeCollection> {
public static ApiFuture createAsync(
PageContext context,
ApiFuture futureResponse) {
ApiFuture futurePage =
ListAzureClustersPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
input -> new ListAzureClustersPagedResponse(input),
MoreExecutors.directExecutor());
}
private ListAzureClustersPagedResponse(ListAzureClustersPage page) {
super(page, ListAzureClustersFixedSizeCollection.createEmptyCollection());
}
}
public static class ListAzureClustersPage
extends AbstractPage<
ListAzureClustersRequest,
ListAzureClustersResponse,
AzureCluster,
ListAzureClustersPage> {
private ListAzureClustersPage(
PageContext context,
ListAzureClustersResponse response) {
super(context, response);
}
private static ListAzureClustersPage createEmptyPage() {
return new ListAzureClustersPage(null, null);
}
@Override
protected ListAzureClustersPage createPage(
PageContext context,
ListAzureClustersResponse response) {
return new ListAzureClustersPage(context, response);
}
@Override
public ApiFuture createPageAsync(
PageContext context,
ApiFuture futureResponse) {
return super.createPageAsync(context, futureResponse);
}
}
public static class ListAzureClustersFixedSizeCollection
extends AbstractFixedSizeCollection<
ListAzureClustersRequest,
ListAzureClustersResponse,
AzureCluster,
ListAzureClustersPage,
ListAzureClustersFixedSizeCollection> {
private ListAzureClustersFixedSizeCollection(
List pages, int collectionSize) {
super(pages, collectionSize);
}
private static ListAzureClustersFixedSizeCollection createEmptyCollection() {
return new ListAzureClustersFixedSizeCollection(null, 0);
}
@Override
protected ListAzureClustersFixedSizeCollection createCollection(
List pages, int collectionSize) {
return new ListAzureClustersFixedSizeCollection(pages, collectionSize);
}
}
public static class ListAzureNodePoolsPagedResponse
extends AbstractPagedListResponse<
ListAzureNodePoolsRequest,
ListAzureNodePoolsResponse,
AzureNodePool,
ListAzureNodePoolsPage,
ListAzureNodePoolsFixedSizeCollection> {
public static ApiFuture createAsync(
PageContext context,
ApiFuture futureResponse) {
ApiFuture futurePage =
ListAzureNodePoolsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
input -> new ListAzureNodePoolsPagedResponse(input),
MoreExecutors.directExecutor());
}
private ListAzureNodePoolsPagedResponse(ListAzureNodePoolsPage page) {
super(page, ListAzureNodePoolsFixedSizeCollection.createEmptyCollection());
}
}
public static class ListAzureNodePoolsPage
extends AbstractPage<
ListAzureNodePoolsRequest,
ListAzureNodePoolsResponse,
AzureNodePool,
ListAzureNodePoolsPage> {
private ListAzureNodePoolsPage(
PageContext context,
ListAzureNodePoolsResponse response) {
super(context, response);
}
private static ListAzureNodePoolsPage createEmptyPage() {
return new ListAzureNodePoolsPage(null, null);
}
@Override
protected ListAzureNodePoolsPage createPage(
PageContext context,
ListAzureNodePoolsResponse response) {
return new ListAzureNodePoolsPage(context, response);
}
@Override
public ApiFuture createPageAsync(
PageContext context,
ApiFuture futureResponse) {
return super.createPageAsync(context, futureResponse);
}
}
public static class ListAzureNodePoolsFixedSizeCollection
extends AbstractFixedSizeCollection<
ListAzureNodePoolsRequest,
ListAzureNodePoolsResponse,
AzureNodePool,
ListAzureNodePoolsPage,
ListAzureNodePoolsFixedSizeCollection> {
private ListAzureNodePoolsFixedSizeCollection(
List pages, int collectionSize) {
super(pages, collectionSize);
}
private static ListAzureNodePoolsFixedSizeCollection createEmptyCollection() {
return new ListAzureNodePoolsFixedSizeCollection(null, 0);
}
@Override
protected ListAzureNodePoolsFixedSizeCollection createCollection(
List pages, int collectionSize) {
return new ListAzureNodePoolsFixedSizeCollection(pages, collectionSize);
}
}
}