This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) { + * PrivateCloudName name = PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]"); + * PrivateCloud response = vmwareEngineClient.getPrivateCloud(name); + * } + * }+ * + *
Note: close() needs to be called on the VmwareEngineClient object to clean up resources such + * as threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *
The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *
See the individual methods for example code. + * + *
Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *
This class can be customized by passing in a custom instance of 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-west1-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-west1-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-west1-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-west1-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(); + * } + * }
Creating a private cloud also creates a [management + * cluster](https://cloud.google.com/vmware-engine/docs/concepts-vmware-components) for that + * 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()) { + * 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-west1-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: + *
Creating a private cloud also creates a [management + * cluster](https://cloud.google.com/vmware-engine/docs/concepts-vmware-components) for that + * 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 = 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-west1-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: + *
Creating a private cloud also creates a [management + * cluster](https://cloud.google.com/vmware-engine/docs/concepts-vmware-components) for that + * 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()) { + * 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
Creating a private cloud also creates a [management + * cluster](https://cloud.google.com/vmware-engine/docs/concepts-vmware-components) for that + * 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()) { + * 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(); + * } + * }
Creating a private cloud also creates a [management + * cluster](https://cloud.google.com/vmware-engine/docs/concepts-vmware-components) for that + * 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()) { + * 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-west1-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-west1-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-west1-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-west1-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-west1-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-west1-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-west1-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-west1-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-west1-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-west1-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-west1-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-west1-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()) { + * 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-west1-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-west1-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()) { + * 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-west1-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-west1-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-west1-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-west1-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-west1-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-west1-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-west1-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-west1-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()) + * .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. + /** + * 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()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.showVcenterCredentialsCallable().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]"); + * PrivateCloud response = vmwareEngineClient.resetNsxCredentialsAsync(privateCloud).get(); + * } + * }+ * + * @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-west1-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 privateCloud = + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString(); + * PrivateCloud response = vmwareEngineClient.resetNsxCredentialsAsync(privateCloud).get(); + * } + * }+ * + * @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-west1-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()) { + * ResetNsxCredentialsRequest request = + * ResetNsxCredentialsRequest.newBuilder() + * .setPrivateCloud( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setRequestId("requestId693933066") + * .build(); + * 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 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()) { + * ResetNsxCredentialsRequest request = + * ResetNsxCredentialsRequest.newBuilder() + * .setPrivateCloud( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setRequestId("requestId693933066") + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * vmwareEngineClient.resetNsxCredentialsOperationCallable().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()) { + * ResetNsxCredentialsRequest request = + * ResetNsxCredentialsRequest.newBuilder() + * .setPrivateCloud( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setRequestId("requestId693933066") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.resetNsxCredentialsCallable().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 privateCloud = + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]"); + * PrivateCloud response = vmwareEngineClient.resetVcenterCredentialsAsync(privateCloud).get(); + * } + * }+ * + * @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-west1-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 privateCloud = + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString(); + * PrivateCloud response = vmwareEngineClient.resetVcenterCredentialsAsync(privateCloud).get(); + * } + * }+ * + * @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-west1-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()) { + * ResetVcenterCredentialsRequest request = + * ResetVcenterCredentialsRequest.newBuilder() + * .setPrivateCloud( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setRequestId("requestId693933066") + * .build(); + * 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 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()) { + * ResetVcenterCredentialsRequest request = + * ResetVcenterCredentialsRequest.newBuilder() + * .setPrivateCloud( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setRequestId("requestId693933066") + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * vmwareEngineClient.resetVcenterCredentialsOperationCallable().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()) { + * ResetVcenterCredentialsRequest request = + * ResetVcenterCredentialsRequest.newBuilder() + * .setPrivateCloud( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setRequestId("requestId693933066") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.resetVcenterCredentialsCallable().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]"); + * HcxActivationKey hcxActivationKey = HcxActivationKey.newBuilder().build(); + * String hcxActivationKeyId = "hcxActivationKeyId-645871673"; + * HcxActivationKey response = + * vmwareEngineClient + * .createHcxActivationKeyAsync(parent, hcxActivationKey, hcxActivationKeyId) + * .get(); + * } + * }+ * + * @param parent Required. The resource name of the private cloud to create the key 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/privateClouds/my-cloud` + * @param hcxActivationKey Required. The initial description of a new HCX activation key. When + * creating a new key, this field must be an empty object. + * @param hcxActivationKeyId Required. The user-provided identifier of the `HcxActivationKey` to + * be created. This identifier must be unique among `HcxActivationKey` 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(); + * HcxActivationKey hcxActivationKey = HcxActivationKey.newBuilder().build(); + * String hcxActivationKeyId = "hcxActivationKeyId-645871673"; + * HcxActivationKey response = + * vmwareEngineClient + * .createHcxActivationKeyAsync(parent, hcxActivationKey, hcxActivationKeyId) + * .get(); + * } + * }+ * + * @param parent Required. The resource name of the private cloud to create the key 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/privateClouds/my-cloud` + * @param hcxActivationKey Required. The initial description of a new HCX activation key. When + * creating a new key, this field must be an empty object. + * @param hcxActivationKeyId Required. The user-provided identifier of the `HcxActivationKey` to + * be created. This identifier must be unique among `HcxActivationKey` 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()) { + * CreateHcxActivationKeyRequest request = + * CreateHcxActivationKeyRequest.newBuilder() + * .setParent( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setHcxActivationKey(HcxActivationKey.newBuilder().build()) + * .setHcxActivationKeyId("hcxActivationKeyId-645871673") + * .setRequestId("requestId693933066") + * .build(); + * HcxActivationKey response = vmwareEngineClient.createHcxActivationKeyAsync(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()) { + * CreateHcxActivationKeyRequest request = + * CreateHcxActivationKeyRequest.newBuilder() + * .setParent( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setHcxActivationKey(HcxActivationKey.newBuilder().build()) + * .setHcxActivationKeyId("hcxActivationKeyId-645871673") + * .setRequestId("requestId693933066") + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * vmwareEngineClient.createHcxActivationKeyOperationCallable().futureCall(request); + * // Do something. + * HcxActivationKey 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()) { + * CreateHcxActivationKeyRequest request = + * CreateHcxActivationKeyRequest.newBuilder() + * .setParent( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setHcxActivationKey(HcxActivationKey.newBuilder().build()) + * .setHcxActivationKeyId("hcxActivationKeyId-645871673") + * .setRequestId("requestId693933066") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.createHcxActivationKeyCallable().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 (HcxActivationKey element : + * vmwareEngineClient.listHcxActivationKeys(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The resource name of the private cloud to be queried for HCX activation + * keys. 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/privateClouds/my-cloud` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListHcxActivationKeysPagedResponse listHcxActivationKeys(PrivateCloudName parent) { + ListHcxActivationKeysRequest request = + ListHcxActivationKeysRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listHcxActivationKeys(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `HcxActivationKey` 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 (HcxActivationKey element : + * vmwareEngineClient.listHcxActivationKeys(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The resource name of the private cloud to be queried for HCX activation + * keys. 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/privateClouds/my-cloud` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListHcxActivationKeysPagedResponse listHcxActivationKeys(String parent) { + ListHcxActivationKeysRequest request = + ListHcxActivationKeysRequest.newBuilder().setParent(parent).build(); + return listHcxActivationKeys(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `HcxActivationKey` 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()) { + * ListHcxActivationKeysRequest request = + * ListHcxActivationKeysRequest.newBuilder() + * .setParent( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (HcxActivationKey element : + * vmwareEngineClient.listHcxActivationKeys(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 ListHcxActivationKeysPagedResponse listHcxActivationKeys( + ListHcxActivationKeysRequest request) { + return listHcxActivationKeysPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `HcxActivationKey` 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()) { + * ListHcxActivationKeysRequest request = + * ListHcxActivationKeysRequest.newBuilder() + * .setParent( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.listHcxActivationKeysPagedCallable().futureCall(request); + * // Do something. + * for (HcxActivationKey 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()) { + * ListHcxActivationKeysRequest request = + * ListHcxActivationKeysRequest.newBuilder() + * .setParent( + * PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * while (true) { + * ListHcxActivationKeysResponse response = + * vmwareEngineClient.listHcxActivationKeysCallable().call(request); + * for (HcxActivationKey element : response.getHcxActivationKeysList()) { + * // 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()) { + * HcxActivationKeyName name = + * HcxActivationKeyName.of( + * "[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[HCX_ACTIVATION_KEY]"); + * HcxActivationKey response = vmwareEngineClient.getHcxActivationKey(name); + * } + * }+ * + * @param name Required. The resource name of the HCX activation key 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-west1/privateClouds/my-cloud/hcxActivationKeys/my-key` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final HcxActivationKey getHcxActivationKey(HcxActivationKeyName name) { + GetHcxActivationKeyRequest request = + GetHcxActivationKeyRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getHcxActivationKey(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a `HcxActivationKey` 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 = + * HcxActivationKeyName.of( + * "[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[HCX_ACTIVATION_KEY]") + * .toString(); + * HcxActivationKey response = vmwareEngineClient.getHcxActivationKey(name); + * } + * }+ * + * @param name Required. The resource name of the HCX activation key 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-west1/privateClouds/my-cloud/hcxActivationKeys/my-key` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final HcxActivationKey getHcxActivationKey(String name) { + GetHcxActivationKeyRequest request = + GetHcxActivationKeyRequest.newBuilder().setName(name).build(); + return getHcxActivationKey(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a `HcxActivationKey` 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()) { + * GetHcxActivationKeyRequest request = + * GetHcxActivationKeyRequest.newBuilder() + * .setName( + * HcxActivationKeyName.of( + * "[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[HCX_ACTIVATION_KEY]") + * .toString()) + * .build(); + * HcxActivationKey response = vmwareEngineClient.getHcxActivationKey(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 HcxActivationKey getHcxActivationKey(GetHcxActivationKeyRequest request) { + return getHcxActivationKeyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a `HcxActivationKey` 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()) { + * GetHcxActivationKeyRequest request = + * GetHcxActivationKeyRequest.newBuilder() + * .setName( + * HcxActivationKeyName.of( + * "[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[HCX_ACTIVATION_KEY]") + * .toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.getHcxActivationKeyCallable().futureCall(request); + * // Do something. + * HcxActivationKey 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 name = NetworkPolicyName.of("[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]"); + * NetworkPolicy response = vmwareEngineClient.getNetworkPolicy(name); + * } + * }+ * + * @param name Required. The resource name of the network policy 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-network-policy` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NetworkPolicy getNetworkPolicy(NetworkPolicyName name) { + GetNetworkPolicyRequest request = + GetNetworkPolicyRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getNetworkPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a `NetworkPolicy` 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 = NetworkPolicyName.of("[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]").toString(); + * NetworkPolicy response = vmwareEngineClient.getNetworkPolicy(name); + * } + * }+ * + * @param name Required. The resource name of the network policy 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-network-policy` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NetworkPolicy getNetworkPolicy(String name) { + GetNetworkPolicyRequest request = GetNetworkPolicyRequest.newBuilder().setName(name).build(); + return getNetworkPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a `NetworkPolicy` 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()) { + * GetNetworkPolicyRequest request = + * GetNetworkPolicyRequest.newBuilder() + * .setName( + * NetworkPolicyName.of("[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]").toString()) + * .build(); + * NetworkPolicy response = vmwareEngineClient.getNetworkPolicy(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 NetworkPolicy getNetworkPolicy(GetNetworkPolicyRequest request) { + return getNetworkPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a `NetworkPolicy` 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()) { + * GetNetworkPolicyRequest request = + * GetNetworkPolicyRequest.newBuilder() + * .setName( + * NetworkPolicyName.of("[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.getNetworkPolicyCallable().futureCall(request); + * // Do something. + * NetworkPolicy 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]"); + * for (NetworkPolicy element : vmwareEngineClient.listNetworkPolicies(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The resource name of the location (region) to query for network + * policies. 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` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNetworkPoliciesPagedResponse listNetworkPolicies(LocationName parent) { + ListNetworkPoliciesRequest request = + ListNetworkPoliciesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listNetworkPolicies(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `NetworkPolicy` resources in a specified 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 (NetworkPolicy element : vmwareEngineClient.listNetworkPolicies(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The resource name of the location (region) to query for network + * policies. 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` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNetworkPoliciesPagedResponse listNetworkPolicies(String parent) { + ListNetworkPoliciesRequest request = + ListNetworkPoliciesRequest.newBuilder().setParent(parent).build(); + return listNetworkPolicies(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `NetworkPolicy` resources in a specified 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()) { + * ListNetworkPoliciesRequest request = + * ListNetworkPoliciesRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * for (NetworkPolicy element : vmwareEngineClient.listNetworkPolicies(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 ListNetworkPoliciesPagedResponse listNetworkPolicies( + ListNetworkPoliciesRequest request) { + return listNetworkPoliciesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `NetworkPolicy` resources in a specified 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()) { + * ListNetworkPoliciesRequest request = + * ListNetworkPoliciesRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.listNetworkPoliciesPagedCallable().futureCall(request); + * // Do something. + * for (NetworkPolicy 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()) { + * ListNetworkPoliciesRequest request = + * ListNetworkPoliciesRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * while (true) { + * ListNetworkPoliciesResponse response = + * vmwareEngineClient.listNetworkPoliciesCallable().call(request); + * for (NetworkPolicy element : response.getNetworkPoliciesList()) { + * // 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()) { + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * NetworkPolicy networkPolicy = NetworkPolicy.newBuilder().build(); + * String networkPolicyId = "networkPolicyId-727262661"; + * NetworkPolicy response = + * vmwareEngineClient.createNetworkPolicyAsync(parent, networkPolicy, networkPolicyId).get(); + * } + * }+ * + * @param parent Required. The resource name of the location (region) to create the new network + * policy 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` + * @param networkPolicy Required. The network policy configuration to use in the request. + * @param networkPolicyId Required. The user-provided identifier of the network policy to be + * created. This identifier must be unique within parent + * `projects/{my-project}/locations/{us-central1}/networkPolicies` 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(); + * NetworkPolicy networkPolicy = NetworkPolicy.newBuilder().build(); + * String networkPolicyId = "networkPolicyId-727262661"; + * NetworkPolicy response = + * vmwareEngineClient.createNetworkPolicyAsync(parent, networkPolicy, networkPolicyId).get(); + * } + * }+ * + * @param parent Required. The resource name of the location (region) to create the new network + * policy 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` + * @param networkPolicy Required. The network policy configuration to use in the request. + * @param networkPolicyId Required. The user-provided identifier of the network policy to be + * created. This identifier must be unique within parent + * `projects/{my-project}/locations/{us-central1}/networkPolicies` 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()) { + * CreateNetworkPolicyRequest request = + * CreateNetworkPolicyRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setNetworkPolicyId("networkPolicyId-727262661") + * .setNetworkPolicy(NetworkPolicy.newBuilder().build()) + * .setRequestId("requestId693933066") + * .build(); + * NetworkPolicy response = vmwareEngineClient.createNetworkPolicyAsync(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()) { + * CreateNetworkPolicyRequest request = + * CreateNetworkPolicyRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setNetworkPolicyId("networkPolicyId-727262661") + * .setNetworkPolicy(NetworkPolicy.newBuilder().build()) + * .setRequestId("requestId693933066") + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * vmwareEngineClient.createNetworkPolicyOperationCallable().futureCall(request); + * // Do something. + * NetworkPolicy 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()) { + * CreateNetworkPolicyRequest request = + * CreateNetworkPolicyRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setNetworkPolicyId("networkPolicyId-727262661") + * .setNetworkPolicy(NetworkPolicy.newBuilder().build()) + * .setRequestId("requestId693933066") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.createNetworkPolicyCallable().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()) { + * NetworkPolicy networkPolicy = NetworkPolicy.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * NetworkPolicy response = + * vmwareEngineClient.updateNetworkPolicyAsync(networkPolicy, updateMask).get(); + * } + * }+ * + * @param networkPolicy Required. Network policy description. + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `NetworkPolicy` 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()) { + * UpdateNetworkPolicyRequest request = + * UpdateNetworkPolicyRequest.newBuilder() + * .setNetworkPolicy(NetworkPolicy.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setRequestId("requestId693933066") + * .build(); + * NetworkPolicy response = vmwareEngineClient.updateNetworkPolicyAsync(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()) { + * UpdateNetworkPolicyRequest request = + * UpdateNetworkPolicyRequest.newBuilder() + * .setNetworkPolicy(NetworkPolicy.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setRequestId("requestId693933066") + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * vmwareEngineClient.updateNetworkPolicyOperationCallable().futureCall(request); + * // Do something. + * NetworkPolicy 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()) { + * UpdateNetworkPolicyRequest request = + * UpdateNetworkPolicyRequest.newBuilder() + * .setNetworkPolicy(NetworkPolicy.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setRequestId("requestId693933066") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.updateNetworkPolicyCallable().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 name = NetworkPolicyName.of("[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]"); + * vmwareEngineClient.deleteNetworkPolicyAsync(name).get(); + * } + * }+ * + * @param name Required. The resource name of the network policy 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-network-policy` + * @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 = NetworkPolicyName.of("[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]").toString(); + * vmwareEngineClient.deleteNetworkPolicyAsync(name).get(); + * } + * }+ * + * @param name Required. The resource name of the network policy 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-network-policy` + * @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()) { + * DeleteNetworkPolicyRequest request = + * DeleteNetworkPolicyRequest.newBuilder() + * .setName( + * NetworkPolicyName.of("[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]").toString()) + * .setRequestId("requestId693933066") + * .build(); + * vmwareEngineClient.deleteNetworkPolicyAsync(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()) { + * DeleteNetworkPolicyRequest request = + * DeleteNetworkPolicyRequest.newBuilder() + * .setName( + * NetworkPolicyName.of("[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]").toString()) + * .setRequestId("requestId693933066") + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * vmwareEngineClient.deleteNetworkPolicyOperationCallable().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()) { + * DeleteNetworkPolicyRequest request = + * DeleteNetworkPolicyRequest.newBuilder() + * .setName( + * NetworkPolicyName.of("[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]").toString()) + * .setRequestId("requestId693933066") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.deleteNetworkPolicyCallable().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]"); + * VmwareEngineNetwork vmwareEngineNetwork = VmwareEngineNetwork.newBuilder().build(); + * String vmwareEngineNetworkId = "vmwareEngineNetworkId532532083"; + * VmwareEngineNetwork response = + * vmwareEngineClient + * .createVmwareEngineNetworkAsync(parent, vmwareEngineNetwork, vmwareEngineNetworkId) + * .get(); + * } + * }+ * + * @param parent Required. The resource name of the location to create the new VMware Engine + * network in. A VMware Engine network of type `LEGACY` is a regional resource, and a VMware + * Engine network of type `STANDARD` 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/global` + * @param vmwareEngineNetwork Required. The initial description of the new VMware Engine network. + * @param vmwareEngineNetworkId Required. The user-provided identifier of the new VMware Engine + * network. This identifier must be unique among VMware Engine network 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 = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + * VmwareEngineNetwork vmwareEngineNetwork = VmwareEngineNetwork.newBuilder().build(); + * String vmwareEngineNetworkId = "vmwareEngineNetworkId532532083"; + * VmwareEngineNetwork response = + * vmwareEngineClient + * .createVmwareEngineNetworkAsync(parent, vmwareEngineNetwork, vmwareEngineNetworkId) + * .get(); + * } + * }+ * + * @param parent Required. The resource name of the location to create the new VMware Engine + * network in. A VMware Engine network of type `LEGACY` is a regional resource, and a VMware + * Engine network of type `STANDARD` 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/global` + * @param vmwareEngineNetwork Required. The initial description of the new VMware Engine network. + * @param vmwareEngineNetworkId Required. The user-provided identifier of the new VMware Engine + * network. This identifier must be unique among VMware Engine network 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()) { + * CreateVmwareEngineNetworkRequest request = + * CreateVmwareEngineNetworkRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setVmwareEngineNetworkId("vmwareEngineNetworkId532532083") + * .setVmwareEngineNetwork(VmwareEngineNetwork.newBuilder().build()) + * .setRequestId("requestId693933066") + * .build(); + * VmwareEngineNetwork response = + * vmwareEngineClient.createVmwareEngineNetworkAsync(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()) { + * CreateVmwareEngineNetworkRequest request = + * CreateVmwareEngineNetworkRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setVmwareEngineNetworkId("vmwareEngineNetworkId532532083") + * .setVmwareEngineNetwork(VmwareEngineNetwork.newBuilder().build()) + * .setRequestId("requestId693933066") + * .build(); + * OperationFuture+ */ + public final OperationCallable< + CreateVmwareEngineNetworkRequest, VmwareEngineNetwork, OperationMetadata> + createVmwareEngineNetworkOperationCallable() { + return stub.createVmwareEngineNetworkOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new VMware Engine network that can be used by a private cloud. + * + *future = + * vmwareEngineClient.createVmwareEngineNetworkOperationCallable().futureCall(request); + * // Do something. + * VmwareEngineNetwork 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()) { + * CreateVmwareEngineNetworkRequest request = + * CreateVmwareEngineNetworkRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setVmwareEngineNetworkId("vmwareEngineNetworkId532532083") + * .setVmwareEngineNetwork(VmwareEngineNetwork.newBuilder().build()) + * .setRequestId("requestId693933066") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.createVmwareEngineNetworkCallable().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()) { + * VmwareEngineNetwork vmwareEngineNetwork = VmwareEngineNetwork.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * VmwareEngineNetwork response = + * vmwareEngineClient.updateVmwareEngineNetworkAsync(vmwareEngineNetwork, updateMask).get(); + * } + * }+ * + * @param vmwareEngineNetwork Required. VMware Engine network description. + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * VMware Engine network 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. Only the + * following fields can be updated: `description`. + * @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()) { + * UpdateVmwareEngineNetworkRequest request = + * UpdateVmwareEngineNetworkRequest.newBuilder() + * .setVmwareEngineNetwork(VmwareEngineNetwork.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setRequestId("requestId693933066") + * .build(); + * VmwareEngineNetwork response = + * vmwareEngineClient.updateVmwareEngineNetworkAsync(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()) { + * UpdateVmwareEngineNetworkRequest request = + * UpdateVmwareEngineNetworkRequest.newBuilder() + * .setVmwareEngineNetwork(VmwareEngineNetwork.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setRequestId("requestId693933066") + * .build(); + * OperationFuture+ */ + public final OperationCallable< + UpdateVmwareEngineNetworkRequest, VmwareEngineNetwork, OperationMetadata> + updateVmwareEngineNetworkOperationCallable() { + return stub.updateVmwareEngineNetworkOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Modifies a VMware Engine network resource. Only the following fields can be updated: + * `description`. Only fields specified in `updateMask` are applied. + * + *future = + * vmwareEngineClient.updateVmwareEngineNetworkOperationCallable().futureCall(request); + * // Do something. + * VmwareEngineNetwork 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()) { + * UpdateVmwareEngineNetworkRequest request = + * UpdateVmwareEngineNetworkRequest.newBuilder() + * .setVmwareEngineNetwork(VmwareEngineNetwork.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setRequestId("requestId693933066") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.updateVmwareEngineNetworkCallable().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()) { + * VmwareEngineNetworkName name = + * VmwareEngineNetworkName.of("[PROJECT]", "[LOCATION]", "[VMWARE_ENGINE_NETWORK]"); + * vmwareEngineClient.deleteVmwareEngineNetworkAsync(name).get(); + * } + * }+ * + * @param name Required. The resource name of the VMware Engine network 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/vmwareEngineNetworks/my-network` + * @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 = + * VmwareEngineNetworkName.of("[PROJECT]", "[LOCATION]", "[VMWARE_ENGINE_NETWORK]") + * .toString(); + * vmwareEngineClient.deleteVmwareEngineNetworkAsync(name).get(); + * } + * }+ * + * @param name Required. The resource name of the VMware Engine network 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/vmwareEngineNetworks/my-network` + * @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()) { + * DeleteVmwareEngineNetworkRequest request = + * DeleteVmwareEngineNetworkRequest.newBuilder() + * .setName( + * VmwareEngineNetworkName.of("[PROJECT]", "[LOCATION]", "[VMWARE_ENGINE_NETWORK]") + * .toString()) + * .setRequestId("requestId693933066") + * .setEtag("etag3123477") + * .build(); + * vmwareEngineClient.deleteVmwareEngineNetworkAsync(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()) { + * DeleteVmwareEngineNetworkRequest request = + * DeleteVmwareEngineNetworkRequest.newBuilder() + * .setName( + * VmwareEngineNetworkName.of("[PROJECT]", "[LOCATION]", "[VMWARE_ENGINE_NETWORK]") + * .toString()) + * .setRequestId("requestId693933066") + * .setEtag("etag3123477") + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * vmwareEngineClient.deleteVmwareEngineNetworkOperationCallable().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()) { + * DeleteVmwareEngineNetworkRequest request = + * DeleteVmwareEngineNetworkRequest.newBuilder() + * .setName( + * VmwareEngineNetworkName.of("[PROJECT]", "[LOCATION]", "[VMWARE_ENGINE_NETWORK]") + * .toString()) + * .setRequestId("requestId693933066") + * .setEtag("etag3123477") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.deleteVmwareEngineNetworkCallable().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()) { + * VmwareEngineNetworkName name = + * VmwareEngineNetworkName.of("[PROJECT]", "[LOCATION]", "[VMWARE_ENGINE_NETWORK]"); + * VmwareEngineNetwork response = vmwareEngineClient.getVmwareEngineNetwork(name); + * } + * }+ * + * @param name Required. The resource name of the VMware Engine network 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/global/vmwareEngineNetworks/my-network` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final VmwareEngineNetwork getVmwareEngineNetwork(VmwareEngineNetworkName name) { + GetVmwareEngineNetworkRequest request = + GetVmwareEngineNetworkRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getVmwareEngineNetwork(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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`). + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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 = + * VmwareEngineNetworkName.of("[PROJECT]", "[LOCATION]", "[VMWARE_ENGINE_NETWORK]") + * .toString(); + * VmwareEngineNetwork response = vmwareEngineClient.getVmwareEngineNetwork(name); + * } + * }+ * + * @param name Required. The resource name of the VMware Engine network 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/global/vmwareEngineNetworks/my-network` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final VmwareEngineNetwork getVmwareEngineNetwork(String name) { + GetVmwareEngineNetworkRequest request = + GetVmwareEngineNetworkRequest.newBuilder().setName(name).build(); + return getVmwareEngineNetwork(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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`). + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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()) { + * GetVmwareEngineNetworkRequest request = + * GetVmwareEngineNetworkRequest.newBuilder() + * .setName( + * VmwareEngineNetworkName.of("[PROJECT]", "[LOCATION]", "[VMWARE_ENGINE_NETWORK]") + * .toString()) + * .build(); + * VmwareEngineNetwork response = vmwareEngineClient.getVmwareEngineNetwork(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 VmwareEngineNetwork getVmwareEngineNetwork(GetVmwareEngineNetworkRequest request) { + return getVmwareEngineNetworkCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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`). + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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()) { + * GetVmwareEngineNetworkRequest request = + * GetVmwareEngineNetworkRequest.newBuilder() + * .setName( + * VmwareEngineNetworkName.of("[PROJECT]", "[LOCATION]", "[VMWARE_ENGINE_NETWORK]") + * .toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.getVmwareEngineNetworkCallable().futureCall(request); + * // Do something. + * VmwareEngineNetwork 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]"); + * for (VmwareEngineNetwork element : + * vmwareEngineClient.listVmwareEngineNetworks(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The resource name of the location to query for VMware Engine networks. + * 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` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListVmwareEngineNetworksPagedResponse listVmwareEngineNetworks(LocationName parent) { + ListVmwareEngineNetworksRequest request = + ListVmwareEngineNetworksRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listVmwareEngineNetworks(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `VmwareEngineNetwork` 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 (VmwareEngineNetwork element : + * vmwareEngineClient.listVmwareEngineNetworks(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The resource name of the location to query for VMware Engine networks. + * 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` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListVmwareEngineNetworksPagedResponse listVmwareEngineNetworks(String parent) { + ListVmwareEngineNetworksRequest request = + ListVmwareEngineNetworksRequest.newBuilder().setParent(parent).build(); + return listVmwareEngineNetworks(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `VmwareEngineNetwork` 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()) { + * ListVmwareEngineNetworksRequest request = + * ListVmwareEngineNetworksRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * for (VmwareEngineNetwork element : + * vmwareEngineClient.listVmwareEngineNetworks(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 ListVmwareEngineNetworksPagedResponse listVmwareEngineNetworks( + ListVmwareEngineNetworksRequest request) { + return listVmwareEngineNetworksPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `VmwareEngineNetwork` 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()) { + * ListVmwareEngineNetworksRequest request = + * ListVmwareEngineNetworksRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.listVmwareEngineNetworksPagedCallable().futureCall(request); + * // Do something. + * for (VmwareEngineNetwork 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()) { + * ListVmwareEngineNetworksRequest request = + * ListVmwareEngineNetworksRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * while (true) { + * ListVmwareEngineNetworksResponse response = + * vmwareEngineClient.listVmwareEngineNetworksCallable().call(request); + * for (VmwareEngineNetwork element : response.getVmwareEngineNetworksList()) { + * // 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()) { + * ListLocationsRequest request = + * ListLocationsRequest.newBuilder() + * .setName("name3373707") + * .setFilter("filter-1274492040") + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (Location element : vmwareEngineClient.listLocations(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 ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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()) { + * ListLocationsRequest request = + * ListLocationsRequest.newBuilder() + * .setName("name3373707") + * .setFilter("filter-1274492040") + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * vmwareEngineClient.listLocationsPagedCallable().futureCall(request); + * // Do something. + * for (Location 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()) { + * ListLocationsRequest request = + * ListLocationsRequest.newBuilder() + * .setName("name3373707") + * .setFilter("filter-1274492040") + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * while (true) { + * ListLocationsResponse response = vmwareEngineClient.listLocationsCallable().call(request); + * for (Location element : response.getLocationsList()) { + * // 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()) { + * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + * Location response = vmwareEngineClient.getLocation(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 Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a 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()) { + * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + * ApiFuture+ */ + public final UnaryCallablefuture = vmwareEngineClient.getLocationCallable().futureCall(request); + * // Do something. + * Location response = future.get(); + * } + * }
Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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()) { + * SetIamPolicyRequest request = + * SetIamPolicyRequest.newBuilder() + * .setResource( + * ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]") + * .toString()) + * .setPolicy(Policy.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * Policy response = vmwareEngineClient.setIamPolicy(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 Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *
Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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()) { + * SetIamPolicyRequest request = + * SetIamPolicyRequest.newBuilder() + * .setResource( + * ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]") + * .toString()) + * .setPolicy(Policy.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = vmwareEngineClient.setIamPolicyCallable().futureCall(request); + * // Do something. + * Policy 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()) { + * GetIamPolicyRequest request = + * GetIamPolicyRequest.newBuilder() + * .setResource( + * ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]") + * .toString()) + * .setOptions(GetPolicyOptions.newBuilder().build()) + * .build(); + * Policy response = vmwareEngineClient.getIamPolicy(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 Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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()) { + * GetIamPolicyRequest request = + * GetIamPolicyRequest.newBuilder() + * .setResource( + * ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]") + * .toString()) + * .setOptions(GetPolicyOptions.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = vmwareEngineClient.getIamPolicyCallable().futureCall(request); + * // Do something. + * Policy response = future.get(); + * } + * }
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. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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()) { + * TestIamPermissionsRequest request = + * TestIamPermissionsRequest.newBuilder() + * .setResource( + * ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]") + * .toString()) + * .addAllPermissions(new ArrayList+ * + * @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 TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + *()) + * .build(); + * TestIamPermissionsResponse response = vmwareEngineClient.testIamPermissions(request); + * } + * }
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. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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()) { + * TestIamPermissionsRequest request = + * TestIamPermissionsRequest.newBuilder() + * .setResource( + * ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]") + * .toString()) + * .addAllPermissions(new ArrayList+ */ + public final UnaryCallable()) + * .build(); + * ApiFuture future = + * vmwareEngineClient.testIamPermissionsCallable().futureCall(request); + * // Do something. + * TestIamPermissionsResponse response = future.get(); + * } + * }
The default instance has everything set to sensible defaults: + * + *
The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *
For example, to set the total timeout of getPrivateCloud to 30 seconds: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * VmwareEngineSettings.Builder vmwareEngineSettingsBuilder = VmwareEngineSettings.newBuilder(); + * vmwareEngineSettingsBuilder + * .getPrivateCloudSettings() + * .setRetrySettings( + * vmwareEngineSettingsBuilder.getPrivateCloudSettings().getRetrySettings().toBuilder() + * .setTotalTimeout(Duration.ofSeconds(30)) + * .build()); + * VmwareEngineSettings vmwareEngineSettings = vmwareEngineSettingsBuilder.build(); + * }+ */ +@Generated("by gapic-generator-java") +public class VmwareEngineSettings extends ClientSettings
Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction