diff --git a/java-vmwareengine/README.md b/java-vmwareengine/README.md index 44cd41569e19..849d8e56e34f 100644 --- a/java-vmwareengine/README.md +++ b/java-vmwareengine/README.md @@ -201,7 +201,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-vmwareengine/java11.html [stability-image]: https://img.shields.io/badge/stability-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-vmwareengine.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-vmwareengine/0.26.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-vmwareengine/0.27.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-vmwareengine/google-cloud-vmwareengine/src/main/java/com/google/cloud/vmwareengine/v1/VmwareEngineClient.java b/java-vmwareengine/google-cloud-vmwareengine/src/main/java/com/google/cloud/vmwareengine/v1/VmwareEngineClient.java index d6d4c871017f..0f7ff2e133e3 100644 --- a/java-vmwareengine/google-cloud-vmwareengine/src/main/java/com/google/cloud/vmwareengine/v1/VmwareEngineClient.java +++ b/java-vmwareengine/google-cloud-vmwareengine/src/main/java/com/google/cloud/vmwareengine/v1/VmwareEngineClient.java @@ -116,8 +116,7 @@ * *
Creates a new `PrivateCloud` resource in a given project and location. Private clouds can only be created in zones, regional private clouds are not supported. - *
Creating a private cloud also creates a [management cluster](https://cloud.google.com/vmware-engine/docs/concepts-vmware-components) for that private cloud.
Creates a new `PrivateCloud` resource in a given project and location. Private clouds of type `STANDARD` and `TIME_LIMITED` are zonal resources, `STRETCHED` private clouds are regional. Creating a private cloud also creates a [management cluster](https://cloud.google.com/vmware-engine/docs/concepts-vmware-components) for that private cloud.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*Modifies a `Cluster` resource. Only the following fields can be updated: `node_type_configs.*.node_count`. Only fields specified in `updateMask` are applied. + *
Modifies a `Cluster` resource. Only fields specified in `updateMask` are applied. *
During operation processing, the resource is temporarily in the `ACTIVE` state before the operation fully completes. For that period of time, you can't update the resource. Use the operation status to determine when the processing fully completes.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
@@ -296,760 +295,7217 @@ *Lists subnets in a given private cloud.
Lists nodes in a given cluster.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Gets details of a single subnet.
Gets details of a single node.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Updates the parameters of a single subnet. Only fields specified in `update_mask` are applied. - *
*Note*: This API is synchronous and always returns a successful `google.longrunning.Operation` (LRO). The returned LRO will only have `done` and `response` fields.
Lists external IP addresses assigned to VMware workload VMs in a given private cloud.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Lists node types
Lists external IP addresses assigned to VMware workload VMs within the scope of the given network policy.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Gets details of a single `NodeType`.
Gets details of a single external IP address.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Gets details of credentials for NSX appliance.
Creates a new `ExternalAddress` resource in a given private cloud. The network policy that corresponds to the private cloud must have the external IP address network service enabled (`NetworkPolicy.external_ip`).
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Gets details of credentials for Vcenter appliance.
Updates the parameters of a single external IP address. Only fields specified in `update_mask` are applied. + *
During operation processing, the resource is temporarily in the `ACTIVE` state before the operation fully completes. For that period of time, you can't update the resource. Use the operation status to determine when the processing fully completes.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Resets credentials of the NSX appliance.
Deletes a single external IP address. When you delete an external IP address, connectivity between the external IP address and the corresponding internal IP address is lost.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Resets credentials of the Vcenter appliance.
Lists subnets in a given private cloud.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Creates a new HCX activation key in a given private cloud.
Gets details of a single subnet.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Lists `HcxActivationKey` resources in a given private cloud.
Updates the parameters of a single subnet. Only fields specified in `update_mask` are applied. + *
*Note*: This API is synchronous and always returns a successful `google.longrunning.Operation` (LRO). The returned LRO will only have `done` and `response` fields.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Retrieves a `HcxActivationKey` resource by its resource name.
Lists `ExternalAccessRule` resources in the specified network policy.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Retrieves a `NetworkPolicy` resource by its resource name.
Gets details of a single external access rule.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Lists `NetworkPolicy` resources in a specified project and location.
Creates a new external access rule in a given network policy.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Creates a new network policy in a given VMware Engine network of a project and location (region). A new network policy cannot be created if another network policy already exists in the same scope.
Updates the parameters of a single external access rule. Only fields specified in `update_mask` are applied.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Modifies a `NetworkPolicy` resource. Only the following fields can be updated: `internet_access`, `external_ip`, `edge_services_cidr`. Only fields specified in `updateMask` are applied. When updating a network policy, the external IP network service can only be disabled if there are no external IP addresses present in the scope of the policy. Also, a `NetworkService` cannot be updated when `NetworkService.state` is set to `RECONCILING`. - *
During operation processing, the resource is temporarily in the `ACTIVE` state before the operation fully completes. For that period of time, you can't update the resource. Use the operation status to determine when the processing fully completes.
Deletes a single external access rule.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Deletes a `NetworkPolicy` resource. A network policy cannot be deleted when `NetworkService.state` is set to `RECONCILING` for either its external IP or internet access service.
Lists logging servers configured for a given private cloud.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Creates a new VMware Engine network that can be used by a private cloud.
Gets details of a logging server.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Modifies a VMware Engine network resource. Only the following fields can be updated: `description`. Only fields specified in `updateMask` are applied.
Create a new logging server for a given private cloud.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Deletes a `VmwareEngineNetwork` resource. You can only delete a VMware Engine network after all resources that refer to it are deleted. For example, a private cloud, a network peering, and a network policy can all refer to the same VMware Engine network.
Updates the parameters of a single logging server. Only fields specified in `update_mask` are applied.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Retrieves a `VmwareEngineNetwork` resource by its resource name. The resource contains details of the VMware Engine network, such as its VMware Engine network type, peered networks in a service project, and state (for example, `CREATING`, `ACTIVE`, `DELETING`).
Deletes a single logging server.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Lists `VmwareEngineNetwork` resources in a given project and location.
Lists node types
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Creates a new private connection that can be used for accessing private Clouds.
Gets details of a single `NodeType`.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Retrieves a `PrivateConnection` resource by its resource name. The resource contains details of the private connection, such as connected network, routing mode and state.
Gets details of credentials for NSX appliance.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Lists `PrivateConnection` resources in a given project and location.
Gets details of credentials for Vcenter appliance.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Modifies a `PrivateConnection` resource. Only `description` and `routing_mode` fields can be updated. Only fields specified in `updateMask` are applied.
Resets credentials of the NSX appliance.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Deletes a `PrivateConnection` resource. When a private connection is deleted for a VMware Engine network, the connected network becomes inaccessible to that VMware Engine network.
Resets credentials of the Vcenter appliance.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Lists the private connection routes exchanged over a peering connection.
Gets details of the `DnsForwarding` config.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Lists information about the supported locations for this service.
Updates the parameters of the `DnsForwarding` config, like associated domains. Only fields specified in `update_mask` are applied.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Gets information about a location.
Retrieves a `NetworkPeering` resource by its resource name. The resource contains details of the network peering, such as peered networks, import and export custom route configurations, and peering state. NetworkPeering is a global resource and location can only be global.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Sets the access control policy on the specified resource. Replacesany existing policy. - *
Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
Lists `NetworkPeering` resources in a given project. NetworkPeering is a global resource and location can only be global.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Creates a new network peering between the peer network and VMware Engine network provided in a `NetworkPeering` resource. NetworkPeering is a global resource and location can only be global.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. - *
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.
Deletes a `NetworkPeering` resource. When a network peering is deleted for a VMware Engine network, the peer network becomes inaccessible to that VMware Engine network. NetworkPeering is a global resource and location can only be global.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Modifies a `NetworkPeering` resource. Only the `description` field can be updated. Only fields specified in `updateMask` are applied. NetworkPeering is a global resource and location can only be global.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *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 VmwareEngineSettings 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 - * VmwareEngineSettings vmwareEngineSettings = - * VmwareEngineSettings.newBuilder() - * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) - * .build(); - * VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create(vmwareEngineSettings); - * }- * - *
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 - * VmwareEngineSettings vmwareEngineSettings = - * VmwareEngineSettings.newBuilder().setEndpoint(myEndpoint).build(); - * VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create(vmwareEngineSettings); - * }- * - *
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 - * VmwareEngineSettings vmwareEngineSettings = VmwareEngineSettings.newHttpJsonBuilder().build(); - * VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create(vmwareEngineSettings); - * }- * - *
Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@Generated("by gapic-generator-java") -public class VmwareEngineClient implements BackgroundResource { - private final VmwareEngineSettings settings; - private final VmwareEngineStub stub; - private final OperationsClient httpJsonOperationsClient; - private final com.google.longrunning.OperationsClient operationsClient; - - /** Constructs an instance of VmwareEngineClient with default settings. */ - public static final VmwareEngineClient create() throws IOException { - return create(VmwareEngineSettings.newBuilder().build()); - } - - /** - * Constructs an instance of VmwareEngineClient, 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 VmwareEngineClient create(VmwareEngineSettings settings) throws IOException { - return new VmwareEngineClient(settings); - } - - /** - * Constructs an instance of VmwareEngineClient, using the given stub for making calls. This is - * for advanced usage - prefer using create(VmwareEngineSettings). - */ - public static final VmwareEngineClient create(VmwareEngineStub stub) { - return new VmwareEngineClient(stub); - } - - /** - * Constructs an instance of VmwareEngineClient, 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 VmwareEngineClient(VmwareEngineSettings settings) throws IOException { - this.settings = settings; - this.stub = ((VmwareEngineStubSettings) settings.getStubSettings()).createStub(); - this.operationsClient = - com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); - this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); - } - - protected VmwareEngineClient(VmwareEngineStub 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 VmwareEngineSettings getSettings() { - return settings; - } - - public VmwareEngineStub 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; + *
Lists the network peering routes exchanged over a peering connection. NetworkPeering is a global resource and location can only be global.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *Creates a new HCX activation key in a given private cloud.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *Lists `HcxActivationKey` resources in a given private cloud.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *Retrieves a `HcxActivationKey` resource by its resource name.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *Retrieves a `NetworkPolicy` resource by its resource name.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *Lists `NetworkPolicy` resources in a specified project and location.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *Creates a new network policy in a given VMware Engine network of a project and location (region). A new network policy cannot be created if another network policy already exists in the same scope.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *Modifies a `NetworkPolicy` resource. Only the following fields can be updated: `internet_access`, `external_ip`, `edge_services_cidr`. Only fields specified in `updateMask` are applied. When updating a network policy, the external IP network service can only be disabled if there are no external IP addresses present in the scope of the policy. Also, a `NetworkService` cannot be updated when `NetworkService.state` is set to `RECONCILING`. + *
During operation processing, the resource is temporarily in the `ACTIVE` state before the operation fully completes. For that period of time, you can't update the resource. Use the operation status to determine when the processing fully completes.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *Deletes a `NetworkPolicy` resource. A network policy cannot be deleted when `NetworkService.state` is set to `RECONCILING` for either its external IP or internet access service.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *Lists Consumer VPCs bound to Management DNS Zone of a given private cloud.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *Retrieves a 'ManagementDnsZoneBinding' resource by its resource name.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *Creates a new `ManagementDnsZoneBinding` resource in a private cloud. This RPC creates the DNS binding and the resource that represents the DNS binding of the consumer VPC network to the management DNS zone. A management DNS zone is the Cloud DNS cross-project binding zone that VMware Engine creates for each private cloud. It contains FQDNs and corresponding IP addresses for the private cloud's ESXi hosts and management VM appliances like vCenter and NSX Manager.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *Updates a `ManagementDnsZoneBinding` resource. Only fields specified in `update_mask` are applied.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *Deletes a `ManagementDnsZoneBinding` resource. When a management DNS zone binding is deleted, the corresponding consumer VPC network is no longer bound to the management DNS zone.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *Retries to create a `ManagementDnsZoneBinding` resource that is in failed state.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *Creates a new VMware Engine network that can be used by a private cloud.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *Modifies a VMware Engine network resource. Only the following fields can be updated: `description`. Only fields specified in `updateMask` are applied.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *Deletes a `VmwareEngineNetwork` resource. You can only delete a VMware Engine network after all resources that refer to it are deleted. For example, a private cloud, a network peering, and a network policy can all refer to the same VMware Engine network.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *Retrieves a `VmwareEngineNetwork` resource by its resource name. The resource contains details of the VMware Engine network, such as its VMware Engine network type, peered networks in a service project, and state (for example, `CREATING`, `ACTIVE`, `DELETING`).
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *Lists `VmwareEngineNetwork` resources in a given project and location.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *Creates a new private connection that can be used for accessing private Clouds.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *Retrieves a `PrivateConnection` resource by its resource name. The resource contains details of the private connection, such as connected network, routing mode and state.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *Lists `PrivateConnection` resources in a given project and location.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *Modifies a `PrivateConnection` resource. Only `description` and `routing_mode` fields can be updated. Only fields specified in `updateMask` are applied.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *Deletes a `PrivateConnection` resource. When a private connection is deleted for a VMware Engine network, the connected network becomes inaccessible to that VMware Engine network.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *Lists the private connection routes exchanged over a peering connection.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *Grants the bind permission to the customer provided principal(user / service account) to bind their DNS zone with the intranet VPC associated with the project. DnsBindPermission is a global resource and location can only be global.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *Gets all the principals having bind permission on the intranet VPC associated with the consumer project granted by the Grant API. DnsBindPermission is a global resource and location can only be global.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *Revokes the bind permission from the customer provided principal(user / service account) on the intranet VPC associated with the consumer project. DnsBindPermission is a global resource and location can only be global.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *Lists information about the supported locations for this service.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *Gets information about a location.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *Sets the access control policy on the specified resource. Replacesany existing policy. + *
Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. + *
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *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 VmwareEngineSettings 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 + * VmwareEngineSettings vmwareEngineSettings = + * VmwareEngineSettings.newBuilder() + * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + * .build(); + * VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create(vmwareEngineSettings); + * }+ * + *
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 + * VmwareEngineSettings vmwareEngineSettings = + * VmwareEngineSettings.newBuilder().setEndpoint(myEndpoint).build(); + * VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create(vmwareEngineSettings); + * }+ * + *
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 + * VmwareEngineSettings vmwareEngineSettings = VmwareEngineSettings.newHttpJsonBuilder().build(); + * VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create(vmwareEngineSettings); + * }+ * + *
Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class VmwareEngineClient implements BackgroundResource { + private final VmwareEngineSettings settings; + private final VmwareEngineStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of VmwareEngineClient with default settings. */ + public static final VmwareEngineClient create() throws IOException { + return create(VmwareEngineSettings.newBuilder().build()); + } + + /** + * Constructs an instance of VmwareEngineClient, 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 VmwareEngineClient create(VmwareEngineSettings settings) throws IOException { + return new VmwareEngineClient(settings); + } + + /** + * Constructs an instance of VmwareEngineClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(VmwareEngineSettings). + */ + public static final VmwareEngineClient create(VmwareEngineStub stub) { + return new VmwareEngineClient(stub); + } + + /** + * Constructs an instance of VmwareEngineClient, 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 VmwareEngineClient(VmwareEngineSettings settings) throws IOException { + this.settings = settings; + this.stub = ((VmwareEngineStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected VmwareEngineClient(VmwareEngineStub 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 VmwareEngineSettings getSettings() { + return settings; + } + + public VmwareEngineStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `PrivateCloud` resources in a given project and location. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * for (PrivateCloud element : vmwareEngineClient.listPrivateClouds(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The resource name of the private cloud to be queried for clusters. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPrivateCloudsPagedResponse listPrivateClouds(LocationName parent) { + ListPrivateCloudsRequest request = + ListPrivateCloudsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listPrivateClouds(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `PrivateCloud` resources in a given project and location. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + * for (PrivateCloud element : vmwareEngineClient.listPrivateClouds(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The resource name of the private cloud to be queried for clusters. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPrivateCloudsPagedResponse listPrivateClouds(String parent) { + ListPrivateCloudsRequest request = + ListPrivateCloudsRequest.newBuilder().setParent(parent).build(); + return listPrivateClouds(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `PrivateCloud` resources in a given project and location. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ListPrivateCloudsRequest request = + * ListPrivateCloudsRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * for (PrivateCloud element : vmwareEngineClient.listPrivateClouds(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 ListPrivateCloudsPagedResponse listPrivateClouds(ListPrivateCloudsRequest request) { + return listPrivateCloudsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `PrivateCloud` resources in a given project and location. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ListPrivateCloudsRequest request = + * ListPrivateCloudsRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.listPrivateCloudsPagedCallable().futureCall(request); + * // Do something. + * for (PrivateCloud element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ListPrivateCloudsRequest request = + * ListPrivateCloudsRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * while (true) { + * ListPrivateCloudsResponse response = + * vmwareEngineClient.listPrivateCloudsCallable().call(request); + * for (PrivateCloud element : response.getPrivateCloudsList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }+ */ + public final UnaryCallable
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * PrivateCloudName name = PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]"); + * PrivateCloud response = vmwareEngineClient.getPrivateCloud(name); + * } + * }+ * + * @param name Required. The resource name of the private cloud to retrieve. Resource names are + * schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PrivateCloud getPrivateCloud(PrivateCloudName name) { + GetPrivateCloudRequest request = + GetPrivateCloudRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getPrivateCloud(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a `PrivateCloud` resource by its resource name. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * String name = PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString(); + * PrivateCloud response = vmwareEngineClient.getPrivateCloud(name); + * } + * }+ * + * @param name Required. The resource name of the private cloud to retrieve. Resource names are + * schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PrivateCloud getPrivateCloud(String name) { + GetPrivateCloudRequest request = GetPrivateCloudRequest.newBuilder().setName(name).build(); + return getPrivateCloud(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a `PrivateCloud` resource by its resource name. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * GetPrivateCloudRequest request = + * GetPrivateCloudRequest.newBuilder() + * .setName(PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .build(); + * PrivateCloud response = vmwareEngineClient.getPrivateCloud(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 PrivateCloud getPrivateCloud(GetPrivateCloudRequest request) { + return getPrivateCloudCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a `PrivateCloud` resource by its resource name. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * GetPrivateCloudRequest request = + * GetPrivateCloudRequest.newBuilder() + * .setName(PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.getPrivateCloudCallable().futureCall(request); + * // Do something. + * PrivateCloud response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * PrivateCloud privateCloud = PrivateCloud.newBuilder().build(); + * String privateCloudId = "privateCloudId573896493"; + * PrivateCloud response = + * vmwareEngineClient.createPrivateCloudAsync(parent, privateCloud, privateCloudId).get(); + * } + * }+ * + * @param parent Required. The resource name of the location to create the new private cloud in. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a` + * @param privateCloud Required. The initial description of the new private cloud. + * @param privateCloudId Required. The user-provided identifier of the private cloud to be + * created. This identifier must be unique among each `PrivateCloud` within the parent and + * becomes the final token in the name URI. The identifier must meet the following + * requirements: + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + * PrivateCloud privateCloud = PrivateCloud.newBuilder().build(); + * String privateCloudId = "privateCloudId573896493"; + * PrivateCloud response = + * vmwareEngineClient.createPrivateCloudAsync(parent, privateCloud, privateCloudId).get(); + * } + * }+ * + * @param parent Required. The resource name of the location to create the new private cloud in. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a` + * @param privateCloud Required. The initial description of the new private cloud. + * @param privateCloudId Required. The user-provided identifier of the private cloud to be + * created. This identifier must be unique among each `PrivateCloud` within the parent and + * becomes the final token in the name URI. The identifier must meet the following + * requirements: + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * CreatePrivateCloudRequest request = + * CreatePrivateCloudRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPrivateCloudId("privateCloudId573896493") + * .setPrivateCloud(PrivateCloud.newBuilder().build()) + * .setRequestId("requestId693933066") + * .setValidateOnly(true) + * .build(); + * PrivateCloud response = vmwareEngineClient.createPrivateCloudAsync(request).get(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * CreatePrivateCloudRequest request = + * CreatePrivateCloudRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPrivateCloudId("privateCloudId573896493") + * .setPrivateCloud(PrivateCloud.newBuilder().build()) + * .setRequestId("requestId693933066") + * .setValidateOnly(true) + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * vmwareEngineClient.createPrivateCloudOperationCallable().futureCall(request); + * // Do something. + * PrivateCloud response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * CreatePrivateCloudRequest request = + * CreatePrivateCloudRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPrivateCloudId("privateCloudId573896493") + * .setPrivateCloud(PrivateCloud.newBuilder().build()) + * .setRequestId("requestId693933066") + * .setValidateOnly(true) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.createPrivateCloudCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
During operation processing, the resource is temporarily in the `ACTIVE` state before the + * operation fully completes. For that period of time, you can't update the resource. Use the + * operation status to determine when the processing fully completes. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * PrivateCloud privateCloud = PrivateCloud.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * PrivateCloud response = + * vmwareEngineClient.updatePrivateCloudAsync(privateCloud, updateMask).get(); + * } + * }+ * + * @param privateCloud Required. Private cloud description. + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `PrivateCloud` resource by the update. The fields specified in `updateMask` are relative to + * the resource, not the full request. A field will be overwritten if it is in the mask. If + * the user does not provide a mask then all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
During operation processing, the resource is temporarily in the `ACTIVE` state before the + * operation fully completes. For that period of time, you can't update the resource. Use the + * operation status to determine when the processing fully completes. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * UpdatePrivateCloudRequest request = + * UpdatePrivateCloudRequest.newBuilder() + * .setPrivateCloud(PrivateCloud.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setRequestId("requestId693933066") + * .build(); + * PrivateCloud response = vmwareEngineClient.updatePrivateCloudAsync(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
During operation processing, the resource is temporarily in the `ACTIVE` state before the + * operation fully completes. For that period of time, you can't update the resource. Use the + * operation status to determine when the processing fully completes. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * UpdatePrivateCloudRequest request = + * UpdatePrivateCloudRequest.newBuilder() + * .setPrivateCloud(PrivateCloud.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setRequestId("requestId693933066") + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * vmwareEngineClient.updatePrivateCloudOperationCallable().futureCall(request); + * // Do something. + * PrivateCloud response = future.get(); + * } + * }
During operation processing, the resource is temporarily in the `ACTIVE` state before the + * operation fully completes. For that period of time, you can't update the resource. Use the + * operation status to determine when the processing fully completes. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * UpdatePrivateCloudRequest request = + * UpdatePrivateCloudRequest.newBuilder() + * .setPrivateCloud(PrivateCloud.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setRequestId("requestId693933066") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.updatePrivateCloudCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
A `PrivateCloud` resource scheduled for deletion has `PrivateCloud.state` set to `DELETED` + * and `expireTime` set to the time when deletion is final and can no longer be reversed. The + * delete operation is marked as done as soon as the `PrivateCloud` is successfully scheduled for + * deletion (this also applies when `delayHours` is set to zero), and the operation is not kept in + * pending state until `PrivateCloud` is purged. `PrivateCloud` can be restored using + * `UndeletePrivateCloud` method before the `expireTime` elapses. When `expireTime` is reached, + * deletion is final and all private cloud resources are irreversibly removed and billing stops. + * During the final removal process, `PrivateCloud.state` is set to `PURGING`. `PrivateCloud` can + * be polled using standard `GET` method for the whole period of deletion and purging. It will not + * be returned only when it is completely purged. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * PrivateCloudName name = PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]"); + * PrivateCloud response = vmwareEngineClient.deletePrivateCloudAsync(name).get(); + * } + * }+ * + * @param name Required. The resource name of the private cloud to delete. Resource names are + * schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
A `PrivateCloud` resource scheduled for deletion has `PrivateCloud.state` set to `DELETED` + * and `expireTime` set to the time when deletion is final and can no longer be reversed. The + * delete operation is marked as done as soon as the `PrivateCloud` is successfully scheduled for + * deletion (this also applies when `delayHours` is set to zero), and the operation is not kept in + * pending state until `PrivateCloud` is purged. `PrivateCloud` can be restored using + * `UndeletePrivateCloud` method before the `expireTime` elapses. When `expireTime` is reached, + * deletion is final and all private cloud resources are irreversibly removed and billing stops. + * During the final removal process, `PrivateCloud.state` is set to `PURGING`. `PrivateCloud` can + * be polled using standard `GET` method for the whole period of deletion and purging. It will not + * be returned only when it is completely purged. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * String name = PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString(); + * PrivateCloud response = vmwareEngineClient.deletePrivateCloudAsync(name).get(); + * } + * }+ * + * @param name Required. The resource name of the private cloud to delete. Resource names are + * schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
A `PrivateCloud` resource scheduled for deletion has `PrivateCloud.state` set to `DELETED` + * and `expireTime` set to the time when deletion is final and can no longer be reversed. The + * delete operation is marked as done as soon as the `PrivateCloud` is successfully scheduled for + * deletion (this also applies when `delayHours` is set to zero), and the operation is not kept in + * pending state until `PrivateCloud` is purged. `PrivateCloud` can be restored using + * `UndeletePrivateCloud` method before the `expireTime` elapses. When `expireTime` is reached, + * deletion is final and all private cloud resources are irreversibly removed and billing stops. + * During the final removal process, `PrivateCloud.state` is set to `PURGING`. `PrivateCloud` can + * be polled using standard `GET` method for the whole period of deletion and purging. It will not + * be returned only when it is completely purged. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * DeletePrivateCloudRequest request = + * DeletePrivateCloudRequest.newBuilder() + * .setName(PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setRequestId("requestId693933066") + * .setForce(true) + * .setDelayHours(475821395) + * .build(); + * PrivateCloud response = vmwareEngineClient.deletePrivateCloudAsync(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
A `PrivateCloud` resource scheduled for deletion has `PrivateCloud.state` set to `DELETED` + * and `expireTime` set to the time when deletion is final and can no longer be reversed. The + * delete operation is marked as done as soon as the `PrivateCloud` is successfully scheduled for + * deletion (this also applies when `delayHours` is set to zero), and the operation is not kept in + * pending state until `PrivateCloud` is purged. `PrivateCloud` can be restored using + * `UndeletePrivateCloud` method before the `expireTime` elapses. When `expireTime` is reached, + * deletion is final and all private cloud resources are irreversibly removed and billing stops. + * During the final removal process, `PrivateCloud.state` is set to `PURGING`. `PrivateCloud` can + * be polled using standard `GET` method for the whole period of deletion and purging. It will not + * be returned only when it is completely purged. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * DeletePrivateCloudRequest request = + * DeletePrivateCloudRequest.newBuilder() + * .setName(PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setRequestId("requestId693933066") + * .setForce(true) + * .setDelayHours(475821395) + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * vmwareEngineClient.deletePrivateCloudOperationCallable().futureCall(request); + * // Do something. + * PrivateCloud response = future.get(); + * } + * }
A `PrivateCloud` resource scheduled for deletion has `PrivateCloud.state` set to `DELETED` + * and `expireTime` set to the time when deletion is final and can no longer be reversed. The + * delete operation is marked as done as soon as the `PrivateCloud` is successfully scheduled for + * deletion (this also applies when `delayHours` is set to zero), and the operation is not kept in + * pending state until `PrivateCloud` is purged. `PrivateCloud` can be restored using + * `UndeletePrivateCloud` method before the `expireTime` elapses. When `expireTime` is reached, + * deletion is final and all private cloud resources are irreversibly removed and billing stops. + * During the final removal process, `PrivateCloud.state` is set to `PURGING`. `PrivateCloud` can + * be polled using standard `GET` method for the whole period of deletion and purging. It will not + * be returned only when it is completely purged. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * DeletePrivateCloudRequest request = + * DeletePrivateCloudRequest.newBuilder() + * .setName(PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setRequestId("requestId693933066") + * .setForce(true) + * .setDelayHours(475821395) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.deletePrivateCloudCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * PrivateCloudName name = PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]"); + * PrivateCloud response = vmwareEngineClient.undeletePrivateCloudAsync(name).get(); + * } + * }+ * + * @param name Required. The resource name of the private cloud scheduled for deletion. Resource + * names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * String name = PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString(); + * PrivateCloud response = vmwareEngineClient.undeletePrivateCloudAsync(name).get(); + * } + * }+ * + * @param name Required. The resource name of the private cloud scheduled for deletion. Resource + * names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * UndeletePrivateCloudRequest request = + * UndeletePrivateCloudRequest.newBuilder() + * .setName(PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setRequestId("requestId693933066") + * .build(); + * PrivateCloud response = vmwareEngineClient.undeletePrivateCloudAsync(request).get(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * UndeletePrivateCloudRequest request = + * UndeletePrivateCloudRequest.newBuilder() + * .setName(PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setRequestId("requestId693933066") + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * vmwareEngineClient.undeletePrivateCloudOperationCallable().futureCall(request); + * // Do something. + * PrivateCloud response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * UndeletePrivateCloudRequest request = + * UndeletePrivateCloudRequest.newBuilder() + * .setName(PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setRequestId("requestId693933066") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.undeletePrivateCloudCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * PrivateCloudName parent = PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]"); + * for (Cluster element : vmwareEngineClient.listClusters(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The resource name of the private cloud to query for clusters. Resource + * names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListClustersPagedResponse listClusters(PrivateCloudName parent) { + ListClustersRequest request = + ListClustersRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listClusters(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `Cluster` resources in a given private cloud. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * String parent = PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString(); + * for (Cluster element : vmwareEngineClient.listClusters(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The resource name of the private cloud to query for clusters. Resource + * names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListClustersPagedResponse listClusters(String parent) { + ListClustersRequest request = ListClustersRequest.newBuilder().setParent(parent).build(); + return listClusters(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `Cluster` resources in a given private cloud. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ListClustersRequest request = + * ListClustersRequest.newBuilder() + * .setParent( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * for (Cluster element : vmwareEngineClient.listClusters(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 ListClustersPagedResponse listClusters(ListClustersRequest request) { + return listClustersPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `Cluster` resources in a given private cloud. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ListClustersRequest request = + * ListClustersRequest.newBuilder() + * .setParent( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.listClustersPagedCallable().futureCall(request); + * // Do something. + * for (Cluster element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ListClustersRequest request = + * ListClustersRequest.newBuilder() + * .setParent( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * while (true) { + * ListClustersResponse response = vmwareEngineClient.listClustersCallable().call(request); + * for (Cluster element : response.getClustersList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }+ */ + public final UnaryCallable
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]"); + * Cluster response = vmwareEngineClient.getCluster(name); + * } + * }+ * + * @param name Required. The cluster resource name to retrieve. Resource names are schemeless URIs + * that follow the conventions in https://cloud.google.com/apis/design/resource_names. For + * example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Cluster getCluster(ClusterName name) { + GetClusterRequest request = + GetClusterRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getCluster(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a `Cluster` resource by its resource name. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * String name = + * ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]").toString(); + * Cluster response = vmwareEngineClient.getCluster(name); + * } + * }+ * + * @param name Required. The cluster resource name to retrieve. Resource names are schemeless URIs + * that follow the conventions in https://cloud.google.com/apis/design/resource_names. For + * example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Cluster getCluster(String name) { + GetClusterRequest request = GetClusterRequest.newBuilder().setName(name).build(); + return getCluster(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a `Cluster` resource by its resource name. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * GetClusterRequest request = + * GetClusterRequest.newBuilder() + * .setName( + * ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]") + * .toString()) + * .build(); + * Cluster response = vmwareEngineClient.getCluster(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 Cluster getCluster(GetClusterRequest request) { + return getClusterCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a `Cluster` resource by its resource name. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * GetClusterRequest request = + * GetClusterRequest.newBuilder() + * .setName( + * ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]") + * .toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = vmwareEngineClient.getClusterCallable().futureCall(request); + * // Do something. + * Cluster response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * PrivateCloudName parent = PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]"); + * Cluster cluster = Cluster.newBuilder().build(); + * String clusterId = "clusterId561939637"; + * Cluster response = vmwareEngineClient.createClusterAsync(parent, cluster, clusterId).get(); + * } + * }+ * + * @param parent Required. The resource name of the private cloud to create a new cluster in. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @param cluster Required. The initial description of the new cluster. + * @param clusterId Required. The user-provided identifier of the new `Cluster`. This identifier + * must be unique among clusters within the parent and becomes the final token in the name + * URI. The identifier must meet the following requirements: + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * String parent = PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString(); + * Cluster cluster = Cluster.newBuilder().build(); + * String clusterId = "clusterId561939637"; + * Cluster response = vmwareEngineClient.createClusterAsync(parent, cluster, clusterId).get(); + * } + * }+ * + * @param parent Required. The resource name of the private cloud to create a new cluster in. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @param cluster Required. The initial description of the new cluster. + * @param clusterId Required. The user-provided identifier of the new `Cluster`. This identifier + * must be unique among clusters within the parent and becomes the final token in the name + * URI. The identifier must meet the following requirements: + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * CreateClusterRequest request = + * CreateClusterRequest.newBuilder() + * .setParent( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setClusterId("clusterId561939637") + * .setCluster(Cluster.newBuilder().build()) + * .setRequestId("requestId693933066") + * .setValidateOnly(true) + * .build(); + * Cluster response = vmwareEngineClient.createClusterAsync(request).get(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * CreateClusterRequest request = + * CreateClusterRequest.newBuilder() + * .setParent( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setClusterId("clusterId561939637") + * .setCluster(Cluster.newBuilder().build()) + * .setRequestId("requestId693933066") + * .setValidateOnly(true) + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * vmwareEngineClient.createClusterOperationCallable().futureCall(request); + * // Do something. + * Cluster response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * CreateClusterRequest request = + * CreateClusterRequest.newBuilder() + * .setParent( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setClusterId("clusterId561939637") + * .setCluster(Cluster.newBuilder().build()) + * .setRequestId("requestId693933066") + * .setValidateOnly(true) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = vmwareEngineClient.createClusterCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
During operation processing, the resource is temporarily in the `ACTIVE` state before the + * operation fully completes. For that period of time, you can't update the resource. Use the + * operation status to determine when the processing fully completes. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * Cluster cluster = Cluster.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * Cluster response = vmwareEngineClient.updateClusterAsync(cluster, updateMask).get(); + * } + * }+ * + * @param cluster Required. The description of the cluster. + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `Cluster` resource by the update. The fields specified in the `updateMask` are relative to + * the resource, not the full request. A field will be overwritten if it is in the mask. If + * the user does not provide a mask then all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
During operation processing, the resource is temporarily in the `ACTIVE` state before the + * operation fully completes. For that period of time, you can't update the resource. Use the + * operation status to determine when the processing fully completes. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * UpdateClusterRequest request = + * UpdateClusterRequest.newBuilder() + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setCluster(Cluster.newBuilder().build()) + * .setRequestId("requestId693933066") + * .setValidateOnly(true) + * .build(); + * Cluster response = vmwareEngineClient.updateClusterAsync(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
During operation processing, the resource is temporarily in the `ACTIVE` state before the + * operation fully completes. For that period of time, you can't update the resource. Use the + * operation status to determine when the processing fully completes. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * UpdateClusterRequest request = + * UpdateClusterRequest.newBuilder() + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setCluster(Cluster.newBuilder().build()) + * .setRequestId("requestId693933066") + * .setValidateOnly(true) + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * vmwareEngineClient.updateClusterOperationCallable().futureCall(request); + * // Do something. + * Cluster response = future.get(); + * } + * }
During operation processing, the resource is temporarily in the `ACTIVE` state before the + * operation fully completes. For that period of time, you can't update the resource. Use the + * operation status to determine when the processing fully completes. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * UpdateClusterRequest request = + * UpdateClusterRequest.newBuilder() + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setCluster(Cluster.newBuilder().build()) + * .setRequestId("requestId693933066") + * .setValidateOnly(true) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = vmwareEngineClient.updateClusterCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]"); + * vmwareEngineClient.deleteClusterAsync(name).get(); + * } + * }+ * + * @param name Required. The resource name of the cluster to delete. Resource names are schemeless + * URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * String name = + * ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]").toString(); + * vmwareEngineClient.deleteClusterAsync(name).get(); + * } + * }+ * + * @param name Required. The resource name of the cluster to delete. Resource names are schemeless + * URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * DeleteClusterRequest request = + * DeleteClusterRequest.newBuilder() + * .setName( + * ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]") + * .toString()) + * .setRequestId("requestId693933066") + * .build(); + * vmwareEngineClient.deleteClusterAsync(request).get(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * DeleteClusterRequest request = + * DeleteClusterRequest.newBuilder() + * .setName( + * ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]") + * .toString()) + * .setRequestId("requestId693933066") + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * vmwareEngineClient.deleteClusterOperationCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * DeleteClusterRequest request = + * DeleteClusterRequest.newBuilder() + * .setName( + * ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]") + * .toString()) + * .setRequestId("requestId693933066") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = vmwareEngineClient.deleteClusterCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ClusterName parent = + * ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]"); + * for (Node element : vmwareEngineClient.listNodes(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The resource name of the cluster to be queried for nodes. Resource + * names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNodesPagedResponse listNodes(ClusterName parent) { + ListNodesRequest request = + ListNodesRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listNodes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists nodes in a given cluster. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * String parent = + * ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]").toString(); + * for (Node element : vmwareEngineClient.listNodes(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The resource name of the cluster to be queried for nodes. Resource + * names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNodesPagedResponse listNodes(String parent) { + ListNodesRequest request = ListNodesRequest.newBuilder().setParent(parent).build(); + return listNodes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists nodes in a given cluster. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ListNodesRequest request = + * ListNodesRequest.newBuilder() + * .setParent( + * ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]") + * .toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (Node element : vmwareEngineClient.listNodes(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 ListNodesPagedResponse listNodes(ListNodesRequest request) { + return listNodesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists nodes in a given cluster. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ListNodesRequest request = + * ListNodesRequest.newBuilder() + * .setParent( + * ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]") + * .toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = vmwareEngineClient.listNodesPagedCallable().futureCall(request); + * // Do something. + * for (Node element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ListNodesRequest request = + * ListNodesRequest.newBuilder() + * .setParent( + * ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]") + * .toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * while (true) { + * ListNodesResponse response = vmwareEngineClient.listNodesCallable().call(request); + * for (Node element : response.getNodesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }+ */ + public final UnaryCallable
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * NodeName name = + * NodeName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]", "[NODE]"); + * Node response = vmwareEngineClient.getNode(name); + * } + * }+ * + * @param name Required. The resource name of the node to retrieve. For example: + * `projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}/nodes/{node}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Node getNode(NodeName name) { + GetNodeRequest request = + GetNodeRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getNode(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single node. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * String name = + * NodeName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]", "[NODE]") + * .toString(); + * Node response = vmwareEngineClient.getNode(name); + * } + * }+ * + * @param name Required. The resource name of the node to retrieve. For example: + * `projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}/nodes/{node}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Node getNode(String name) { + GetNodeRequest request = GetNodeRequest.newBuilder().setName(name).build(); + return getNode(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single node. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * GetNodeRequest request = + * GetNodeRequest.newBuilder() + * .setName( + * NodeName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]", "[NODE]") + * .toString()) + * .build(); + * Node response = vmwareEngineClient.getNode(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 Node getNode(GetNodeRequest request) { + return getNodeCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single node. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * GetNodeRequest request = + * GetNodeRequest.newBuilder() + * .setName( + * NodeName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]", "[NODE]") + * .toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = vmwareEngineClient.getNodeCallable().futureCall(request); + * // Do something. + * Node response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * PrivateCloudName parent = PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]"); + * for (ExternalAddress element : + * vmwareEngineClient.listExternalAddresses(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The resource name of the private cloud to be queried for external IP + * addresses. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListExternalAddressesPagedResponse listExternalAddresses(PrivateCloudName parent) { + ListExternalAddressesRequest request = + ListExternalAddressesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listExternalAddresses(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists external IP addresses assigned to VMware workload VMs in a given private cloud. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * String parent = PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString(); + * for (ExternalAddress element : + * vmwareEngineClient.listExternalAddresses(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The resource name of the private cloud to be queried for external IP + * addresses. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListExternalAddressesPagedResponse listExternalAddresses(String parent) { + ListExternalAddressesRequest request = + ListExternalAddressesRequest.newBuilder().setParent(parent).build(); + return listExternalAddresses(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists external IP addresses assigned to VMware workload VMs in a given private cloud. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ListExternalAddressesRequest request = + * ListExternalAddressesRequest.newBuilder() + * .setParent( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * for (ExternalAddress element : + * vmwareEngineClient.listExternalAddresses(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 ListExternalAddressesPagedResponse listExternalAddresses( + ListExternalAddressesRequest request) { + return listExternalAddressesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists external IP addresses assigned to VMware workload VMs in a given private cloud. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ListExternalAddressesRequest request = + * ListExternalAddressesRequest.newBuilder() + * .setParent( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.listExternalAddressesPagedCallable().futureCall(request); + * // Do something. + * for (ExternalAddress element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ListExternalAddressesRequest request = + * ListExternalAddressesRequest.newBuilder() + * .setParent( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * while (true) { + * ListExternalAddressesResponse response = + * vmwareEngineClient.listExternalAddressesCallable().call(request); + * for (ExternalAddress element : response.getExternalAddressesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }+ */ + public final UnaryCallable
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * NetworkPolicyName networkPolicy = + * NetworkPolicyName.of("[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]"); + * for (ExternalAddress element : + * vmwareEngineClient.fetchNetworkPolicyExternalAddresses(networkPolicy).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param networkPolicy Required. The resource name of the network policy to query for assigned + * external IP addresses. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FetchNetworkPolicyExternalAddressesPagedResponse fetchNetworkPolicyExternalAddresses( + NetworkPolicyName networkPolicy) { + FetchNetworkPolicyExternalAddressesRequest request = + FetchNetworkPolicyExternalAddressesRequest.newBuilder() + .setNetworkPolicy(networkPolicy == null ? null : networkPolicy.toString()) + .build(); + return fetchNetworkPolicyExternalAddresses(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists external IP addresses assigned to VMware workload VMs within the scope of the given + * network policy. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * String networkPolicy = + * NetworkPolicyName.of("[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]").toString(); + * for (ExternalAddress element : + * vmwareEngineClient.fetchNetworkPolicyExternalAddresses(networkPolicy).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param networkPolicy Required. The resource name of the network policy to query for assigned + * external IP addresses. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FetchNetworkPolicyExternalAddressesPagedResponse fetchNetworkPolicyExternalAddresses( + String networkPolicy) { + FetchNetworkPolicyExternalAddressesRequest request = + FetchNetworkPolicyExternalAddressesRequest.newBuilder() + .setNetworkPolicy(networkPolicy) + .build(); + return fetchNetworkPolicyExternalAddresses(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists external IP addresses assigned to VMware workload VMs within the scope of the given + * network policy. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * FetchNetworkPolicyExternalAddressesRequest request = + * FetchNetworkPolicyExternalAddressesRequest.newBuilder() + * .setNetworkPolicy( + * NetworkPolicyName.of("[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (ExternalAddress element : + * vmwareEngineClient.fetchNetworkPolicyExternalAddresses(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 FetchNetworkPolicyExternalAddressesPagedResponse fetchNetworkPolicyExternalAddresses( + FetchNetworkPolicyExternalAddressesRequest request) { + return fetchNetworkPolicyExternalAddressesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists external IP addresses assigned to VMware workload VMs within the scope of the given + * network policy. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * FetchNetworkPolicyExternalAddressesRequest request = + * FetchNetworkPolicyExternalAddressesRequest.newBuilder() + * .setNetworkPolicy( + * NetworkPolicyName.of("[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture+ */ + public final UnaryCallable< + FetchNetworkPolicyExternalAddressesRequest, + FetchNetworkPolicyExternalAddressesPagedResponse> + fetchNetworkPolicyExternalAddressesPagedCallable() { + return stub.fetchNetworkPolicyExternalAddressesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists external IP addresses assigned to VMware workload VMs within the scope of the given + * network policy. + * + *future = + * vmwareEngineClient.fetchNetworkPolicyExternalAddressesPagedCallable().futureCall(request); + * // Do something. + * for (ExternalAddress element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * FetchNetworkPolicyExternalAddressesRequest request = + * FetchNetworkPolicyExternalAddressesRequest.newBuilder() + * .setNetworkPolicy( + * NetworkPolicyName.of("[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * while (true) { + * FetchNetworkPolicyExternalAddressesResponse response = + * vmwareEngineClient.fetchNetworkPolicyExternalAddressesCallable().call(request); + * for (ExternalAddress element : response.getExternalAddressesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }+ */ + public final UnaryCallable< + FetchNetworkPolicyExternalAddressesRequest, FetchNetworkPolicyExternalAddressesResponse> + fetchNetworkPolicyExternalAddressesCallable() { + return stub.fetchNetworkPolicyExternalAddressesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single external IP address. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ExternalAddressName name = + * ExternalAddressName.of( + * "[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[EXTERNAL_ADDRESS]"); + * ExternalAddress response = vmwareEngineClient.getExternalAddress(name); + * } + * }+ * + * @param name Required. The resource name of the external IP address to retrieve. Resource names + * are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ExternalAddress getExternalAddress(ExternalAddressName name) { + GetExternalAddressRequest request = + GetExternalAddressRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getExternalAddress(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single external IP address. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * String name = + * ExternalAddressName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[EXTERNAL_ADDRESS]") + * .toString(); + * ExternalAddress response = vmwareEngineClient.getExternalAddress(name); + * } + * }+ * + * @param name Required. The resource name of the external IP address to retrieve. Resource names + * are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ExternalAddress getExternalAddress(String name) { + GetExternalAddressRequest request = + GetExternalAddressRequest.newBuilder().setName(name).build(); + return getExternalAddress(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single external IP address. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * GetExternalAddressRequest request = + * GetExternalAddressRequest.newBuilder() + * .setName( + * ExternalAddressName.of( + * "[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[EXTERNAL_ADDRESS]") + * .toString()) + * .build(); + * ExternalAddress response = vmwareEngineClient.getExternalAddress(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 ExternalAddress getExternalAddress(GetExternalAddressRequest request) { + return getExternalAddressCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single external IP address. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * GetExternalAddressRequest request = + * GetExternalAddressRequest.newBuilder() + * .setName( + * ExternalAddressName.of( + * "[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[EXTERNAL_ADDRESS]") + * .toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.getExternalAddressCallable().futureCall(request); + * // Do something. + * ExternalAddress response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * PrivateCloudName parent = PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]"); + * ExternalAddress externalAddress = ExternalAddress.newBuilder().build(); + * String externalAddressId = "externalAddressId221595812"; + * ExternalAddress response = + * vmwareEngineClient + * .createExternalAddressAsync(parent, externalAddress, externalAddressId) + * .get(); + * } + * }+ * + * @param parent Required. The resource name of the private cloud to create a new external IP + * address in. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @param externalAddress Required. The initial description of a new external IP address. + * @param externalAddressId Required. The user-provided identifier of the `ExternalAddress` to be + * created. This identifier must be unique among `ExternalAddress` resources within the parent + * and becomes the final token in the name URI. The identifier must meet the following + * requirements: + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * String parent = PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString(); + * ExternalAddress externalAddress = ExternalAddress.newBuilder().build(); + * String externalAddressId = "externalAddressId221595812"; + * ExternalAddress response = + * vmwareEngineClient + * .createExternalAddressAsync(parent, externalAddress, externalAddressId) + * .get(); + * } + * }+ * + * @param parent Required. The resource name of the private cloud to create a new external IP + * address in. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @param externalAddress Required. The initial description of a new external IP address. + * @param externalAddressId Required. The user-provided identifier of the `ExternalAddress` to be + * created. This identifier must be unique among `ExternalAddress` resources within the parent + * and becomes the final token in the name URI. The identifier must meet the following + * requirements: + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * CreateExternalAddressRequest request = + * CreateExternalAddressRequest.newBuilder() + * .setParent( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setExternalAddress(ExternalAddress.newBuilder().build()) + * .setExternalAddressId("externalAddressId221595812") + * .setRequestId("requestId693933066") + * .build(); + * ExternalAddress response = vmwareEngineClient.createExternalAddressAsync(request).get(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * CreateExternalAddressRequest request = + * CreateExternalAddressRequest.newBuilder() + * .setParent( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setExternalAddress(ExternalAddress.newBuilder().build()) + * .setExternalAddressId("externalAddressId221595812") + * .setRequestId("requestId693933066") + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * vmwareEngineClient.createExternalAddressOperationCallable().futureCall(request); + * // Do something. + * ExternalAddress response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * CreateExternalAddressRequest request = + * CreateExternalAddressRequest.newBuilder() + * .setParent( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setExternalAddress(ExternalAddress.newBuilder().build()) + * .setExternalAddressId("externalAddressId221595812") + * .setRequestId("requestId693933066") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.createExternalAddressCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
During operation processing, the resource is temporarily in the `ACTIVE` state before the + * operation fully completes. For that period of time, you can't update the resource. Use the + * operation status to determine when the processing fully completes. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ExternalAddress externalAddress = ExternalAddress.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * ExternalAddress response = + * vmwareEngineClient.updateExternalAddressAsync(externalAddress, updateMask).get(); + * } + * }+ * + * @param externalAddress Required. External IP address description. + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `ExternalAddress` resource by the update. The fields specified in the `update_mask` are + * relative to the resource, not the full request. A field will be overwritten if it is in the + * mask. If the user does not provide a mask then all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
During operation processing, the resource is temporarily in the `ACTIVE` state before the + * operation fully completes. For that period of time, you can't update the resource. Use the + * operation status to determine when the processing fully completes. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * UpdateExternalAddressRequest request = + * UpdateExternalAddressRequest.newBuilder() + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setExternalAddress(ExternalAddress.newBuilder().build()) + * .setRequestId("requestId693933066") + * .build(); + * ExternalAddress response = vmwareEngineClient.updateExternalAddressAsync(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
During operation processing, the resource is temporarily in the `ACTIVE` state before the + * operation fully completes. For that period of time, you can't update the resource. Use the + * operation status to determine when the processing fully completes. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * UpdateExternalAddressRequest request = + * UpdateExternalAddressRequest.newBuilder() + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setExternalAddress(ExternalAddress.newBuilder().build()) + * .setRequestId("requestId693933066") + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * vmwareEngineClient.updateExternalAddressOperationCallable().futureCall(request); + * // Do something. + * ExternalAddress response = future.get(); + * } + * }
During operation processing, the resource is temporarily in the `ACTIVE` state before the + * operation fully completes. For that period of time, you can't update the resource. Use the + * operation status to determine when the processing fully completes. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * UpdateExternalAddressRequest request = + * UpdateExternalAddressRequest.newBuilder() + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setExternalAddress(ExternalAddress.newBuilder().build()) + * .setRequestId("requestId693933066") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.updateExternalAddressCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ExternalAddressName name = + * ExternalAddressName.of( + * "[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[EXTERNAL_ADDRESS]"); + * vmwareEngineClient.deleteExternalAddressAsync(name).get(); + * } + * }+ * + * @param name Required. The resource name of the external IP address to delete. Resource names + * are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * String name = + * ExternalAddressName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[EXTERNAL_ADDRESS]") + * .toString(); + * vmwareEngineClient.deleteExternalAddressAsync(name).get(); + * } + * }+ * + * @param name Required. The resource name of the external IP address to delete. Resource names + * are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * DeleteExternalAddressRequest request = + * DeleteExternalAddressRequest.newBuilder() + * .setName( + * ExternalAddressName.of( + * "[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[EXTERNAL_ADDRESS]") + * .toString()) + * .setRequestId("requestId693933066") + * .build(); + * vmwareEngineClient.deleteExternalAddressAsync(request).get(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * DeleteExternalAddressRequest request = + * DeleteExternalAddressRequest.newBuilder() + * .setName( + * ExternalAddressName.of( + * "[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[EXTERNAL_ADDRESS]") + * .toString()) + * .setRequestId("requestId693933066") + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * vmwareEngineClient.deleteExternalAddressOperationCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * DeleteExternalAddressRequest request = + * DeleteExternalAddressRequest.newBuilder() + * .setName( + * ExternalAddressName.of( + * "[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[EXTERNAL_ADDRESS]") + * .toString()) + * .setRequestId("requestId693933066") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.deleteExternalAddressCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * PrivateCloudName parent = PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]"); + * for (Subnet element : vmwareEngineClient.listSubnets(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The resource name of the private cloud to be queried for subnets. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSubnetsPagedResponse listSubnets(PrivateCloudName parent) { + ListSubnetsRequest request = + ListSubnetsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listSubnets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists subnets in a given private cloud. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * String parent = PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString(); + * for (Subnet element : vmwareEngineClient.listSubnets(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The resource name of the private cloud to be queried for subnets. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSubnetsPagedResponse listSubnets(String parent) { + ListSubnetsRequest request = ListSubnetsRequest.newBuilder().setParent(parent).build(); + return listSubnets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists subnets in a given private cloud. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ListSubnetsRequest request = + * ListSubnetsRequest.newBuilder() + * .setParent( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (Subnet element : vmwareEngineClient.listSubnets(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 ListSubnetsPagedResponse listSubnets(ListSubnetsRequest request) { + return listSubnetsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists subnets in a given private cloud. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ListSubnetsRequest request = + * ListSubnetsRequest.newBuilder() + * .setParent( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = vmwareEngineClient.listSubnetsPagedCallable().futureCall(request); + * // Do something. + * for (Subnet element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ListSubnetsRequest request = + * ListSubnetsRequest.newBuilder() + * .setParent( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * while (true) { + * ListSubnetsResponse response = vmwareEngineClient.listSubnetsCallable().call(request); + * for (Subnet element : response.getSubnetsList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }+ */ + public final UnaryCallable
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * SubnetName name = SubnetName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[SUBNET]"); + * Subnet response = vmwareEngineClient.getSubnet(name); + * } + * }+ * + * @param name Required. The resource name of the subnet to retrieve. Resource names are + * schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Subnet getSubnet(SubnetName name) { + GetSubnetRequest request = + GetSubnetRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getSubnet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single subnet. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * String name = + * SubnetName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[SUBNET]").toString(); + * Subnet response = vmwareEngineClient.getSubnet(name); + * } + * }+ * + * @param name Required. The resource name of the subnet to retrieve. Resource names are + * schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Subnet getSubnet(String name) { + GetSubnetRequest request = GetSubnetRequest.newBuilder().setName(name).build(); + return getSubnet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single subnet. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * GetSubnetRequest request = + * GetSubnetRequest.newBuilder() + * .setName( + * SubnetName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[SUBNET]") + * .toString()) + * .build(); + * Subnet response = vmwareEngineClient.getSubnet(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 Subnet getSubnet(GetSubnetRequest request) { + return getSubnetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single subnet. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * GetSubnetRequest request = + * GetSubnetRequest.newBuilder() + * .setName( + * SubnetName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[SUBNET]") + * .toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = vmwareEngineClient.getSubnetCallable().futureCall(request); + * // Do something. + * Subnet response = future.get(); + * } + * }
*Note*: This API is synchronous and always returns a successful + * `google.longrunning.Operation` (LRO). The returned LRO will only have `done` and `response` + * fields. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * Subnet subnet = Subnet.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * Subnet response = vmwareEngineClient.updateSubnetAsync(subnet, updateMask).get(); + * } + * }+ * + * @param subnet Required. Subnet description. + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `Subnet` resource by the update. The fields specified in the `update_mask` are relative to + * the resource, not the full request. A field will be overwritten if it is in the mask. If + * the user does not provide a mask then all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
*Note*: This API is synchronous and always returns a successful + * `google.longrunning.Operation` (LRO). The returned LRO will only have `done` and `response` + * fields. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * UpdateSubnetRequest request = + * UpdateSubnetRequest.newBuilder() + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setSubnet(Subnet.newBuilder().build()) + * .build(); + * Subnet response = vmwareEngineClient.updateSubnetAsync(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
*Note*: This API is synchronous and always returns a successful + * `google.longrunning.Operation` (LRO). The returned LRO will only have `done` and `response` + * fields. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * UpdateSubnetRequest request = + * UpdateSubnetRequest.newBuilder() + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setSubnet(Subnet.newBuilder().build()) + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * vmwareEngineClient.updateSubnetOperationCallable().futureCall(request); + * // Do something. + * Subnet response = future.get(); + * } + * }
*Note*: This API is synchronous and always returns a successful + * `google.longrunning.Operation` (LRO). The returned LRO will only have `done` and `response` + * fields. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * UpdateSubnetRequest request = + * UpdateSubnetRequest.newBuilder() + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setSubnet(Subnet.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = vmwareEngineClient.updateSubnetCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * NetworkPolicyName parent = + * NetworkPolicyName.of("[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]"); + * for (ExternalAccessRule element : + * vmwareEngineClient.listExternalAccessRules(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The resource name of the network policy to query for external access + * firewall rules. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListExternalAccessRulesPagedResponse listExternalAccessRules( + NetworkPolicyName parent) { + ListExternalAccessRulesRequest request = + ListExternalAccessRulesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listExternalAccessRules(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `ExternalAccessRule` resources in the specified network policy. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * String parent = + * NetworkPolicyName.of("[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]").toString(); + * for (ExternalAccessRule element : + * vmwareEngineClient.listExternalAccessRules(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The resource name of the network policy to query for external access + * firewall rules. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListExternalAccessRulesPagedResponse listExternalAccessRules(String parent) { + ListExternalAccessRulesRequest request = + ListExternalAccessRulesRequest.newBuilder().setParent(parent).build(); + return listExternalAccessRules(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `ExternalAccessRule` resources in the specified network policy. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ListExternalAccessRulesRequest request = + * ListExternalAccessRulesRequest.newBuilder() + * .setParent( + * NetworkPolicyName.of("[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * for (ExternalAccessRule element : + * vmwareEngineClient.listExternalAccessRules(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 ListExternalAccessRulesPagedResponse listExternalAccessRules( + ListExternalAccessRulesRequest request) { + return listExternalAccessRulesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `ExternalAccessRule` resources in the specified network policy. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ListExternalAccessRulesRequest request = + * ListExternalAccessRulesRequest.newBuilder() + * .setParent( + * NetworkPolicyName.of("[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.listExternalAccessRulesPagedCallable().futureCall(request); + * // Do something. + * for (ExternalAccessRule element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ListExternalAccessRulesRequest request = + * ListExternalAccessRulesRequest.newBuilder() + * .setParent( + * NetworkPolicyName.of("[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * while (true) { + * ListExternalAccessRulesResponse response = + * vmwareEngineClient.listExternalAccessRulesCallable().call(request); + * for (ExternalAccessRule element : response.getExternalAccessRulesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }+ */ + public final UnaryCallable
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ExternalAccessRuleName name = + * ExternalAccessRuleName.of( + * "[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]", "[EXTERNAL_ACCESS_RULE]"); + * ExternalAccessRule response = vmwareEngineClient.getExternalAccessRule(name); + * } + * }+ * + * @param name Required. The resource name of the external access firewall rule to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ExternalAccessRule getExternalAccessRule(ExternalAccessRuleName name) { + GetExternalAccessRuleRequest request = + GetExternalAccessRuleRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getExternalAccessRule(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single external access rule. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * String name = + * ExternalAccessRuleName.of( + * "[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]", "[EXTERNAL_ACCESS_RULE]") + * .toString(); + * ExternalAccessRule response = vmwareEngineClient.getExternalAccessRule(name); + * } + * }+ * + * @param name Required. The resource name of the external access firewall rule to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ExternalAccessRule getExternalAccessRule(String name) { + GetExternalAccessRuleRequest request = + GetExternalAccessRuleRequest.newBuilder().setName(name).build(); + return getExternalAccessRule(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single external access rule. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * GetExternalAccessRuleRequest request = + * GetExternalAccessRuleRequest.newBuilder() + * .setName( + * ExternalAccessRuleName.of( + * "[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]", "[EXTERNAL_ACCESS_RULE]") + * .toString()) + * .build(); + * ExternalAccessRule response = vmwareEngineClient.getExternalAccessRule(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 ExternalAccessRule getExternalAccessRule(GetExternalAccessRuleRequest request) { + return getExternalAccessRuleCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single external access rule. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * GetExternalAccessRuleRequest request = + * GetExternalAccessRuleRequest.newBuilder() + * .setName( + * ExternalAccessRuleName.of( + * "[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]", "[EXTERNAL_ACCESS_RULE]") + * .toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.getExternalAccessRuleCallable().futureCall(request); + * // Do something. + * ExternalAccessRule response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * NetworkPolicyName parent = + * NetworkPolicyName.of("[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]"); + * ExternalAccessRule externalAccessRule = ExternalAccessRule.newBuilder().build(); + * String externalAccessRuleId = "externalAccessRuleId1937389350"; + * ExternalAccessRule response = + * vmwareEngineClient + * .createExternalAccessRuleAsync(parent, externalAccessRule, externalAccessRuleId) + * .get(); + * } + * }+ * + * @param parent Required. The resource name of the network policy to create a new external access + * firewall rule in. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy` + * @param externalAccessRule Required. The initial description of a new external access rule. + * @param externalAccessRuleId Required. The user-provided identifier of the `ExternalAccessRule` + * to be created. This identifier must be unique among `ExternalAccessRule` resources within + * the parent and becomes the final token in the name URI. The identifier must meet the + * following requirements: + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * String parent = + * NetworkPolicyName.of("[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]").toString(); + * ExternalAccessRule externalAccessRule = ExternalAccessRule.newBuilder().build(); + * String externalAccessRuleId = "externalAccessRuleId1937389350"; + * ExternalAccessRule response = + * vmwareEngineClient + * .createExternalAccessRuleAsync(parent, externalAccessRule, externalAccessRuleId) + * .get(); + * } + * }+ * + * @param parent Required. The resource name of the network policy to create a new external access + * firewall rule in. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy` + * @param externalAccessRule Required. The initial description of a new external access rule. + * @param externalAccessRuleId Required. The user-provided identifier of the `ExternalAccessRule` + * to be created. This identifier must be unique among `ExternalAccessRule` resources within + * the parent and becomes the final token in the name URI. The identifier must meet the + * following requirements: + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * CreateExternalAccessRuleRequest request = + * CreateExternalAccessRuleRequest.newBuilder() + * .setParent( + * NetworkPolicyName.of("[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]").toString()) + * .setExternalAccessRule(ExternalAccessRule.newBuilder().build()) + * .setExternalAccessRuleId("externalAccessRuleId1937389350") + * .setRequestId("requestId693933066") + * .build(); + * ExternalAccessRule response = vmwareEngineClient.createExternalAccessRuleAsync(request).get(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * CreateExternalAccessRuleRequest request = + * CreateExternalAccessRuleRequest.newBuilder() + * .setParent( + * NetworkPolicyName.of("[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]").toString()) + * .setExternalAccessRule(ExternalAccessRule.newBuilder().build()) + * .setExternalAccessRuleId("externalAccessRuleId1937389350") + * .setRequestId("requestId693933066") + * .build(); + * OperationFuture+ */ + public final OperationCallable< + CreateExternalAccessRuleRequest, ExternalAccessRule, OperationMetadata> + createExternalAccessRuleOperationCallable() { + return stub.createExternalAccessRuleOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new external access rule in a given network policy. + * + *future = + * vmwareEngineClient.createExternalAccessRuleOperationCallable().futureCall(request); + * // Do something. + * ExternalAccessRule response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * CreateExternalAccessRuleRequest request = + * CreateExternalAccessRuleRequest.newBuilder() + * .setParent( + * NetworkPolicyName.of("[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]").toString()) + * .setExternalAccessRule(ExternalAccessRule.newBuilder().build()) + * .setExternalAccessRuleId("externalAccessRuleId1937389350") + * .setRequestId("requestId693933066") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.createExternalAccessRuleCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ExternalAccessRule externalAccessRule = ExternalAccessRule.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * ExternalAccessRule response = + * vmwareEngineClient.updateExternalAccessRuleAsync(externalAccessRule, updateMask).get(); + * } + * }+ * + * @param externalAccessRule Required. Description of the external access rule. + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `ExternalAccessRule` resource by the update. The fields specified in the `update_mask` are + * relative to the resource, not the full request. A field will be overwritten if it is in the + * mask. If the user does not provide a mask then all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * UpdateExternalAccessRuleRequest request = + * UpdateExternalAccessRuleRequest.newBuilder() + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setExternalAccessRule(ExternalAccessRule.newBuilder().build()) + * .setRequestId("requestId693933066") + * .build(); + * ExternalAccessRule response = vmwareEngineClient.updateExternalAccessRuleAsync(request).get(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * UpdateExternalAccessRuleRequest request = + * UpdateExternalAccessRuleRequest.newBuilder() + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setExternalAccessRule(ExternalAccessRule.newBuilder().build()) + * .setRequestId("requestId693933066") + * .build(); + * OperationFuture+ */ + public final OperationCallable< + UpdateExternalAccessRuleRequest, ExternalAccessRule, OperationMetadata> + updateExternalAccessRuleOperationCallable() { + return stub.updateExternalAccessRuleOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single external access rule. Only fields specified in `update_mask` + * are applied. + * + *future = + * vmwareEngineClient.updateExternalAccessRuleOperationCallable().futureCall(request); + * // Do something. + * ExternalAccessRule response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * UpdateExternalAccessRuleRequest request = + * UpdateExternalAccessRuleRequest.newBuilder() + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setExternalAccessRule(ExternalAccessRule.newBuilder().build()) + * .setRequestId("requestId693933066") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.updateExternalAccessRuleCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ExternalAccessRuleName name = + * ExternalAccessRuleName.of( + * "[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]", "[EXTERNAL_ACCESS_RULE]"); + * vmwareEngineClient.deleteExternalAccessRuleAsync(name).get(); + * } + * }+ * + * @param name Required. The resource name of the external access firewall rule to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * String name = + * ExternalAccessRuleName.of( + * "[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]", "[EXTERNAL_ACCESS_RULE]") + * .toString(); + * vmwareEngineClient.deleteExternalAccessRuleAsync(name).get(); + * } + * }+ * + * @param name Required. The resource name of the external access firewall rule to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * DeleteExternalAccessRuleRequest request = + * DeleteExternalAccessRuleRequest.newBuilder() + * .setName( + * ExternalAccessRuleName.of( + * "[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]", "[EXTERNAL_ACCESS_RULE]") + * .toString()) + * .setRequestId("requestId693933066") + * .build(); + * vmwareEngineClient.deleteExternalAccessRuleAsync(request).get(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * DeleteExternalAccessRuleRequest request = + * DeleteExternalAccessRuleRequest.newBuilder() + * .setName( + * ExternalAccessRuleName.of( + * "[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]", "[EXTERNAL_ACCESS_RULE]") + * .toString()) + * .setRequestId("requestId693933066") + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * vmwareEngineClient.deleteExternalAccessRuleOperationCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * DeleteExternalAccessRuleRequest request = + * DeleteExternalAccessRuleRequest.newBuilder() + * .setName( + * ExternalAccessRuleName.of( + * "[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]", "[EXTERNAL_ACCESS_RULE]") + * .toString()) + * .setRequestId("requestId693933066") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.deleteExternalAccessRuleCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * PrivateCloudName parent = PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]"); + * for (LoggingServer element : vmwareEngineClient.listLoggingServers(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The resource name of the private cloud to be queried for logging + * servers. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLoggingServersPagedResponse listLoggingServers(PrivateCloudName parent) { + ListLoggingServersRequest request = + ListLoggingServersRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listLoggingServers(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists logging servers configured for a given private cloud. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * String parent = PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString(); + * for (LoggingServer element : vmwareEngineClient.listLoggingServers(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The resource name of the private cloud to be queried for logging + * servers. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLoggingServersPagedResponse listLoggingServers(String parent) { + ListLoggingServersRequest request = + ListLoggingServersRequest.newBuilder().setParent(parent).build(); + return listLoggingServers(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists logging servers configured for a given private cloud. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ListLoggingServersRequest request = + * ListLoggingServersRequest.newBuilder() + * .setParent( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * for (LoggingServer element : vmwareEngineClient.listLoggingServers(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 ListLoggingServersPagedResponse listLoggingServers( + ListLoggingServersRequest request) { + return listLoggingServersPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists logging servers configured for a given private cloud. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ListLoggingServersRequest request = + * ListLoggingServersRequest.newBuilder() + * .setParent( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.listLoggingServersPagedCallable().futureCall(request); + * // Do something. + * for (LoggingServer element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ListLoggingServersRequest request = + * ListLoggingServersRequest.newBuilder() + * .setParent( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * while (true) { + * ListLoggingServersResponse response = + * vmwareEngineClient.listLoggingServersCallable().call(request); + * for (LoggingServer element : response.getLoggingServersList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }+ */ + public final UnaryCallable
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * LoggingServerName name = + * LoggingServerName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[LOGGING_SERVER]"); + * LoggingServer response = vmwareEngineClient.getLoggingServer(name); + * } + * }+ * + * @param name Required. The resource name of the Logging Server to retrieve. Resource names are + * schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LoggingServer getLoggingServer(LoggingServerName name) { + GetLoggingServerRequest request = + GetLoggingServerRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getLoggingServer(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a logging server. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * String name = + * LoggingServerName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[LOGGING_SERVER]") + * .toString(); + * LoggingServer response = vmwareEngineClient.getLoggingServer(name); + * } + * }+ * + * @param name Required. The resource name of the Logging Server to retrieve. Resource names are + * schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LoggingServer getLoggingServer(String name) { + GetLoggingServerRequest request = GetLoggingServerRequest.newBuilder().setName(name).build(); + return getLoggingServer(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a logging server. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * GetLoggingServerRequest request = + * GetLoggingServerRequest.newBuilder() + * .setName( + * LoggingServerName.of( + * "[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[LOGGING_SERVER]") + * .toString()) + * .build(); + * LoggingServer response = vmwareEngineClient.getLoggingServer(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 LoggingServer getLoggingServer(GetLoggingServerRequest request) { + return getLoggingServerCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a logging server. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * GetLoggingServerRequest request = + * GetLoggingServerRequest.newBuilder() + * .setName( + * LoggingServerName.of( + * "[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[LOGGING_SERVER]") + * .toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.getLoggingServerCallable().futureCall(request); + * // Do something. + * LoggingServer response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * PrivateCloudName parent = PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]"); + * LoggingServer loggingServer = LoggingServer.newBuilder().build(); + * String loggingServerId = "loggingServerId-304163779"; + * LoggingServer response = + * vmwareEngineClient.createLoggingServerAsync(parent, loggingServer, loggingServerId).get(); + * } + * }+ * + * @param parent Required. The resource name of the private cloud to create a new Logging Server + * in. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @param loggingServer Required. The initial description of a new logging server. + * @param loggingServerId Required. The user-provided identifier of the `LoggingServer` to be + * created. This identifier must be unique among `LoggingServer` resources within the parent + * and becomes the final token in the name URI. The identifier must meet the following + * requirements: + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * String parent = PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString(); + * LoggingServer loggingServer = LoggingServer.newBuilder().build(); + * String loggingServerId = "loggingServerId-304163779"; + * LoggingServer response = + * vmwareEngineClient.createLoggingServerAsync(parent, loggingServer, loggingServerId).get(); + * } + * }+ * + * @param parent Required. The resource name of the private cloud to create a new Logging Server + * in. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @param loggingServer Required. The initial description of a new logging server. + * @param loggingServerId Required. The user-provided identifier of the `LoggingServer` to be + * created. This identifier must be unique among `LoggingServer` resources within the parent + * and becomes the final token in the name URI. The identifier must meet the following + * requirements: + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * CreateLoggingServerRequest request = + * CreateLoggingServerRequest.newBuilder() + * .setParent( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setLoggingServer(LoggingServer.newBuilder().build()) + * .setLoggingServerId("loggingServerId-304163779") + * .setRequestId("requestId693933066") + * .build(); + * LoggingServer response = vmwareEngineClient.createLoggingServerAsync(request).get(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * CreateLoggingServerRequest request = + * CreateLoggingServerRequest.newBuilder() + * .setParent( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setLoggingServer(LoggingServer.newBuilder().build()) + * .setLoggingServerId("loggingServerId-304163779") + * .setRequestId("requestId693933066") + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * vmwareEngineClient.createLoggingServerOperationCallable().futureCall(request); + * // Do something. + * LoggingServer response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * CreateLoggingServerRequest request = + * CreateLoggingServerRequest.newBuilder() + * .setParent( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setLoggingServer(LoggingServer.newBuilder().build()) + * .setLoggingServerId("loggingServerId-304163779") + * .setRequestId("requestId693933066") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.createLoggingServerCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * LoggingServer loggingServer = LoggingServer.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * LoggingServer response = + * vmwareEngineClient.updateLoggingServerAsync(loggingServer, updateMask).get(); + * } + * }+ * + * @param loggingServer Required. Logging server description. + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `LoggingServer` resource by the update. The fields specified in the `update_mask` are + * relative to the resource, not the full request. A field will be overwritten if it is in the + * mask. If the user does not provide a mask then all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * UpdateLoggingServerRequest request = + * UpdateLoggingServerRequest.newBuilder() + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setLoggingServer(LoggingServer.newBuilder().build()) + * .setRequestId("requestId693933066") + * .build(); + * LoggingServer response = vmwareEngineClient.updateLoggingServerAsync(request).get(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * UpdateLoggingServerRequest request = + * UpdateLoggingServerRequest.newBuilder() + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setLoggingServer(LoggingServer.newBuilder().build()) + * .setRequestId("requestId693933066") + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * vmwareEngineClient.updateLoggingServerOperationCallable().futureCall(request); + * // Do something. + * LoggingServer response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * UpdateLoggingServerRequest request = + * UpdateLoggingServerRequest.newBuilder() + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setLoggingServer(LoggingServer.newBuilder().build()) + * .setRequestId("requestId693933066") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.updateLoggingServerCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * LoggingServerName name = + * LoggingServerName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[LOGGING_SERVER]"); + * vmwareEngineClient.deleteLoggingServerAsync(name).get(); + * } + * }+ * + * @param name Required. The resource name of the logging server to delete. Resource names are + * schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * String name = + * LoggingServerName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[LOGGING_SERVER]") + * .toString(); + * vmwareEngineClient.deleteLoggingServerAsync(name).get(); + * } + * }+ * + * @param name Required. The resource name of the logging server to delete. Resource names are + * schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * DeleteLoggingServerRequest request = + * DeleteLoggingServerRequest.newBuilder() + * .setName( + * LoggingServerName.of( + * "[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[LOGGING_SERVER]") + * .toString()) + * .setRequestId("requestId693933066") + * .build(); + * vmwareEngineClient.deleteLoggingServerAsync(request).get(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * DeleteLoggingServerRequest request = + * DeleteLoggingServerRequest.newBuilder() + * .setName( + * LoggingServerName.of( + * "[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[LOGGING_SERVER]") + * .toString()) + * .setRequestId("requestId693933066") + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * vmwareEngineClient.deleteLoggingServerOperationCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * DeleteLoggingServerRequest request = + * DeleteLoggingServerRequest.newBuilder() + * .setName( + * LoggingServerName.of( + * "[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[LOGGING_SERVER]") + * .toString()) + * .setRequestId("requestId693933066") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.deleteLoggingServerCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * for (NodeType element : vmwareEngineClient.listNodeTypes(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The resource name of the location to be queried for node types. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNodeTypesPagedResponse listNodeTypes(LocationName parent) { + ListNodeTypesRequest request = + ListNodeTypesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listNodeTypes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists node types + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + * for (NodeType element : vmwareEngineClient.listNodeTypes(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The resource name of the location to be queried for node types. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNodeTypesPagedResponse listNodeTypes(String parent) { + ListNodeTypesRequest request = ListNodeTypesRequest.newBuilder().setParent(parent).build(); + return listNodeTypes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists node types + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ListNodeTypesRequest request = + * ListNodeTypesRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .build(); + * for (NodeType element : vmwareEngineClient.listNodeTypes(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 ListNodeTypesPagedResponse listNodeTypes(ListNodeTypesRequest request) { + return listNodeTypesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists node types + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ListNodeTypesRequest request = + * ListNodeTypesRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.listNodeTypesPagedCallable().futureCall(request); + * // Do something. + * for (NodeType element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ListNodeTypesRequest request = + * ListNodeTypesRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .build(); + * while (true) { + * ListNodeTypesResponse response = vmwareEngineClient.listNodeTypesCallable().call(request); + * for (NodeType element : response.getNodeTypesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }+ */ + public final UnaryCallable
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * NodeTypeName name = NodeTypeName.of("[PROJECT]", "[LOCATION]", "[NODE_TYPE]"); + * NodeType response = vmwareEngineClient.getNodeType(name); + * } + * }+ * + * @param name Required. The resource name of the node type to retrieve. Resource names are + * schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NodeType getNodeType(NodeTypeName name) { + GetNodeTypeRequest request = + GetNodeTypeRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getNodeType(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single `NodeType`. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * String name = NodeTypeName.of("[PROJECT]", "[LOCATION]", "[NODE_TYPE]").toString(); + * NodeType response = vmwareEngineClient.getNodeType(name); + * } + * }+ * + * @param name Required. The resource name of the node type to retrieve. Resource names are + * schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NodeType getNodeType(String name) { + GetNodeTypeRequest request = GetNodeTypeRequest.newBuilder().setName(name).build(); + return getNodeType(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single `NodeType`. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * GetNodeTypeRequest request = + * GetNodeTypeRequest.newBuilder() + * .setName(NodeTypeName.of("[PROJECT]", "[LOCATION]", "[NODE_TYPE]").toString()) + * .build(); + * NodeType response = vmwareEngineClient.getNodeType(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 NodeType getNodeType(GetNodeTypeRequest request) { + return getNodeTypeCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single `NodeType`. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * GetNodeTypeRequest request = + * GetNodeTypeRequest.newBuilder() + * .setName(NodeTypeName.of("[PROJECT]", "[LOCATION]", "[NODE_TYPE]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = vmwareEngineClient.getNodeTypeCallable().futureCall(request); + * // Do something. + * NodeType response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * PrivateCloudName privateCloud = + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]"); + * Credentials response = vmwareEngineClient.showNsxCredentials(privateCloud); + * } + * }+ * + * @param privateCloud Required. The resource name of the private cloud to be queried for + * credentials. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Credentials showNsxCredentials(PrivateCloudName privateCloud) { + ShowNsxCredentialsRequest request = + ShowNsxCredentialsRequest.newBuilder() + .setPrivateCloud(privateCloud == null ? null : privateCloud.toString()) + .build(); + return showNsxCredentials(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of credentials for NSX appliance. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * String privateCloud = + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString(); + * Credentials response = vmwareEngineClient.showNsxCredentials(privateCloud); + * } + * }+ * + * @param privateCloud Required. The resource name of the private cloud to be queried for + * credentials. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Credentials showNsxCredentials(String privateCloud) { + ShowNsxCredentialsRequest request = + ShowNsxCredentialsRequest.newBuilder().setPrivateCloud(privateCloud).build(); + return showNsxCredentials(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of credentials for NSX appliance. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ShowNsxCredentialsRequest request = + * ShowNsxCredentialsRequest.newBuilder() + * .setPrivateCloud( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .build(); + * Credentials response = vmwareEngineClient.showNsxCredentials(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 Credentials showNsxCredentials(ShowNsxCredentialsRequest request) { + return showNsxCredentialsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of credentials for NSX appliance. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ShowNsxCredentialsRequest request = + * ShowNsxCredentialsRequest.newBuilder() + * .setPrivateCloud( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.showNsxCredentialsCallable().futureCall(request); + * // Do something. + * Credentials response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * PrivateCloudName privateCloud = + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]"); + * Credentials response = vmwareEngineClient.showVcenterCredentials(privateCloud); + * } + * }+ * + * @param privateCloud Required. The resource name of the private cloud to be queried for + * credentials. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Credentials showVcenterCredentials(PrivateCloudName privateCloud) { + ShowVcenterCredentialsRequest request = + ShowVcenterCredentialsRequest.newBuilder() + .setPrivateCloud(privateCloud == null ? null : privateCloud.toString()) + .build(); + return showVcenterCredentials(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of credentials for Vcenter appliance. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * String privateCloud = + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString(); + * Credentials response = vmwareEngineClient.showVcenterCredentials(privateCloud); + * } + * }+ * + * @param privateCloud Required. The resource name of the private cloud to be queried for + * credentials. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Credentials showVcenterCredentials(String privateCloud) { + ShowVcenterCredentialsRequest request = + ShowVcenterCredentialsRequest.newBuilder().setPrivateCloud(privateCloud).build(); + return showVcenterCredentials(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of credentials for Vcenter appliance. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ShowVcenterCredentialsRequest request = + * ShowVcenterCredentialsRequest.newBuilder() + * .setPrivateCloud( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setUsername("username-265713450") + * .build(); + * Credentials response = vmwareEngineClient.showVcenterCredentials(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 Credentials showVcenterCredentials(ShowVcenterCredentialsRequest request) { + return showVcenterCredentialsCallable().call(request); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns the OperationsClient that can be used to query the status of a long-running operation - * returned by another API method call. + * Gets details of credentials for Vcenter appliance. + * + *
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * ShowVcenterCredentialsRequest request = + * ShowVcenterCredentialsRequest.newBuilder() + * .setPrivateCloud( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setUsername("username-265713450") + * .build(); + * ApiFuture*/ - @BetaApi - public final OperationsClient getHttpJsonOperationsClient() { - return httpJsonOperationsClient; + public final UnaryCallablefuture = + * vmwareEngineClient.showVcenterCredentialsCallable().futureCall(request); + * // Do something. + * Credentials response = future.get(); + * } + * }
Sample code:
*
@@ -1060,30 +7516,30 @@ public final OperationsClient getHttpJsonOperationsClient() {
* // - It may require 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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * for (PrivateCloud element : vmwareEngineClient.listPrivateClouds(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
+ * PrivateCloudName privateCloud =
+ * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]");
+ * PrivateCloud response = vmwareEngineClient.resetNsxCredentialsAsync(privateCloud).get();
* }
* }
*
- * @param parent Required. The resource name of the private cloud to be queried for clusters.
+ * @param privateCloud Required. The resource name of the private cloud to reset credentials for.
* Resource names are schemeless URIs that follow the conventions in
* https://cloud.google.com/apis/design/resource_names. For example:
- * `projects/my-project/locations/us-central1-a`
+ * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListPrivateCloudsPagedResponse listPrivateClouds(LocationName parent) {
- ListPrivateCloudsRequest request =
- ListPrivateCloudsRequest.newBuilder()
- .setParent(parent == null ? null : parent.toString())
+ public final OperationFuture Sample code:
*
@@ -1094,28 +7550,28 @@ public final ListPrivateCloudsPagedResponse listPrivateClouds(LocationName paren
* // - It may require 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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
- * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
- * for (PrivateCloud element : vmwareEngineClient.listPrivateClouds(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
+ * String privateCloud =
+ * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString();
+ * PrivateCloud response = vmwareEngineClient.resetNsxCredentialsAsync(privateCloud).get();
* }
* }
*
- * @param parent Required. The resource name of the private cloud to be queried for clusters.
+ * @param privateCloud Required. The resource name of the private cloud to reset credentials for.
* Resource names are schemeless URIs that follow the conventions in
* https://cloud.google.com/apis/design/resource_names. For example:
- * `projects/my-project/locations/us-central1-a`
+ * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListPrivateCloudsPagedResponse listPrivateClouds(String parent) {
- ListPrivateCloudsRequest request =
- ListPrivateCloudsRequest.newBuilder().setParent(parent).build();
- return listPrivateClouds(request);
+ public final OperationFuture Sample code:
*
@@ -1126,30 +7582,27 @@ public final ListPrivateCloudsPagedResponse listPrivateClouds(String parent) {
* // - It may require 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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
- * ListPrivateCloudsRequest request =
- * ListPrivateCloudsRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setFilter("filter-1274492040")
- * .setOrderBy("orderBy-1207110587")
+ * ResetNsxCredentialsRequest request =
+ * ResetNsxCredentialsRequest.newBuilder()
+ * .setPrivateCloud(
+ * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString())
+ * .setRequestId("requestId693933066")
* .build();
- * for (PrivateCloud element : vmwareEngineClient.listPrivateClouds(request).iterateAll()) {
- * // doThingsWith(element);
- * }
+ * PrivateCloud response = vmwareEngineClient.resetNsxCredentialsAsync(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 ListPrivateCloudsPagedResponse listPrivateClouds(ListPrivateCloudsRequest request) {
- return listPrivateCloudsPagedCallable().call(request);
+ public final OperationFuture Sample code:
*
@@ -1160,31 +7613,27 @@ public final ListPrivateCloudsPagedResponse listPrivateClouds(ListPrivateCloudsR
* // - It may require 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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
- * ListPrivateCloudsRequest request =
- * ListPrivateCloudsRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setFilter("filter-1274492040")
- * .setOrderBy("orderBy-1207110587")
+ * ResetNsxCredentialsRequest request =
+ * ResetNsxCredentialsRequest.newBuilder()
+ * .setPrivateCloud(
+ * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString())
+ * .setRequestId("requestId693933066")
* .build();
- * ApiFuture Sample code:
*
@@ -1195,38 +7644,26 @@ public final ListPrivateCloudsPagedResponse listPrivateClouds(ListPrivateCloudsR
* // - It may require 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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
- * ListPrivateCloudsRequest request =
- * ListPrivateCloudsRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setFilter("filter-1274492040")
- * .setOrderBy("orderBy-1207110587")
+ * ResetNsxCredentialsRequest request =
+ * ResetNsxCredentialsRequest.newBuilder()
+ * .setPrivateCloud(
+ * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString())
+ * .setRequestId("requestId693933066")
* .build();
- * while (true) {
- * ListPrivateCloudsResponse response =
- * vmwareEngineClient.listPrivateCloudsCallable().call(request);
- * for (PrivateCloud element : response.getPrivateCloudsList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
+ * ApiFuture Sample code:
*
@@ -1237,26 +7674,30 @@ public final ListPrivateCloudsPagedResponse listPrivateClouds(ListPrivateCloudsR
* // - It may require 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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
- * PrivateCloudName name = PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]");
- * PrivateCloud response = vmwareEngineClient.getPrivateCloud(name);
+ * PrivateCloudName privateCloud =
+ * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]");
+ * PrivateCloud response = vmwareEngineClient.resetVcenterCredentialsAsync(privateCloud).get();
* }
* }
*
- * @param name Required. The resource name of the private cloud to retrieve. Resource names are
- * schemeless URIs that follow the conventions in
+ * @param privateCloud Required. The resource name of the private cloud to reset credentials for.
+ * Resource names are schemeless URIs that follow the conventions in
* https://cloud.google.com/apis/design/resource_names. For example:
* `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final PrivateCloud getPrivateCloud(PrivateCloudName name) {
- GetPrivateCloudRequest request =
- GetPrivateCloudRequest.newBuilder().setName(name == null ? null : name.toString()).build();
- return getPrivateCloud(request);
+ public final OperationFuture Sample code:
*
@@ -1267,25 +7708,28 @@ public final PrivateCloud getPrivateCloud(PrivateCloudName name) {
* // - It may require 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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
- * String name = PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString();
- * PrivateCloud response = vmwareEngineClient.getPrivateCloud(name);
+ * String privateCloud =
+ * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString();
+ * PrivateCloud response = vmwareEngineClient.resetVcenterCredentialsAsync(privateCloud).get();
* }
* }
*
- * @param name Required. The resource name of the private cloud to retrieve. Resource names are
- * schemeless URIs that follow the conventions in
+ * @param privateCloud Required. The resource name of the private cloud to reset credentials for.
+ * Resource names are schemeless URIs that follow the conventions in
* https://cloud.google.com/apis/design/resource_names. For example:
* `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final PrivateCloud getPrivateCloud(String name) {
- GetPrivateCloudRequest request = GetPrivateCloudRequest.newBuilder().setName(name).build();
- return getPrivateCloud(request);
+ public final OperationFuture Sample code:
*
@@ -1296,24 +7740,28 @@ public final PrivateCloud getPrivateCloud(String name) {
* // - It may require 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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
- * GetPrivateCloudRequest request =
- * GetPrivateCloudRequest.newBuilder()
- * .setName(PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString())
+ * ResetVcenterCredentialsRequest request =
+ * ResetVcenterCredentialsRequest.newBuilder()
+ * .setPrivateCloud(
+ * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString())
+ * .setRequestId("requestId693933066")
+ * .setUsername("username-265713450")
* .build();
- * PrivateCloud response = vmwareEngineClient.getPrivateCloud(request);
+ * PrivateCloud response = vmwareEngineClient.resetVcenterCredentialsAsync(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 PrivateCloud getPrivateCloud(GetPrivateCloudRequest request) {
- return getPrivateCloudCallable().call(request);
+ public final OperationFuture Sample code:
*
@@ -1324,29 +7772,28 @@ public final PrivateCloud getPrivateCloud(GetPrivateCloudRequest request) {
* // - It may require 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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
- * GetPrivateCloudRequest request =
- * GetPrivateCloudRequest.newBuilder()
- * .setName(PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString())
+ * ResetVcenterCredentialsRequest request =
+ * ResetVcenterCredentialsRequest.newBuilder()
+ * .setPrivateCloud(
+ * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString())
+ * .setRequestId("requestId693933066")
+ * .setUsername("username-265713450")
* .build();
- * ApiFuture Creating a private cloud also creates a [management
- * cluster](https://cloud.google.com/vmware-engine/docs/concepts-vmware-components) for that
- * private cloud.
+ * Resets credentials of the Vcenter appliance.
*
* Sample code:
*
@@ -1357,52 +7804,28 @@ public final UnaryCallable Creating a private cloud also creates a [management
- * cluster](https://cloud.google.com/vmware-engine/docs/concepts-vmware-components) for that
- * private cloud.
+ * Gets details of the `DnsForwarding` config.
*
* Sample code:
*
@@ -1413,52 +7836,26 @@ public final OperationFuture Creating a private cloud also creates a [management
- * cluster](https://cloud.google.com/vmware-engine/docs/concepts-vmware-components) for that
- * private cloud.
+ * Gets details of the `DnsForwarding` config.
*
* Sample code:
*
@@ -1469,34 +7866,25 @@ public final OperationFuture Creating a private cloud also creates a [management
- * cluster](https://cloud.google.com/vmware-engine/docs/concepts-vmware-components) for that
- * private cloud.
+ * Gets details of the `DnsForwarding` config.
*
* Sample code:
*
@@ -1507,34 +7895,25 @@ public final OperationFuture Creating a private cloud also creates a [management
- * cluster](https://cloud.google.com/vmware-engine/docs/concepts-vmware-components) for that
- * private cloud.
+ * Gets details of the `DnsForwarding` config.
*
* Sample code:
*
@@ -1545,33 +7924,26 @@ public final OperationFuture During operation processing, the resource is temporarily in the `ACTIVE` state before the
- * operation fully completes. For that period of time, you can't update the resource. Use the
- * operation status to determine when the processing fully completes.
+ * Updates the parameters of the `DnsForwarding` config, like associated domains. Only fields
+ * specified in `update_mask` are applied.
*
* Sample code:
*
@@ -1582,38 +7954,34 @@ public final UnaryCallable During operation processing, the resource is temporarily in the `ACTIVE` state before the
- * operation fully completes. For that period of time, you can't update the resource. Use the
- * operation status to determine when the processing fully completes.
+ * Updates the parameters of the `DnsForwarding` config, like associated domains. Only fields
+ * specified in `update_mask` are applied.
*
* Sample code:
*
@@ -1624,32 +7992,28 @@ public final OperationFuture During operation processing, the resource is temporarily in the `ACTIVE` state before the
- * operation fully completes. For that period of time, you can't update the resource. Use the
- * operation status to determine when the processing fully completes.
+ * Updates the parameters of the `DnsForwarding` config, like associated domains. Only fields
+ * specified in `update_mask` are applied.
*
* Sample code:
*
@@ -1660,32 +8024,28 @@ public final OperationFuture During operation processing, the resource is temporarily in the `ACTIVE` state before the
- * operation fully completes. For that period of time, you can't update the resource. Use the
- * operation status to determine when the processing fully completes.
+ * Updates the parameters of the `DnsForwarding` config, like associated domains. Only fields
+ * specified in `update_mask` are applied.
*
* Sample code:
*
@@ -1696,81 +8056,28 @@ public final OperationFuture A `PrivateCloud` resource scheduled for deletion has `PrivateCloud.state` set to `DELETED`
- * and `expireTime` set to the time when deletion is final and can no longer be reversed. The
- * delete operation is marked as done as soon as the `PrivateCloud` is successfully scheduled for
- * deletion (this also applies when `delayHours` is set to zero), and the operation is not kept in
- * pending state until `PrivateCloud` is purged. `PrivateCloud` can be restored using
- * `UndeletePrivateCloud` method before the `expireTime` elapses. When `expireTime` is reached,
- * deletion is final and all private cloud resources are irreversibly removed and billing stops.
- * During the final removal process, `PrivateCloud.state` is set to `PURGING`. `PrivateCloud` can
- * be polled using standard `GET` method for the whole period of deletion and purging. It will not
- * be returned only when it is completely purged.
- *
- * Sample code:
- *
- * A `PrivateCloud` resource scheduled for deletion has `PrivateCloud.state` set to `DELETED`
- * and `expireTime` set to the time when deletion is final and can no longer be reversed. The
- * delete operation is marked as done as soon as the `PrivateCloud` is successfully scheduled for
- * deletion (this also applies when `delayHours` is set to zero), and the operation is not kept in
- * pending state until `PrivateCloud` is purged. `PrivateCloud` can be restored using
- * `UndeletePrivateCloud` method before the `expireTime` elapses. When `expireTime` is reached,
- * deletion is final and all private cloud resources are irreversibly removed and billing stops.
- * During the final removal process, `PrivateCloud.state` is set to `PURGING`. `PrivateCloud` can
- * be polled using standard `GET` method for the whole period of deletion and purging. It will not
- * be returned only when it is completely purged.
+ * Retrieves a `NetworkPeering` resource by its resource name. The resource contains details of
+ * the network peering, such as peered networks, import and export custom route configurations,
+ * and peering state. NetworkPeering is a global resource and location can only be global.
*
* Sample code:
*
@@ -1781,38 +8088,31 @@ public final OperationFuture A `PrivateCloud` resource scheduled for deletion has `PrivateCloud.state` set to `DELETED`
- * and `expireTime` set to the time when deletion is final and can no longer be reversed. The
- * delete operation is marked as done as soon as the `PrivateCloud` is successfully scheduled for
- * deletion (this also applies when `delayHours` is set to zero), and the operation is not kept in
- * pending state until `PrivateCloud` is purged. `PrivateCloud` can be restored using
- * `UndeletePrivateCloud` method before the `expireTime` elapses. When `expireTime` is reached,
- * deletion is final and all private cloud resources are irreversibly removed and billing stops.
- * During the final removal process, `PrivateCloud.state` is set to `PURGING`. `PrivateCloud` can
- * be polled using standard `GET` method for the whole period of deletion and purging. It will not
- * be returned only when it is completely purged.
+ * Retrieves a `NetworkPeering` resource by its resource name. The resource contains details of
+ * the network peering, such as peered networks, import and export custom route configurations,
+ * and peering state. NetworkPeering is a global resource and location can only be global.
*
* Sample code:
*
@@ -1823,39 +8123,28 @@ public final OperationFuture A `PrivateCloud` resource scheduled for deletion has `PrivateCloud.state` set to `DELETED`
- * and `expireTime` set to the time when deletion is final and can no longer be reversed. The
- * delete operation is marked as done as soon as the `PrivateCloud` is successfully scheduled for
- * deletion (this also applies when `delayHours` is set to zero), and the operation is not kept in
- * pending state until `PrivateCloud` is purged. `PrivateCloud` can be restored using
- * `UndeletePrivateCloud` method before the `expireTime` elapses. When `expireTime` is reached,
- * deletion is final and all private cloud resources are irreversibly removed and billing stops.
- * During the final removal process, `PrivateCloud.state` is set to `PURGING`. `PrivateCloud` can
- * be polled using standard `GET` method for the whole period of deletion and purging. It will not
- * be returned only when it is completely purged.
+ * Retrieves a `NetworkPeering` resource by its resource name. The resource contains details of
+ * the network peering, such as peered networks, import and export custom route configurations,
+ * and peering state. NetworkPeering is a global resource and location can only be global.
*
* Sample code:
*
@@ -1866,39 +8155,27 @@ public final OperationFuture A `PrivateCloud` resource scheduled for deletion has `PrivateCloud.state` set to `DELETED`
- * and `expireTime` set to the time when deletion is final and can no longer be reversed. The
- * delete operation is marked as done as soon as the `PrivateCloud` is successfully scheduled for
- * deletion (this also applies when `delayHours` is set to zero), and the operation is not kept in
- * pending state until `PrivateCloud` is purged. `PrivateCloud` can be restored using
- * `UndeletePrivateCloud` method before the `expireTime` elapses. When `expireTime` is reached,
- * deletion is final and all private cloud resources are irreversibly removed and billing stops.
- * During the final removal process, `PrivateCloud.state` is set to `PURGING`. `PrivateCloud` can
- * be polled using standard `GET` method for the whole period of deletion and purging. It will not
- * be returned only when it is completely purged.
+ * Retrieves a `NetworkPeering` resource by its resource name. The resource contains details of
+ * the network peering, such as peered networks, import and export custom route configurations,
+ * and peering state. NetworkPeering is a global resource and location can only be global.
*
* Sample code:
*
@@ -1909,29 +8186,26 @@ public final OperationFuture Sample code:
*
@@ -1942,31 +8216,31 @@ public final UnaryCallable Sample code:
*
@@ -1977,29 +8251,29 @@ public final OperationFuture Sample code:
*
@@ -2010,28 +8284,32 @@ public final OperationFuture Sample code:
*
@@ -2042,28 +8320,32 @@ public final OperationFuture Sample code:
*
@@ -2074,26 +8356,39 @@ public final OperationFuture Sample code:
*
@@ -2104,30 +8399,51 @@ public final OperationFuture Sample code:
*
@@ -2138,27 +8454,51 @@ public final ListClustersPagedResponse listClusters(PrivateCloudName parent) {
* // - It may require 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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
- * String parent = PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString();
- * for (Cluster element : vmwareEngineClient.listClusters(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * NetworkPeering networkPeering = NetworkPeering.newBuilder().build();
+ * String networkPeeringId = "networkPeeringId1321772525";
+ * NetworkPeering response =
+ * vmwareEngineClient
+ * .createNetworkPeeringAsync(parent, networkPeering, networkPeeringId)
+ * .get();
* }
* }
*
- * @param parent Required. The resource name of the private cloud to query for clusters. Resource
+ * @param parent Required. The resource name of the location to create the new network peering in.
+ * This value is always `global`, because `NetworkPeering` is a global resource. Resource
* names are schemeless URIs that follow the conventions in
* https://cloud.google.com/apis/design/resource_names. For example:
- * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
+ * `projects/my-project/locations/global`
+ * @param networkPeering Required. The initial description of the new network peering.
+ * @param networkPeeringId Required. The user-provided identifier of the new `NetworkPeering`.
+ * This identifier must be unique among `NetworkPeering` resources within the parent and
+ * becomes the final token in the name URI. The identifier must meet the following
+ * requirements:
+ * Sample code:
*
@@ -2169,31 +8509,29 @@ public final ListClustersPagedResponse listClusters(String parent) {
* // - It may require 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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
- * ListClustersRequest request =
- * ListClustersRequest.newBuilder()
- * .setParent(
- * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setFilter("filter-1274492040")
- * .setOrderBy("orderBy-1207110587")
+ * CreateNetworkPeeringRequest request =
+ * CreateNetworkPeeringRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setNetworkPeeringId("networkPeeringId1321772525")
+ * .setNetworkPeering(NetworkPeering.newBuilder().build())
+ * .setRequestId("requestId693933066")
* .build();
- * for (Cluster element : vmwareEngineClient.listClusters(request).iterateAll()) {
- * // doThingsWith(element);
- * }
+ * NetworkPeering response = vmwareEngineClient.createNetworkPeeringAsync(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 ListClustersPagedResponse listClusters(ListClustersRequest request) {
- return listClustersPagedCallable().call(request);
+ public final OperationFuture Sample code:
*
@@ -2204,32 +8542,29 @@ public final ListClustersPagedResponse listClusters(ListClustersRequest request)
* // - It may require 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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
- * ListClustersRequest request =
- * ListClustersRequest.newBuilder()
- * .setParent(
- * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setFilter("filter-1274492040")
- * .setOrderBy("orderBy-1207110587")
+ * CreateNetworkPeeringRequest request =
+ * CreateNetworkPeeringRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setNetworkPeeringId("networkPeeringId1321772525")
+ * .setNetworkPeering(NetworkPeering.newBuilder().build())
+ * .setRequestId("requestId693933066")
* .build();
- * ApiFuture Sample code:
*
@@ -2240,37 +8575,30 @@ public final ListClustersPagedResponse listClusters(ListClustersRequest request)
* // - It may require 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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
- * ListClustersRequest request =
- * ListClustersRequest.newBuilder()
- * .setParent(
- * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setFilter("filter-1274492040")
- * .setOrderBy("orderBy-1207110587")
+ * CreateNetworkPeeringRequest request =
+ * CreateNetworkPeeringRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setNetworkPeeringId("networkPeeringId1321772525")
+ * .setNetworkPeering(NetworkPeering.newBuilder().build())
+ * .setRequestId("requestId693933066")
* .build();
- * while (true) {
- * ListClustersResponse response = vmwareEngineClient.listClustersCallable().call(request);
- * for (Cluster element : response.getClustersList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
+ * ApiFuture Sample code:
*
@@ -2281,26 +8609,32 @@ public final UnaryCallable Sample code:
*
@@ -2312,25 +8646,28 @@ public final Cluster getCluster(ClusterName name) {
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
* String name =
- * ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]").toString();
- * Cluster response = vmwareEngineClient.getCluster(name);
+ * NetworkPeeringName.of("[PROJECT]", "[LOCATION]", "[NETWORK_PEERING]").toString();
+ * vmwareEngineClient.deleteNetworkPeeringAsync(name).get();
* }
* }
*
- * @param name Required. The cluster resource name to retrieve. Resource names are schemeless URIs
- * that follow the conventions in https://cloud.google.com/apis/design/resource_names. For
- * example:
- * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`
+ * @param name Required. The resource name of the network peering to be deleted. Resource names
+ * are schemeless URIs that follow the conventions in
+ * https://cloud.google.com/apis/design/resource_names. For example:
+ * `projects/my-project/locations/global/networkPeerings/my-peering`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final Cluster getCluster(String name) {
- GetClusterRequest request = GetClusterRequest.newBuilder().setName(name).build();
- return getCluster(request);
+ public final OperationFuture Sample code:
*
@@ -2341,26 +8678,29 @@ public final Cluster getCluster(String name) {
* // - It may require 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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
- * GetClusterRequest request =
- * GetClusterRequest.newBuilder()
+ * DeleteNetworkPeeringRequest request =
+ * DeleteNetworkPeeringRequest.newBuilder()
* .setName(
- * ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]")
- * .toString())
+ * NetworkPeeringName.of("[PROJECT]", "[LOCATION]", "[NETWORK_PEERING]").toString())
+ * .setRequestId("requestId693933066")
* .build();
- * Cluster response = vmwareEngineClient.getCluster(request);
+ * vmwareEngineClient.deleteNetworkPeeringAsync(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 Cluster getCluster(GetClusterRequest request) {
- return getClusterCallable().call(request);
+ public final OperationFuture Sample code:
*
@@ -2371,27 +8711,29 @@ public final Cluster getCluster(GetClusterRequest request) {
* // - It may require 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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
- * GetClusterRequest request =
- * GetClusterRequest.newBuilder()
+ * DeleteNetworkPeeringRequest request =
+ * DeleteNetworkPeeringRequest.newBuilder()
* .setName(
- * ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]")
- * .toString())
+ * NetworkPeeringName.of("[PROJECT]", "[LOCATION]", "[NETWORK_PEERING]").toString())
+ * .setRequestId("requestId693933066")
* .build();
- * ApiFuture Sample code:
*
@@ -2402,47 +8744,29 @@ public final UnaryCallable Sample code:
*
@@ -2453,47 +8777,35 @@ public final OperationFuture Sample code:
*
@@ -2504,32 +8816,29 @@ public final OperationFuture Sample code:
*
@@ -2540,32 +8849,29 @@ public final OperationFuture Sample code:
*
@@ -2576,33 +8882,28 @@ public final OperationFuture
- *
- *
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final OperationFuture
- *
- *
+ * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
- * PrivateCloudName name = PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]");
- * PrivateCloud response = vmwareEngineClient.deletePrivateCloudAsync(name).get();
- * }
- * }
- *
- * @param name Required. The resource name of the private cloud to delete. Resource names are
- * schemeless URIs that follow the conventions in
- * https://cloud.google.com/apis/design/resource_names. For example:
- * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture
+ *
+ *
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListClustersPagedResponse listClusters(PrivateCloudName parent) {
- ListClustersRequest request =
- ListClustersRequest.newBuilder()
+ public final OperationFuture
+ *
+ *
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListClustersPagedResponse listClusters(String parent) {
- ListClustersRequest request = ListClustersRequest.newBuilder().setParent(parent).build();
- return listClusters(request);
+ public final OperationFuture
- *
- *
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final OperationFuture
- *
- *
+ * @param networkPeering Required. Network peering description.
+ * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the
+ * `NetworkPeering` resource by the update. The fields specified in the `update_mask` are
+ * relative to the resource, not the full request. A field will be overwritten if it is in the
+ * mask. If the user does not provide a mask then all fields will be overwritten.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final OperationFuture