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 for illustrative purposes only. + * // It may require modifications to work in your environment. + * BareMetalSolutionSettings bareMetalSolutionSettings = + * BareMetalSolutionSettings.newBuilder() + * .setTransportChannelProvider( + * BareMetalSolutionSettings.defaultHttpJsonTransportProviderBuilder().build()) + * .build(); + * BareMetalSolutionClient bareMetalSolutionClient = + * BareMetalSolutionClient.create(bareMetalSolutionSettings); + * }+ * *
Please refer to the GitHub repository's samples for more quickstart code snippets.
*/
@Generated("by gapic-generator-java")
public class BareMetalSolutionClient implements BackgroundResource {
private final BareMetalSolutionSettings settings;
private final BareMetalSolutionStub stub;
- private final OperationsClient operationsClient;
+ private final OperationsClient httpJsonOperationsClient;
+ private final com.google.longrunning.OperationsClient operationsClient;
/** Constructs an instance of BareMetalSolutionClient with default settings. */
public static final BareMetalSolutionClient create() throws IOException {
@@ -149,13 +165,17 @@ public static final BareMetalSolutionClient create(BareMetalSolutionStub stub) {
protected BareMetalSolutionClient(BareMetalSolutionSettings settings) throws IOException {
this.settings = settings;
this.stub = ((BareMetalSolutionStubSettings) settings.getStubSettings()).createStub();
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
}
protected BareMetalSolutionClient(BareMetalSolutionStub stub) {
this.settings = null;
this.stub = stub;
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
}
public final BareMetalSolutionSettings getSettings() {
@@ -170,10 +190,19 @@ public BareMetalSolutionStub getStub() {
* Returns the OperationsClient that can be used to query the status of a long-running operation
* returned by another API method call.
*/
- public final OperationsClient getOperationsClient() {
+ 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.
/**
* List servers in a given project and location.
@@ -242,6 +271,7 @@ public final ListInstancesPagedResponse listInstances(String parent) {
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
* .build();
* for (Instance element : bareMetalSolutionClient.listInstances(request).iterateAll()) {
* // doThingsWith(element);
@@ -271,6 +301,7 @@ public final ListInstancesPagedResponse listInstances(ListInstancesRequest reque
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
* .build();
* ApiFuture Sample code:
+ *
+ * The `name` field is used to identify the instance to update. Format:
+ * projects/{project}/locations/{location}/instances/{instance}
+ * @param updateMask The list of fields to update. The currently supported fields are: `labels`
+ * `hyperthreading_enabled` `os_image`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
*
@@ -560,27 +702,24 @@ public final UnaryCallable Sample code:
*
@@ -588,24 +727,23 @@ public final ListVolumesPagedResponse listVolumes(LocationName parent) {
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
- * for (Volume element : bareMetalSolutionClient.listVolumes(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
+ * String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
+ * StartInstanceResponse response = bareMetalSolutionClient.startInstanceAsync(name).get();
* }
* }
*
- * @param parent Required. Parent value for ListVolumesRequest.
+ * @param name Required. Name of the resource.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListVolumesPagedResponse listVolumes(String parent) {
- ListVolumesRequest request = ListVolumesRequest.newBuilder().setParent(parent).build();
- return listVolumes(request);
+ public final OperationFuture Sample code:
*
@@ -613,28 +751,25 @@ public final ListVolumesPagedResponse listVolumes(String parent) {
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * ListVolumesRequest request =
- * ListVolumesRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
+ * StartInstanceRequest request =
+ * StartInstanceRequest.newBuilder()
+ * .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
* .build();
- * for (Volume element : bareMetalSolutionClient.listVolumes(request).iterateAll()) {
- * // doThingsWith(element);
- * }
+ * StartInstanceResponse response = bareMetalSolutionClient.startInstanceAsync(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 ListVolumesPagedResponse listVolumes(ListVolumesRequest request) {
- return listVolumesPagedCallable().call(request);
+ public final OperationFuture Sample code:
*
@@ -642,29 +777,25 @@ public final ListVolumesPagedResponse listVolumes(ListVolumesRequest request) {
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * ListVolumesRequest request =
- * ListVolumesRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
+ * StartInstanceRequest request =
+ * StartInstanceRequest.newBuilder()
+ * .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
* .build();
- * ApiFuture Sample code:
*
@@ -672,34 +803,24 @@ public final ListVolumesPagedResponse listVolumes(ListVolumesRequest request) {
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * ListVolumesRequest request =
- * ListVolumesRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
+ * StartInstanceRequest request =
+ * StartInstanceRequest.newBuilder()
+ * .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
* .build();
- * while (true) {
- * ListVolumesResponse response = bareMetalSolutionClient.listVolumesCallable().call(request);
- * for (Volume element : response.getVolumesList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
+ * ApiFuture Sample code:
*
@@ -707,23 +828,24 @@ public final UnaryCallable Sample code:
*
@@ -731,22 +853,23 @@ public final Volume getVolume(VolumeName name) {
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * String name = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString();
- * Volume response = bareMetalSolutionClient.getVolume(name);
+ * String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
+ * StopInstanceResponse response = bareMetalSolutionClient.stopInstanceAsync(name).get();
* }
* }
*
* @param name Required. Name of the resource.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final Volume getVolume(String name) {
- GetVolumeRequest request = GetVolumeRequest.newBuilder().setName(name).build();
- return getVolume(request);
+ public final OperationFuture Sample code:
*
@@ -754,24 +877,25 @@ public final Volume getVolume(String name) {
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * GetVolumeRequest request =
- * GetVolumeRequest.newBuilder()
- * .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
+ * StopInstanceRequest request =
+ * StopInstanceRequest.newBuilder()
+ * .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
* .build();
- * Volume response = bareMetalSolutionClient.getVolume(request);
+ * StopInstanceResponse response = bareMetalSolutionClient.stopInstanceAsync(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 Volume getVolume(GetVolumeRequest request) {
- return getVolumeCallable().call(request);
+ public final OperationFuture Sample code:
*
@@ -779,23 +903,25 @@ public final Volume getVolume(GetVolumeRequest request) {
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * GetVolumeRequest request =
- * GetVolumeRequest.newBuilder()
- * .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
+ * StopInstanceRequest request =
+ * StopInstanceRequest.newBuilder()
+ * .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
* .build();
- * ApiFuture Sample code:
*
@@ -803,29 +929,24 @@ public final UnaryCallable The `name` field is used to identify the volume to update. Format:
- * projects/{project}/locations/{location}/volumes/{volume}
- * @param updateMask The list of fields to update. The only currently supported fields are:
- * `snapshot_auto_delete_behavior` `snapshot_schedule_policy_name`
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final OperationFuture Sample code:
*
@@ -833,26 +954,29 @@ public final OperationFuture Sample code:
*
@@ -860,26 +984,29 @@ public final OperationFuture Sample code:
*
@@ -887,53 +1014,29 @@ public final OperationFuture Sample code:
- *
- * Sample code:
*
@@ -941,24 +1044,26 @@ public final ListNetworksPagedResponse listNetworks(LocationName parent) {
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
- * for (Network element : bareMetalSolutionClient.listNetworks(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
+ * String instance = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
+ * String lun = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString();
+ * Instance response = bareMetalSolutionClient.detachLunAsync(instance, lun).get();
* }
* }
*
- * @param parent Required. Parent value for ListNetworksRequest.
+ * @param instance Required. Name of the instance.
+ * @param lun Required. Name of the Lun to detach.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListNetworksPagedResponse listNetworks(String parent) {
- ListNetworksRequest request = ListNetworksRequest.newBuilder().setParent(parent).build();
- return listNetworks(request);
+ public final OperationFuture Sample code:
*
@@ -966,28 +1071,26 @@ public final ListNetworksPagedResponse listNetworks(String parent) {
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * ListNetworksRequest request =
- * ListNetworksRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
+ * DetachLunRequest request =
+ * DetachLunRequest.newBuilder()
+ * .setInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+ * .setLun(LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString())
* .build();
- * for (Network element : bareMetalSolutionClient.listNetworks(request).iterateAll()) {
- * // doThingsWith(element);
- * }
+ * Instance response = bareMetalSolutionClient.detachLunAsync(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 ListNetworksPagedResponse listNetworks(ListNetworksRequest request) {
- return listNetworksPagedCallable().call(request);
+ public final OperationFuture Sample code:
*
@@ -995,29 +1098,26 @@ public final ListNetworksPagedResponse listNetworks(ListNetworksRequest request)
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * ListNetworksRequest request =
- * ListNetworksRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
+ * DetachLunRequest request =
+ * DetachLunRequest.newBuilder()
+ * .setInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+ * .setLun(LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString())
* .build();
- * ApiFuture Sample code:
*
@@ -1025,35 +1125,24 @@ public final ListNetworksPagedResponse listNetworks(ListNetworksRequest request)
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * ListNetworksRequest request =
- * ListNetworksRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
+ * DetachLunRequest request =
+ * DetachLunRequest.newBuilder()
+ * .setInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+ * .setLun(LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString())
* .build();
- * while (true) {
- * ListNetworksResponse response =
- * bareMetalSolutionClient.listNetworksCallable().call(request);
- * for (Network element : response.getNetworksList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
+ * ApiFuture Sample code:
*
@@ -1061,23 +1150,27 @@ public final UnaryCallable Sample code:
*
@@ -1085,22 +1178,24 @@ public final Network getNetwork(NetworkName name) {
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * String name = NetworkName.of("[PROJECT]", "[LOCATION]", "[NETWORK]").toString();
- * Network response = bareMetalSolutionClient.getNetwork(name);
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Volume element : bareMetalSolutionClient.listVolumes(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
* }
* }
*
- * @param name Required. Name of the resource.
+ * @param parent Required. Parent value for ListVolumesRequest.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final Network getNetwork(String name) {
- GetNetworkRequest request = GetNetworkRequest.newBuilder().setName(name).build();
- return getNetwork(request);
+ public final ListVolumesPagedResponse listVolumes(String parent) {
+ ListVolumesRequest request = ListVolumesRequest.newBuilder().setParent(parent).build();
+ return listVolumes(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Get details of a single network.
+ * List storage volumes in a given project and location.
*
* Sample code:
*
@@ -1108,24 +1203,29 @@ public final Network getNetwork(String name) {
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * GetNetworkRequest request =
- * GetNetworkRequest.newBuilder()
- * .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[NETWORK]").toString())
+ * ListVolumesRequest request =
+ * ListVolumesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
* .build();
- * Network response = bareMetalSolutionClient.getNetwork(request);
+ * for (Volume element : bareMetalSolutionClient.listVolumes(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 Network getNetwork(GetNetworkRequest request) {
- return getNetworkCallable().call(request);
+ public final ListVolumesPagedResponse listVolumes(ListVolumesRequest request) {
+ return listVolumesPagedCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Get details of a single network.
+ * List storage volumes in a given project and location.
*
* Sample code:
*
@@ -1133,23 +1233,30 @@ public final Network getNetwork(GetNetworkRequest request) {
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * GetNetworkRequest request =
- * GetNetworkRequest.newBuilder()
- * .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[NETWORK]").toString())
+ * ListVolumesRequest request =
+ * ListVolumesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
* .build();
- * ApiFuture Sample code:
*
@@ -1157,29 +1264,35 @@ public final UnaryCallable Sample code:
*
@@ -1187,27 +1300,23 @@ public final ListSnapshotSchedulePoliciesPagedResponse listSnapshotSchedulePolic
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
- * for (SnapshotSchedulePolicy element :
- * bareMetalSolutionClient.listSnapshotSchedulePolicies(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
+ * VolumeName name = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]");
+ * Volume response = bareMetalSolutionClient.getVolume(name);
* }
* }
*
- * @param parent Required. The parent project containing the Snapshot Schedule Policies.
+ * @param name Required. Name of the resource.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListSnapshotSchedulePoliciesPagedResponse listSnapshotSchedulePolicies(
- String parent) {
- ListSnapshotSchedulePoliciesRequest request =
- ListSnapshotSchedulePoliciesRequest.newBuilder().setParent(parent).build();
- return listSnapshotSchedulePolicies(request);
+ public final Volume getVolume(VolumeName name) {
+ GetVolumeRequest request =
+ GetVolumeRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getVolume(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * List snapshot schedule policies in a given project and location.
+ * Get details of a single storage volume.
*
* Sample code:
*
@@ -1215,30 +1324,22 @@ public final ListSnapshotSchedulePoliciesPagedResponse listSnapshotSchedulePolic
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * ListSnapshotSchedulePoliciesRequest request =
- * ListSnapshotSchedulePoliciesRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * for (SnapshotSchedulePolicy element :
- * bareMetalSolutionClient.listSnapshotSchedulePolicies(request).iterateAll()) {
- * // doThingsWith(element);
- * }
+ * String name = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString();
+ * Volume response = bareMetalSolutionClient.getVolume(name);
* }
* }
*
- * @param request The request object containing all of the parameters for the API call.
+ * @param name Required. Name of the resource.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListSnapshotSchedulePoliciesPagedResponse listSnapshotSchedulePolicies(
- ListSnapshotSchedulePoliciesRequest request) {
- return listSnapshotSchedulePoliciesPagedCallable().call(request);
+ public final Volume getVolume(String name) {
+ GetVolumeRequest request = GetVolumeRequest.newBuilder().setName(name).build();
+ return getVolume(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * List snapshot schedule policies in a given project and location.
+ * Get details of a single storage volume.
*
* Sample code:
*
@@ -1246,68 +1347,24 @@ public final ListSnapshotSchedulePoliciesPagedResponse listSnapshotSchedulePolic
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * ListSnapshotSchedulePoliciesRequest request =
- * ListSnapshotSchedulePoliciesRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
+ * GetVolumeRequest request =
+ * GetVolumeRequest.newBuilder()
+ * .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
* .build();
- * ApiFuture Sample code:
*
- * Sample code:
*
@@ -1315,26 +1372,23 @@ public final ListSnapshotSchedulePoliciesPagedResponse listSnapshotSchedulePolic
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * SnapshotSchedulePolicyName name =
- * SnapshotSchedulePolicyName.of("[PROJECT]", "[LOCATION]", "[SNAPSHOT_SCHEDULE_POLICY]");
- * SnapshotSchedulePolicy response = bareMetalSolutionClient.getSnapshotSchedulePolicy(name);
+ * GetVolumeRequest request =
+ * GetVolumeRequest.newBuilder()
+ * .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
+ * .build();
+ * ApiFuture Sample code:
*
@@ -1342,25 +1396,30 @@ public final SnapshotSchedulePolicy getSnapshotSchedulePolicy(SnapshotSchedulePo
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * String name =
- * SnapshotSchedulePolicyName.of("[PROJECT]", "[LOCATION]", "[SNAPSHOT_SCHEDULE_POLICY]")
- * .toString();
- * SnapshotSchedulePolicy response = bareMetalSolutionClient.getSnapshotSchedulePolicy(name);
+ * Volume volume = Volume.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Volume response = bareMetalSolutionClient.updateVolumeAsync(volume, updateMask).get();
* }
* }
*
- * @param name Required. Name of the resource.
+ * @param volume Required. The volume to update.
+ * The `name` field is used to identify the volume to update. Format:
+ * projects/{project}/locations/{location}/volumes/{volume}
+ * @param updateMask The list of fields to update. The only currently supported fields are:
+ * `snapshot_auto_delete_behavior` `snapshot_schedule_policy_name` 'labels' 'snapshot_enabled'
+ * 'snapshot_reservation_detail.reserved_space_percent'
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final SnapshotSchedulePolicy getSnapshotSchedulePolicy(String name) {
- GetSnapshotSchedulePolicyRequest request =
- GetSnapshotSchedulePolicyRequest.newBuilder().setName(name).build();
- return getSnapshotSchedulePolicy(request);
+ public final OperationFuture Sample code:
*
@@ -1368,28 +1427,26 @@ public final SnapshotSchedulePolicy getSnapshotSchedulePolicy(String name) {
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * GetSnapshotSchedulePolicyRequest request =
- * GetSnapshotSchedulePolicyRequest.newBuilder()
- * .setName(
- * SnapshotSchedulePolicyName.of(
- * "[PROJECT]", "[LOCATION]", "[SNAPSHOT_SCHEDULE_POLICY]")
- * .toString())
+ * UpdateVolumeRequest request =
+ * UpdateVolumeRequest.newBuilder()
+ * .setVolume(Volume.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
* .build();
- * SnapshotSchedulePolicy response = bareMetalSolutionClient.getSnapshotSchedulePolicy(request);
+ * Volume response = bareMetalSolutionClient.updateVolumeAsync(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 SnapshotSchedulePolicy getSnapshotSchedulePolicy(
- GetSnapshotSchedulePolicyRequest request) {
- return getSnapshotSchedulePolicyCallable().call(request);
+ public final OperationFuture Sample code:
*
@@ -1397,28 +1454,26 @@ public final SnapshotSchedulePolicy getSnapshotSchedulePolicy(
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * GetSnapshotSchedulePolicyRequest request =
- * GetSnapshotSchedulePolicyRequest.newBuilder()
- * .setName(
- * SnapshotSchedulePolicyName.of(
- * "[PROJECT]", "[LOCATION]", "[SNAPSHOT_SCHEDULE_POLICY]")
- * .toString())
+ * UpdateVolumeRequest request =
+ * UpdateVolumeRequest.newBuilder()
+ * .setVolume(Volume.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
* .build();
- * ApiFuture Sample code:
*
@@ -1426,36 +1481,25 @@ public final SnapshotSchedulePolicy getSnapshotSchedulePolicy(
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * SnapshotSchedulePolicy snapshotSchedulePolicy = SnapshotSchedulePolicy.newBuilder().build();
- * String snapshotSchedulePolicyId = "snapshotSchedulePolicyId1929948040";
- * SnapshotSchedulePolicy response =
- * bareMetalSolutionClient.createSnapshotSchedulePolicy(
- * parent, snapshotSchedulePolicy, snapshotSchedulePolicyId);
+ * UpdateVolumeRequest request =
+ * UpdateVolumeRequest.newBuilder()
+ * .setVolume(Volume.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture Sample code:
*
@@ -1463,36 +1507,29 @@ public final SnapshotSchedulePolicy createSnapshotSchedulePolicy(
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
- * SnapshotSchedulePolicy snapshotSchedulePolicy = SnapshotSchedulePolicy.newBuilder().build();
- * String snapshotSchedulePolicyId = "snapshotSchedulePolicyId1929948040";
- * SnapshotSchedulePolicy response =
- * bareMetalSolutionClient.createSnapshotSchedulePolicy(
- * parent, snapshotSchedulePolicy, snapshotSchedulePolicyId);
+ * VolumeName volume = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]");
+ * long sizeGib = 847296130;
+ * Volume response = bareMetalSolutionClient.resizeVolumeAsync(volume, sizeGib).get();
* }
* }
*
- * @param parent Required. The parent project and location containing the SnapshotSchedulePolicy.
- * @param snapshotSchedulePolicy Required. The SnapshotSchedulePolicy to create.
- * @param snapshotSchedulePolicyId Required. Snapshot policy ID
+ * @param volume Required. Volume to resize.
+ * @param sizeGib New Volume size, in GiB.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final SnapshotSchedulePolicy createSnapshotSchedulePolicy(
- String parent,
- SnapshotSchedulePolicy snapshotSchedulePolicy,
- String snapshotSchedulePolicyId) {
- CreateSnapshotSchedulePolicyRequest request =
- CreateSnapshotSchedulePolicyRequest.newBuilder()
- .setParent(parent)
- .setSnapshotSchedulePolicy(snapshotSchedulePolicy)
- .setSnapshotSchedulePolicyId(snapshotSchedulePolicyId)
+ public final OperationFuture Sample code:
*
@@ -1500,28 +1537,26 @@ public final SnapshotSchedulePolicy createSnapshotSchedulePolicy(
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * CreateSnapshotSchedulePolicyRequest request =
- * CreateSnapshotSchedulePolicyRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setSnapshotSchedulePolicy(SnapshotSchedulePolicy.newBuilder().build())
- * .setSnapshotSchedulePolicyId("snapshotSchedulePolicyId1929948040")
- * .build();
- * SnapshotSchedulePolicy response =
- * bareMetalSolutionClient.createSnapshotSchedulePolicy(request);
+ * String volume = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString();
+ * long sizeGib = 847296130;
+ * Volume response = bareMetalSolutionClient.resizeVolumeAsync(volume, sizeGib).get();
* }
* }
*
- * @param request The request object containing all of the parameters for the API call.
+ * @param volume Required. Volume to resize.
+ * @param sizeGib New Volume size, in GiB.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final SnapshotSchedulePolicy createSnapshotSchedulePolicy(
- CreateSnapshotSchedulePolicyRequest request) {
- return createSnapshotSchedulePolicyCallable().call(request);
+ public final OperationFuture Sample code:
*
@@ -1529,60 +1564,26 @@ public final SnapshotSchedulePolicy createSnapshotSchedulePolicy(
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * CreateSnapshotSchedulePolicyRequest request =
- * CreateSnapshotSchedulePolicyRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setSnapshotSchedulePolicy(SnapshotSchedulePolicy.newBuilder().build())
- * .setSnapshotSchedulePolicyId("snapshotSchedulePolicyId1929948040")
+ * ResizeVolumeRequest request =
+ * ResizeVolumeRequest.newBuilder()
+ * .setVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
+ * .setSizeGib(847296130)
* .build();
- * ApiFuture Sample code:
- *
- * The `name` field is used to identify the snapshot schedule policy to update. Format:
- * projects/{project}/locations/global/snapshotSchedulePolicies/{policy}
- * @param updateMask Required. The list of fields to update.
+ * @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 SnapshotSchedulePolicy updateSnapshotSchedulePolicy(
- SnapshotSchedulePolicy snapshotSchedulePolicy, FieldMask updateMask) {
- UpdateSnapshotSchedulePolicyRequest request =
- UpdateSnapshotSchedulePolicyRequest.newBuilder()
- .setSnapshotSchedulePolicy(snapshotSchedulePolicy)
- .setUpdateMask(updateMask)
- .build();
- return updateSnapshotSchedulePolicy(request);
+ public final OperationFuture Sample code:
*
@@ -1590,27 +1591,26 @@ public final SnapshotSchedulePolicy updateSnapshotSchedulePolicy(
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * UpdateSnapshotSchedulePolicyRequest request =
- * UpdateSnapshotSchedulePolicyRequest.newBuilder()
- * .setSnapshotSchedulePolicy(SnapshotSchedulePolicy.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
+ * ResizeVolumeRequest request =
+ * ResizeVolumeRequest.newBuilder()
+ * .setVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
+ * .setSizeGib(847296130)
* .build();
- * SnapshotSchedulePolicy response =
- * bareMetalSolutionClient.updateSnapshotSchedulePolicy(request);
+ * OperationFuture Sample code:
*
@@ -1618,26 +1618,25 @@ public final SnapshotSchedulePolicy updateSnapshotSchedulePolicy(
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * UpdateSnapshotSchedulePolicyRequest request =
- * UpdateSnapshotSchedulePolicyRequest.newBuilder()
- * .setSnapshotSchedulePolicy(SnapshotSchedulePolicy.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
+ * ResizeVolumeRequest request =
+ * ResizeVolumeRequest.newBuilder()
+ * .setVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
+ * .setSizeGib(847296130)
* .build();
- * ApiFuture Sample code:
*
@@ -1645,26 +1644,27 @@ public final SnapshotSchedulePolicy updateSnapshotSchedulePolicy(
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * SnapshotSchedulePolicyName name =
- * SnapshotSchedulePolicyName.of("[PROJECT]", "[LOCATION]", "[SNAPSHOT_SCHEDULE_POLICY]");
- * bareMetalSolutionClient.deleteSnapshotSchedulePolicy(name);
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Network element : bareMetalSolutionClient.listNetworks(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
* }
* }
*
- * @param name Required. The name of the snapshot schedule policy to delete.
+ * @param parent Required. Parent value for ListNetworksRequest.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final void deleteSnapshotSchedulePolicy(SnapshotSchedulePolicyName name) {
- DeleteSnapshotSchedulePolicyRequest request =
- DeleteSnapshotSchedulePolicyRequest.newBuilder()
- .setName(name == null ? null : name.toString())
+ public final ListNetworksPagedResponse listNetworks(LocationName parent) {
+ ListNetworksRequest request =
+ ListNetworksRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
.build();
- deleteSnapshotSchedulePolicy(request);
+ return listNetworks(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Delete a named snapshot schedule policy.
+ * List network in a given project and location.
*
* Sample code:
*
@@ -1672,25 +1672,24 @@ public final void deleteSnapshotSchedulePolicy(SnapshotSchedulePolicyName name)
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * String name =
- * SnapshotSchedulePolicyName.of("[PROJECT]", "[LOCATION]", "[SNAPSHOT_SCHEDULE_POLICY]")
- * .toString();
- * bareMetalSolutionClient.deleteSnapshotSchedulePolicy(name);
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Network element : bareMetalSolutionClient.listNetworks(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
* }
* }
*
- * @param name Required. The name of the snapshot schedule policy to delete.
+ * @param parent Required. Parent value for ListNetworksRequest.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final void deleteSnapshotSchedulePolicy(String name) {
- DeleteSnapshotSchedulePolicyRequest request =
- DeleteSnapshotSchedulePolicyRequest.newBuilder().setName(name).build();
- deleteSnapshotSchedulePolicy(request);
+ public final ListNetworksPagedResponse listNetworks(String parent) {
+ ListNetworksRequest request = ListNetworksRequest.newBuilder().setParent(parent).build();
+ return listNetworks(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Delete a named snapshot schedule policy.
+ * List network in a given project and location.
*
* Sample code:
*
@@ -1698,27 +1697,29 @@ public final void deleteSnapshotSchedulePolicy(String name) {
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * DeleteSnapshotSchedulePolicyRequest request =
- * DeleteSnapshotSchedulePolicyRequest.newBuilder()
- * .setName(
- * SnapshotSchedulePolicyName.of(
- * "[PROJECT]", "[LOCATION]", "[SNAPSHOT_SCHEDULE_POLICY]")
- * .toString())
+ * ListNetworksRequest request =
+ * ListNetworksRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
* .build();
- * bareMetalSolutionClient.deleteSnapshotSchedulePolicy(request);
+ * for (Network element : bareMetalSolutionClient.listNetworks(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 void deleteSnapshotSchedulePolicy(DeleteSnapshotSchedulePolicyRequest request) {
- deleteSnapshotSchedulePolicyCallable().call(request);
+ public final ListNetworksPagedResponse listNetworks(ListNetworksRequest request) {
+ return listNetworksPagedCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Delete a named snapshot schedule policy.
+ * List network in a given project and location.
*
* Sample code:
*
@@ -1726,28 +1727,30 @@ public final void deleteSnapshotSchedulePolicy(DeleteSnapshotSchedulePolicyReque
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * DeleteSnapshotSchedulePolicyRequest request =
- * DeleteSnapshotSchedulePolicyRequest.newBuilder()
- * .setName(
- * SnapshotSchedulePolicyName.of(
- * "[PROJECT]", "[LOCATION]", "[SNAPSHOT_SCHEDULE_POLICY]")
- * .toString())
+ * ListNetworksRequest request =
+ * ListNetworksRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
* .build();
- * ApiFuture Sample code:
*
@@ -1755,31 +1758,37 @@ public final void deleteSnapshotSchedulePolicy(DeleteSnapshotSchedulePolicyReque
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * VolumeName parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]");
- * VolumeSnapshot volumeSnapshot = VolumeSnapshot.newBuilder().build();
- * VolumeSnapshot response =
- * bareMetalSolutionClient.createVolumeSnapshot(parent, volumeSnapshot);
+ * ListNetworksRequest request =
+ * ListNetworksRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * while (true) {
+ * ListNetworksResponse response =
+ * bareMetalSolutionClient.listNetworksCallable().call(request);
+ * for (Network element : response.getNetworksList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
* }
* }
- *
- * @param parent Required. The volume to snapshot.
- * @param volumeSnapshot Required. The volume snapshot to create. Only the description field may
- * be specified.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final VolumeSnapshot createVolumeSnapshot(
- VolumeName parent, VolumeSnapshot volumeSnapshot) {
- CreateVolumeSnapshotRequest request =
- CreateVolumeSnapshotRequest.newBuilder()
- .setParent(parent == null ? null : parent.toString())
- .setVolumeSnapshot(volumeSnapshot)
- .build();
- return createVolumeSnapshot(request);
+ public final UnaryCallable Sample code:
*
@@ -1787,30 +1796,26 @@ public final VolumeSnapshot createVolumeSnapshot(
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * String parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString();
- * VolumeSnapshot volumeSnapshot = VolumeSnapshot.newBuilder().build();
- * VolumeSnapshot response =
- * bareMetalSolutionClient.createVolumeSnapshot(parent, volumeSnapshot);
+ * LocationName location = LocationName.of("[PROJECT]", "[LOCATION]");
+ * ListNetworkUsageResponse response = bareMetalSolutionClient.listNetworkUsage(location);
* }
* }
*
- * @param parent Required. The volume to snapshot.
- * @param volumeSnapshot Required. The volume snapshot to create. Only the description field may
- * be specified.
+ * @param location Required. Parent value (project and location).
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final VolumeSnapshot createVolumeSnapshot(String parent, VolumeSnapshot volumeSnapshot) {
- CreateVolumeSnapshotRequest request =
- CreateVolumeSnapshotRequest.newBuilder()
- .setParent(parent)
- .setVolumeSnapshot(volumeSnapshot)
+ public final ListNetworkUsageResponse listNetworkUsage(LocationName location) {
+ ListNetworkUsageRequest request =
+ ListNetworkUsageRequest.newBuilder()
+ .setLocation(location == null ? null : location.toString())
.build();
- return createVolumeSnapshot(request);
+ return listNetworkUsage(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Create a storage volume snapshot in a containing volume.
+ * List all Networks (and used IPs for each Network) in the vendor account associated with the
+ * specified project.
*
* Sample code:
*
@@ -1818,25 +1823,24 @@ public final VolumeSnapshot createVolumeSnapshot(String parent, VolumeSnapshot v
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * CreateVolumeSnapshotRequest request =
- * CreateVolumeSnapshotRequest.newBuilder()
- * .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
- * .setVolumeSnapshot(VolumeSnapshot.newBuilder().build())
- * .build();
- * VolumeSnapshot response = bareMetalSolutionClient.createVolumeSnapshot(request);
+ * String location = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * ListNetworkUsageResponse response = bareMetalSolutionClient.listNetworkUsage(location);
* }
* }
*
- * @param request The request object containing all of the parameters for the API call.
+ * @param location Required. Parent value (project and location).
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final VolumeSnapshot createVolumeSnapshot(CreateVolumeSnapshotRequest request) {
- return createVolumeSnapshotCallable().call(request);
+ public final ListNetworkUsageResponse listNetworkUsage(String location) {
+ ListNetworkUsageRequest request =
+ ListNetworkUsageRequest.newBuilder().setLocation(location).build();
+ return listNetworkUsage(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Create a storage volume snapshot in a containing volume.
+ * List all Networks (and used IPs for each Network) in the vendor account associated with the
+ * specified project.
*
* Sample code:
*
@@ -1844,26 +1848,25 @@ public final VolumeSnapshot createVolumeSnapshot(CreateVolumeSnapshotRequest req
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * CreateVolumeSnapshotRequest request =
- * CreateVolumeSnapshotRequest.newBuilder()
- * .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
- * .setVolumeSnapshot(VolumeSnapshot.newBuilder().build())
+ * ListNetworkUsageRequest request =
+ * ListNetworkUsageRequest.newBuilder()
+ * .setLocation(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .build();
- * ApiFuture Sample code:
*
@@ -1871,28 +1874,25 @@ public final VolumeSnapshot createVolumeSnapshot(CreateVolumeSnapshotRequest req
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * VolumeSnapshotName volumeSnapshot =
- * VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]");
- * VolumeSnapshot response =
- * bareMetalSolutionClient.restoreVolumeSnapshotAsync(volumeSnapshot).get();
+ * ListNetworkUsageRequest request =
+ * ListNetworkUsageRequest.newBuilder()
+ * .setLocation(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .build();
+ * ApiFuture Sample code:
*
@@ -1900,26 +1900,23 @@ public final OperationFuture Sample code:
*
@@ -1927,27 +1924,22 @@ public final OperationFuture Sample code:
*
@@ -1955,27 +1947,24 @@ public final OperationFuture Sample code:
*
@@ -1983,27 +1972,23 @@ public final OperationFuture Sample code:
*
@@ -2011,26 +1996,29 @@ public final OperationFuture The `name` field is used to identify the instance to update. Format:
+ * projects/{project}/locations/{location}/networks/{network}
+ * @param updateMask The list of fields to update. The only currently supported fields are:
+ * `labels`, `reservations`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final void deleteVolumeSnapshot(VolumeSnapshotName name) {
- DeleteVolumeSnapshotRequest request =
- DeleteVolumeSnapshotRequest.newBuilder()
- .setName(name == null ? null : name.toString())
- .build();
- deleteVolumeSnapshot(request);
+ public final OperationFuture Sample code:
*
@@ -2038,24 +2026,26 @@ public final void deleteVolumeSnapshot(VolumeSnapshotName name) {
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * String name =
- * VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]").toString();
- * bareMetalSolutionClient.deleteVolumeSnapshot(name);
+ * UpdateNetworkRequest request =
+ * UpdateNetworkRequest.newBuilder()
+ * .setNetwork(Network.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Network response = bareMetalSolutionClient.updateNetworkAsync(request).get();
* }
* }
*
- * @param name Required. The name of the snapshot to delete.
+ * @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 void deleteVolumeSnapshot(String name) {
- DeleteVolumeSnapshotRequest request =
- DeleteVolumeSnapshotRequest.newBuilder().setName(name).build();
- deleteVolumeSnapshot(request);
+ public final OperationFuture Sample code:
*
@@ -2063,26 +2053,26 @@ public final void deleteVolumeSnapshot(String name) {
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * DeleteVolumeSnapshotRequest request =
- * DeleteVolumeSnapshotRequest.newBuilder()
- * .setName(
- * VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]")
- * .toString())
+ * UpdateNetworkRequest request =
+ * UpdateNetworkRequest.newBuilder()
+ * .setNetwork(Network.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
* .build();
- * bareMetalSolutionClient.deleteVolumeSnapshot(request);
+ * OperationFuture Sample code:
*
@@ -2090,26 +2080,25 @@ public final void deleteVolumeSnapshot(DeleteVolumeSnapshotRequest request) {
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * DeleteVolumeSnapshotRequest request =
- * DeleteVolumeSnapshotRequest.newBuilder()
- * .setName(
- * VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]")
- * .toString())
+ * UpdateNetworkRequest request =
+ * UpdateNetworkRequest.newBuilder()
+ * .setNetwork(Network.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
* .build();
- * ApiFuture Sample code:
*
@@ -2117,26 +2106,23 @@ public final UnaryCallable Sample code:
*
@@ -2144,23 +2130,22 @@ public final VolumeSnapshot getVolumeSnapshot(VolumeSnapshotName name) {
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * String name =
- * VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]").toString();
- * VolumeSnapshot response = bareMetalSolutionClient.getVolumeSnapshot(name);
+ * String name = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString();
+ * Lun response = bareMetalSolutionClient.getLun(name);
* }
* }
*
* @param name Required. Name of the resource.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final VolumeSnapshot getVolumeSnapshot(String name) {
- GetVolumeSnapshotRequest request = GetVolumeSnapshotRequest.newBuilder().setName(name).build();
- return getVolumeSnapshot(request);
+ public final Lun getLun(String name) {
+ GetLunRequest request = GetLunRequest.newBuilder().setName(name).build();
+ return getLun(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Get details of a single storage volume snapshot.
+ * Get details of a single storage logical unit number(LUN).
*
* Sample code:
*
@@ -2168,26 +2153,24 @@ public final VolumeSnapshot getVolumeSnapshot(String name) {
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * GetVolumeSnapshotRequest request =
- * GetVolumeSnapshotRequest.newBuilder()
- * .setName(
- * VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]")
- * .toString())
+ * GetLunRequest request =
+ * GetLunRequest.newBuilder()
+ * .setName(LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString())
* .build();
- * VolumeSnapshot response = bareMetalSolutionClient.getVolumeSnapshot(request);
+ * Lun response = bareMetalSolutionClient.getLun(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 VolumeSnapshot getVolumeSnapshot(GetVolumeSnapshotRequest request) {
- return getVolumeSnapshotCallable().call(request);
+ public final Lun getLun(GetLunRequest request) {
+ return getLunCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Get details of a single storage volume snapshot.
+ * Get details of a single storage logical unit number(LUN).
*
* Sample code:
*
@@ -2195,26 +2178,23 @@ public final VolumeSnapshot getVolumeSnapshot(GetVolumeSnapshotRequest request)
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * GetVolumeSnapshotRequest request =
- * GetVolumeSnapshotRequest.newBuilder()
- * .setName(
- * VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]")
- * .toString())
+ * GetLunRequest request =
+ * GetLunRequest.newBuilder()
+ * .setName(LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString())
* .build();
- * ApiFuture Sample code:
*
@@ -2223,27 +2203,24 @@ public final UnaryCallable Sample code:
*
@@ -2252,25 +2229,23 @@ public final ListVolumeSnapshotsPagedResponse listVolumeSnapshots(VolumeName par
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
* String parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString();
- * for (VolumeSnapshot element :
- * bareMetalSolutionClient.listVolumeSnapshots(parent).iterateAll()) {
+ * for (Lun element : bareMetalSolutionClient.listLuns(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
- * @param parent Required. Parent value for ListVolumesRequest.
+ * @param parent Required. Parent value for ListLunsRequest.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListVolumeSnapshotsPagedResponse listVolumeSnapshots(String parent) {
- ListVolumeSnapshotsRequest request =
- ListVolumeSnapshotsRequest.newBuilder().setParent(parent).build();
- return listVolumeSnapshots(request);
+ public final ListLunsPagedResponse listLuns(String parent) {
+ ListLunsRequest request = ListLunsRequest.newBuilder().setParent(parent).build();
+ return listLuns(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * List storage volume snapshots for given storage volume.
+ * List storage volume luns for given storage volume.
*
* Sample code:
*
@@ -2278,14 +2253,13 @@ public final ListVolumeSnapshotsPagedResponse listVolumeSnapshots(String parent)
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * ListVolumeSnapshotsRequest request =
- * ListVolumeSnapshotsRequest.newBuilder()
+ * ListLunsRequest request =
+ * ListLunsRequest.newBuilder()
* .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
- * for (VolumeSnapshot element :
- * bareMetalSolutionClient.listVolumeSnapshots(request).iterateAll()) {
+ * for (Lun element : bareMetalSolutionClient.listLuns(request).iterateAll()) {
* // doThingsWith(element);
* }
* }
@@ -2294,14 +2268,13 @@ public final ListVolumeSnapshotsPagedResponse listVolumeSnapshots(String parent)
* @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 ListVolumeSnapshotsPagedResponse listVolumeSnapshots(
- ListVolumeSnapshotsRequest request) {
- return listVolumeSnapshotsPagedCallable().call(request);
+ public final ListLunsPagedResponse listLuns(ListLunsRequest request) {
+ return listLunsPagedCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * List storage volume snapshots for given storage volume.
+ * List storage volume luns for given storage volume.
*
* Sample code:
*
@@ -2309,29 +2282,27 @@ public final ListVolumeSnapshotsPagedResponse listVolumeSnapshots(
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * ListVolumeSnapshotsRequest request =
- * ListVolumeSnapshotsRequest.newBuilder()
+ * ListLunsRequest request =
+ * ListLunsRequest.newBuilder()
* .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
- * ApiFuture Sample code:
*
@@ -2339,16 +2310,15 @@ public final ListVolumeSnapshotsPagedResponse listVolumeSnapshots(
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * ListVolumeSnapshotsRequest request =
- * ListVolumeSnapshotsRequest.newBuilder()
+ * ListLunsRequest request =
+ * ListLunsRequest.newBuilder()
* .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
* while (true) {
- * ListVolumeSnapshotsResponse response =
- * bareMetalSolutionClient.listVolumeSnapshotsCallable().call(request);
- * for (VolumeSnapshot element : response.getVolumeSnapshotsList()) {
+ * ListLunsResponse response = bareMetalSolutionClient.listLunsCallable().call(request);
+ * for (Lun element : response.getLunsList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
@@ -2361,14 +2331,13 @@ public final ListVolumeSnapshotsPagedResponse listVolumeSnapshots(
* }
* }
*/
- public final UnaryCallable Sample code:
*
@@ -2376,23 +2345,23 @@ public final ListVolumeSnapshotsPagedResponse listVolumeSnapshots(
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * LunName name = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]");
- * Lun response = bareMetalSolutionClient.getLun(name);
+ * NFSShareName name = NFSShareName.of("[PROJECT]", "[LOCATION]", "[NFS_SHARE]");
+ * NfsShare response = bareMetalSolutionClient.getNfsShare(name);
* }
* }
*
* @param name Required. Name of the resource.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final Lun getLun(LunName name) {
- GetLunRequest request =
- GetLunRequest.newBuilder().setName(name == null ? null : name.toString()).build();
- return getLun(request);
+ public final NfsShare getNfsShare(NFSShareName name) {
+ GetNfsShareRequest request =
+ GetNfsShareRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getNfsShare(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Get details of a single storage logical unit number(LUN).
+ * Get details of a single NFS share.
*
* Sample code:
*
@@ -2400,22 +2369,22 @@ public final Lun getLun(LunName name) {
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * String name = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString();
- * Lun response = bareMetalSolutionClient.getLun(name);
+ * String name = NFSShareName.of("[PROJECT]", "[LOCATION]", "[NFS_SHARE]").toString();
+ * NfsShare response = bareMetalSolutionClient.getNfsShare(name);
* }
* }
*
* @param name Required. Name of the resource.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final Lun getLun(String name) {
- GetLunRequest request = GetLunRequest.newBuilder().setName(name).build();
- return getLun(request);
+ public final NfsShare getNfsShare(String name) {
+ GetNfsShareRequest request = GetNfsShareRequest.newBuilder().setName(name).build();
+ return getNfsShare(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Get details of a single storage logical unit number(LUN).
+ * Get details of a single NFS share.
*
* Sample code:
*
@@ -2423,24 +2392,24 @@ public final Lun getLun(String name) {
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * GetLunRequest request =
- * GetLunRequest.newBuilder()
- * .setName(LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString())
+ * GetNfsShareRequest request =
+ * GetNfsShareRequest.newBuilder()
+ * .setName(NFSShareName.of("[PROJECT]", "[LOCATION]", "[NFS_SHARE]").toString())
* .build();
- * Lun response = bareMetalSolutionClient.getLun(request);
+ * NfsShare response = bareMetalSolutionClient.getNfsShare(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 Lun getLun(GetLunRequest request) {
- return getLunCallable().call(request);
+ public final NfsShare getNfsShare(GetNfsShareRequest request) {
+ return getNfsShareCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Get details of a single storage logical unit number(LUN).
+ * Get details of a single NFS share.
*
* Sample code:
*
@@ -2448,23 +2417,24 @@ public final Lun getLun(GetLunRequest request) {
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * GetLunRequest request =
- * GetLunRequest.newBuilder()
- * .setName(LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString())
+ * GetNfsShareRequest request =
+ * GetNfsShareRequest.newBuilder()
+ * .setName(NFSShareName.of("[PROJECT]", "[LOCATION]", "[NFS_SHARE]").toString())
* .build();
- * ApiFuture Sample code:
*
@@ -2472,25 +2442,27 @@ public final UnaryCallable Sample code:
*
@@ -2498,24 +2470,24 @@ public final ListLunsPagedResponse listLuns(VolumeName parent) {
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * String parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString();
- * for (Lun element : bareMetalSolutionClient.listLuns(parent).iterateAll()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (NfsShare element : bareMetalSolutionClient.listNfsShares(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
- * @param parent Required. Parent value for ListLunsRequest.
+ * @param parent Required. Parent value for ListNfsSharesRequest.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListLunsPagedResponse listLuns(String parent) {
- ListLunsRequest request = ListLunsRequest.newBuilder().setParent(parent).build();
- return listLuns(request);
+ public final ListNfsSharesPagedResponse listNfsShares(String parent) {
+ ListNfsSharesRequest request = ListNfsSharesRequest.newBuilder().setParent(parent).build();
+ return listNfsShares(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * List storage volume luns for given storage volume.
+ * List NFS shares.
*
* Sample code:
*
@@ -2523,13 +2495,14 @@ public final ListLunsPagedResponse listLuns(String parent) {
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * ListLunsRequest request =
- * ListLunsRequest.newBuilder()
- * .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
+ * ListNfsSharesRequest request =
+ * ListNfsSharesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
* .build();
- * for (Lun element : bareMetalSolutionClient.listLuns(request).iterateAll()) {
+ * for (NfsShare element : bareMetalSolutionClient.listNfsShares(request).iterateAll()) {
* // doThingsWith(element);
* }
* }
@@ -2538,13 +2511,13 @@ public final ListLunsPagedResponse listLuns(String parent) {
* @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 ListLunsPagedResponse listLuns(ListLunsRequest request) {
- return listLunsPagedCallable().call(request);
+ public final ListNfsSharesPagedResponse listNfsShares(ListNfsSharesRequest request) {
+ return listNfsSharesPagedCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * List storage volume luns for given storage volume.
+ * List NFS shares.
*
* Sample code:
*
@@ -2552,27 +2525,30 @@ public final ListLunsPagedResponse listLuns(ListLunsRequest request) {
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * ListLunsRequest request =
- * ListLunsRequest.newBuilder()
- * .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
+ * ListNfsSharesRequest request =
+ * ListNfsSharesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
* .build();
- * ApiFuture Sample code:
*
@@ -2580,15 +2556,17 @@ public final UnaryCallable Sample code:
+ *
+ * The `name` field is used to identify the NFS share to update. Format:
+ * projects/{project}/locations/{location}/nfsShares/{nfs_share}
+ * @param updateMask The list of fields to update. The only currently supported fields are:
+ * `labels`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
+ * Instance instance = Instance.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Instance response = bareMetalSolutionClient.updateInstanceAsync(instance, updateMask).get();
+ * }
+ * }
+ *
+ * @param instance Required. The server to update.
+ * {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
+ * UpdateInstanceRequest request =
+ * UpdateInstanceRequest.newBuilder()
+ * .setInstance(Instance.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Instance response = bareMetalSolutionClient.updateInstanceAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
+ * UpdateInstanceRequest request =
+ * UpdateInstanceRequest.newBuilder()
+ * .setInstance(Instance.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
+ * UpdateInstanceRequest request =
+ * UpdateInstanceRequest.newBuilder()
+ * .setInstance(Instance.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * for (Network element : bareMetalSolutionClient.listNetworks(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param parent Required. Parent value for ListNetworksRequest.
+ * @param instance Required. Name of the instance.
+ * @param lun Required. Name of the Lun to detach.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListNetworksPagedResponse listNetworks(LocationName parent) {
- ListNetworksRequest request =
- ListNetworksRequest.newBuilder()
- .setParent(parent == null ? null : parent.toString())
+ public final OperationFuture{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * ListSnapshotSchedulePoliciesRequest request =
- * ListSnapshotSchedulePoliciesRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * while (true) {
- * ListSnapshotSchedulePoliciesResponse response =
- * bareMetalSolutionClient.listSnapshotSchedulePoliciesCallable().call(request);
- * for (SnapshotSchedulePolicy element : response.getSnapshotSchedulePoliciesList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
- * }
- * }
+ * @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 UnaryCallable<
- ListSnapshotSchedulePoliciesRequest, ListSnapshotSchedulePoliciesResponse>
- listSnapshotSchedulePoliciesCallable() {
- return stub.listSnapshotSchedulePoliciesCallable();
+ public final Volume getVolume(GetVolumeRequest request) {
+ return getVolumeCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Get details of a single snapshot schedule policy.
+ * Get details of a single storage volume.
*
* {@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
- * SnapshotSchedulePolicy snapshotSchedulePolicy = SnapshotSchedulePolicy.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * SnapshotSchedulePolicy response =
- * bareMetalSolutionClient.updateSnapshotSchedulePolicy(snapshotSchedulePolicy, updateMask);
+ * Volume response = bareMetalSolutionClient.resizeVolumeAsync(request).get();
* }
* }
*
- * @param snapshotSchedulePolicy Required. The snapshot schedule policy to update.
- * {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
+ * NfsShare nfsShare = NfsShare.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * NfsShare response = bareMetalSolutionClient.updateNfsShareAsync(nfsShare, updateMask).get();
+ * }
+ * }
+ *
+ * @param nfsShare Required. The NFS share to update.
+ * {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
+ * UpdateNfsShareRequest request =
+ * UpdateNfsShareRequest.newBuilder()
+ * .setNfsShare(NfsShare.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * NfsShare response = bareMetalSolutionClient.updateNfsShareAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
+ * UpdateNfsShareRequest request =
+ * UpdateNfsShareRequest.newBuilder()
+ * .setNfsShare(NfsShare.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
+ * UpdateNfsShareRequest request =
+ * UpdateNfsShareRequest.newBuilder()
+ * .setNfsShare(NfsShare.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable