diff --git a/java-bare-metal-solution/google-cloud-bare-metal-solution/pom.xml b/java-bare-metal-solution/google-cloud-bare-metal-solution/pom.xml index f98683c41caf..db8ba2a3e133 100644 --- a/java-bare-metal-solution/google-cloud-bare-metal-solution/pom.xml +++ b/java-bare-metal-solution/google-cloud-bare-metal-solution/pom.xml @@ -58,6 +58,10 @@ com.google.api gax-grpc + + com.google.api + gax-httpjson + org.threeten threetenbp @@ -77,12 +81,24 @@ test + + com.google.api + gax + testlib + test + com.google.api gax-grpc testlib test + + com.google.api + gax-httpjson + testlib + test + diff --git a/java-bare-metal-solution/google-cloud-bare-metal-solution/src/main/java/com/google/cloud/baremetalsolution/v2/BareMetalSolutionClient.java b/java-bare-metal-solution/google-cloud-bare-metal-solution/src/main/java/com/google/cloud/baremetalsolution/v2/BareMetalSolutionClient.java index 1c913ed49b7f..84738de21493 100644 --- a/java-bare-metal-solution/google-cloud-bare-metal-solution/src/main/java/com/google/cloud/baremetalsolution/v2/BareMetalSolutionClient.java +++ b/java-bare-metal-solution/google-cloud-bare-metal-solution/src/main/java/com/google/cloud/baremetalsolution/v2/BareMetalSolutionClient.java @@ -18,7 +18,9 @@ import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; import com.google.api.gax.longrunning.OperationFuture; import com.google.api.gax.paging.AbstractFixedSizeCollection; import com.google.api.gax.paging.AbstractPage; @@ -30,8 +32,6 @@ import com.google.cloud.baremetalsolution.v2.stub.BareMetalSolutionStubSettings; import com.google.common.util.concurrent.MoreExecutors; import com.google.longrunning.Operation; -import com.google.longrunning.OperationsClient; -import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; import java.io.IOException; import java.util.List; @@ -111,13 +111,29 @@ * BareMetalSolutionClient.create(bareMetalSolutionSettings); * } * + *

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 future = * bareMetalSolutionClient.listInstancesPagedCallable().futureCall(request); @@ -301,6 +332,7 @@ public final ListInstancesPagedResponse listInstances(ListInstancesRequest reque * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") * .build(); * while (true) { * ListInstancesResponse response = @@ -419,6 +451,116 @@ public final UnaryCallable getInstanceCallable() { return stub.getInstanceCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update details of a single server. + * + *

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. + *

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 updateInstanceAsync( + Instance instance, FieldMask updateMask) { + UpdateInstanceRequest request = + UpdateInstanceRequest.newBuilder().setInstance(instance).setUpdateMask(updateMask).build(); + return updateInstanceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update details of a single server. + * + *

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()) {
+   *   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 updateInstanceAsync( + UpdateInstanceRequest request) { + return updateInstanceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update details of a single server. + * + *

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()) {
+   *   UpdateInstanceRequest request =
+   *       UpdateInstanceRequest.newBuilder()
+   *           .setInstance(Instance.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       bareMetalSolutionClient.updateInstanceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateInstanceOperationCallable() { + return stub.updateInstanceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update details of a single server. + * + *

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()) {
+   *   UpdateInstanceRequest request =
+   *       UpdateInstanceRequest.newBuilder()
+   *           .setInstance(Instance.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       bareMetalSolutionClient.updateInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateInstanceCallable() { + return stub.updateInstanceCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Perform an ungraceful, hard reset on a server. Equivalent to shutting the power off and then @@ -552,7 +694,7 @@ public final UnaryCallable resetInstanceCallabl // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * List storage volumes in a given project and location. + * Starts a server that was shutdown. * *

Sample code: * @@ -560,27 +702,24 @@ public final UnaryCallable resetInstanceCallabl * // 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 (Volume element : bareMetalSolutionClient.listVolumes(parent).iterateAll()) { - * // doThingsWith(element); - * } + * InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + * 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(LocationName parent) { - ListVolumesRequest request = - ListVolumesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listVolumes(request); + public final OperationFuture startInstanceAsync( + InstanceName name) { + StartInstanceRequest request = + StartInstanceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return startInstanceAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * List storage volumes in a given project and location. + * Starts a server that was shutdown. * *

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 startInstanceAsync( + String name) { + StartInstanceRequest request = StartInstanceRequest.newBuilder().setName(name).build(); + return startInstanceAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * List storage volumes in a given project and location. + * Starts a server that was shutdown. * *

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 startInstanceAsync( + StartInstanceRequest request) { + return startInstanceOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * List storage volumes in a given project and location. + * Starts a server that was shutdown. * *

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 future = - * bareMetalSolutionClient.listVolumesPagedCallable().futureCall(request); + * OperationFuture future = + * bareMetalSolutionClient.startInstanceOperationCallable().futureCall(request); * // Do something. - * for (Volume element : future.get().iterateAll()) { - * // doThingsWith(element); - * } + * StartInstanceResponse response = future.get(); * } * } */ - public final UnaryCallable - listVolumesPagedCallable() { - return stub.listVolumesPagedCallable(); + public final OperationCallable + startInstanceOperationCallable() { + return stub.startInstanceOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * List storage volumes in a given project and location. + * Starts a server that was shutdown. * *

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 future = + * bareMetalSolutionClient.startInstanceCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); * } * } */ - public final UnaryCallable listVolumesCallable() { - return stub.listVolumesCallable(); + public final UnaryCallable startInstanceCallable() { + return stub.startInstanceCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Get details of a single storage volume. + * Stop a running server. * *

Sample code: * @@ -707,23 +828,24 @@ public final UnaryCallable listVolumesC * // 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 name = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]"); - * Volume response = bareMetalSolutionClient.getVolume(name); + * InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + * 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(VolumeName name) { - GetVolumeRequest request = - GetVolumeRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getVolume(request); + public final OperationFuture stopInstanceAsync( + InstanceName name) { + StopInstanceRequest request = + StopInstanceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return stopInstanceAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Get details of a single storage volume. + * Stop a running server. * *

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 stopInstanceAsync( + String name) { + StopInstanceRequest request = StopInstanceRequest.newBuilder().setName(name).build(); + return stopInstanceAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Get details of a single storage volume. + * Stop a running server. * *

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 stopInstanceAsync( + StopInstanceRequest request) { + return stopInstanceOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Get details of a single storage volume. + * Stop a running server. * *

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 future = bareMetalSolutionClient.getVolumeCallable().futureCall(request); + * OperationFuture future = + * bareMetalSolutionClient.stopInstanceOperationCallable().futureCall(request); * // Do something. - * Volume response = future.get(); + * StopInstanceResponse response = future.get(); * } * } */ - public final UnaryCallable getVolumeCallable() { - return stub.getVolumeCallable(); + public final OperationCallable + stopInstanceOperationCallable() { + return stub.stopInstanceOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Update details of a single storage volume. + * Stop a running server. * *

Sample code: * @@ -803,29 +929,24 @@ public final UnaryCallable getVolumeCallable() { * // This snippet has been automatically generated for illustrative purposes only. * // It may require modifications to work in your environment. * try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { - * Volume volume = Volume.newBuilder().build(); - * FieldMask updateMask = FieldMask.newBuilder().build(); - * Volume response = bareMetalSolutionClient.updateVolumeAsync(volume, updateMask).get(); + * StopInstanceRequest request = + * StopInstanceRequest.newBuilder() + * .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + * .build(); + * ApiFuture future = + * bareMetalSolutionClient.stopInstanceCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); * } * } - * - * @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` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final OperationFuture updateVolumeAsync( - Volume volume, FieldMask updateMask) { - UpdateVolumeRequest request = - UpdateVolumeRequest.newBuilder().setVolume(volume).setUpdateMask(updateMask).build(); - return updateVolumeAsync(request); + public final UnaryCallable stopInstanceCallable() { + return stub.stopInstanceCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Update details of a single storage volume. + * Detach LUN from Instance. * *

Sample code: * @@ -833,26 +954,29 @@ public final OperationFuture updateVolumeAsync( * // This snippet has been automatically generated for illustrative purposes only. * // It may require modifications to work in your environment. * try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { - * UpdateVolumeRequest request = - * UpdateVolumeRequest.newBuilder() - * .setVolume(Volume.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) - * .build(); - * Volume response = bareMetalSolutionClient.updateVolumeAsync(request).get(); + * InstanceName instance = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + * LunName lun = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]"); + * Instance response = bareMetalSolutionClient.detachLunAsync(instance, lun).get(); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @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 OperationFuture updateVolumeAsync( - UpdateVolumeRequest request) { - return updateVolumeOperationCallable().futureCall(request); + public final OperationFuture detachLunAsync( + InstanceName instance, LunName lun) { + DetachLunRequest request = + DetachLunRequest.newBuilder() + .setInstance(instance == null ? null : instance.toString()) + .setLun(lun == null ? null : lun.toString()) + .build(); + return detachLunAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Update details of a single storage volume. + * Detach LUN from Instance. * *

Sample code: * @@ -860,26 +984,29 @@ public final OperationFuture updateVolumeAsync( * // This snippet has been automatically generated for illustrative purposes only. * // It may require modifications to work in your environment. * try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { - * UpdateVolumeRequest request = - * UpdateVolumeRequest.newBuilder() - * .setVolume(Volume.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) - * .build(); - * OperationFuture future = - * bareMetalSolutionClient.updateVolumeOperationCallable().futureCall(request); - * // Do something. - * Volume response = future.get(); + * InstanceName instance = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + * String lun = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString(); + * Instance response = bareMetalSolutionClient.detachLunAsync(instance, lun).get(); * } * } + * + * @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 OperationCallable - updateVolumeOperationCallable() { - return stub.updateVolumeOperationCallable(); + public final OperationFuture detachLunAsync( + InstanceName instance, String lun) { + DetachLunRequest request = + DetachLunRequest.newBuilder() + .setInstance(instance == null ? null : instance.toString()) + .setLun(lun) + .build(); + return detachLunAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Update details of a single storage volume. + * Detach LUN from Instance. * *

Sample code: * @@ -887,53 +1014,29 @@ public final OperationFuture updateVolumeAsync( * // This snippet has been automatically generated for illustrative purposes only. * // It may require modifications to work in your environment. * try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { - * UpdateVolumeRequest request = - * UpdateVolumeRequest.newBuilder() - * .setVolume(Volume.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) - * .build(); - * ApiFuture future = - * bareMetalSolutionClient.updateVolumeCallable().futureCall(request); - * // Do something. - * Operation response = future.get(); + * String instance = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString(); + * LunName lun = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]"); + * Instance response = bareMetalSolutionClient.detachLunAsync(instance, lun).get(); * } * } - */ - public final UnaryCallable updateVolumeCallable() { - return stub.updateVolumeCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * List network in a given project and location. * - *

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()) {
-   *   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 detachLunAsync( + String instance, LunName lun) { + DetachLunRequest request = + DetachLunRequest.newBuilder() + .setInstance(instance) + .setLun(lun == null ? null : lun.toString()) .build(); - return listNetworks(request); + return detachLunAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * List network in a given project and location. + * Detach LUN from Instance. * *

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 detachLunAsync( + String instance, String lun) { + DetachLunRequest request = + DetachLunRequest.newBuilder().setInstance(instance).setLun(lun).build(); + return detachLunAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * List network in a given project and location. + * Detach LUN from Instance. * *

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 detachLunAsync( + DetachLunRequest request) { + return detachLunOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * List network in a given project and location. + * Detach LUN from Instance. * *

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 future = - * bareMetalSolutionClient.listNetworksPagedCallable().futureCall(request); + * OperationFuture future = + * bareMetalSolutionClient.detachLunOperationCallable().futureCall(request); * // Do something. - * for (Network element : future.get().iterateAll()) { - * // doThingsWith(element); - * } + * Instance response = future.get(); * } * } */ - public final UnaryCallable - listNetworksPagedCallable() { - return stub.listNetworksPagedCallable(); + public final OperationCallable + detachLunOperationCallable() { + return stub.detachLunOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * List network in a given project and location. + * Detach LUN from Instance. * *

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 future = bareMetalSolutionClient.detachLunCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); * } * } */ - public final UnaryCallable listNetworksCallable() { - return stub.listNetworksCallable(); + public final UnaryCallable detachLunCallable() { + return stub.detachLunCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Get details of a single network. + * List storage volumes in a given project and location. * *

Sample code: * @@ -1061,23 +1150,27 @@ public final UnaryCallable listNetwor * // This snippet has been automatically generated for illustrative purposes only. * // It may require modifications to work in your environment. * try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { - * NetworkName name = NetworkName.of("[PROJECT]", "[LOCATION]", "[NETWORK]"); - * Network response = bareMetalSolutionClient.getNetwork(name); + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * 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(NetworkName name) { - GetNetworkRequest request = - GetNetworkRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getNetwork(request); + public final ListVolumesPagedResponse listVolumes(LocationName parent) { + ListVolumesRequest request = + ListVolumesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .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: * @@ -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 future = bareMetalSolutionClient.getNetworkCallable().futureCall(request); + * ApiFuture future = + * bareMetalSolutionClient.listVolumesPagedCallable().futureCall(request); * // Do something. - * Network response = future.get(); + * for (Volume element : future.get().iterateAll()) { + * // doThingsWith(element); + * } * } * } */ - public final UnaryCallable getNetworkCallable() { - return stub.getNetworkCallable(); + public final UnaryCallable + listVolumesPagedCallable() { + return stub.listVolumesPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * List snapshot schedule policies in a given project and location. + * List storage volumes in a given project and location. * *

Sample code: * @@ -1157,29 +1264,35 @@ public final UnaryCallable getNetworkCallable() { * // 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 (SnapshotSchedulePolicy element : - * bareMetalSolutionClient.listSnapshotSchedulePolicies(parent).iterateAll()) { - * // doThingsWith(element); + * ListVolumesRequest request = + * ListVolumesRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .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; + * } * } * } * } - * - * @param parent Required. The parent project containing the Snapshot Schedule Policies. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListSnapshotSchedulePoliciesPagedResponse listSnapshotSchedulePolicies( - LocationName parent) { - ListSnapshotSchedulePoliciesRequest request = - ListSnapshotSchedulePoliciesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listSnapshotSchedulePolicies(request); + public final UnaryCallable listVolumesCallable() { + return stub.listVolumesCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * List snapshot schedule policies in a given project and location. + * Get details of a single storage volume. * *

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 future = - * bareMetalSolutionClient.listSnapshotSchedulePoliciesPagedCallable().futureCall(request); - * // Do something. - * for (SnapshotSchedulePolicy element : future.get().iterateAll()) { - * // doThingsWith(element); - * } + * Volume response = bareMetalSolutionClient.getVolume(request); * } * } - */ - public final UnaryCallable< - ListSnapshotSchedulePoliciesRequest, ListSnapshotSchedulePoliciesPagedResponse> - listSnapshotSchedulePoliciesPagedCallable() { - return stub.listSnapshotSchedulePoliciesPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * List snapshot schedule policies in a given project and location. - * - *

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()) {
-   *   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. * *

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 future = bareMetalSolutionClient.getVolumeCallable().futureCall(request); + * // Do something. + * Volume response = future.get(); * } * } - * - * @param name Required. Name of the resource. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final SnapshotSchedulePolicy getSnapshotSchedulePolicy(SnapshotSchedulePolicyName name) { - GetSnapshotSchedulePolicyRequest request = - GetSnapshotSchedulePolicyRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getSnapshotSchedulePolicy(request); + public final UnaryCallable getVolumeCallable() { + return stub.getVolumeCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Get details of a single snapshot schedule policy. + * Update details of a single storage volume. * *

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 updateVolumeAsync( + Volume volume, FieldMask updateMask) { + UpdateVolumeRequest request = + UpdateVolumeRequest.newBuilder().setVolume(volume).setUpdateMask(updateMask).build(); + return updateVolumeAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Get details of a single snapshot schedule policy. + * Update details of a single storage volume. * *

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 updateVolumeAsync( + UpdateVolumeRequest request) { + return updateVolumeOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Get details of a single snapshot schedule policy. + * Update details of a single storage volume. * *

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 future = - * bareMetalSolutionClient.getSnapshotSchedulePolicyCallable().futureCall(request); + * OperationFuture future = + * bareMetalSolutionClient.updateVolumeOperationCallable().futureCall(request); * // Do something. - * SnapshotSchedulePolicy response = future.get(); + * Volume response = future.get(); * } * } */ - public final UnaryCallable - getSnapshotSchedulePolicyCallable() { - return stub.getSnapshotSchedulePolicyCallable(); + public final OperationCallable + updateVolumeOperationCallable() { + return stub.updateVolumeOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Create a snapshot schedule policy in the specified project. + * Update details of a single storage volume. * *

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 future = + * bareMetalSolutionClient.updateVolumeCallable().futureCall(request); + * // Do something. + * Operation response = future.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 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final SnapshotSchedulePolicy createSnapshotSchedulePolicy( - LocationName parent, - SnapshotSchedulePolicy snapshotSchedulePolicy, - String snapshotSchedulePolicyId) { - CreateSnapshotSchedulePolicyRequest request = - CreateSnapshotSchedulePolicyRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setSnapshotSchedulePolicy(snapshotSchedulePolicy) - .setSnapshotSchedulePolicyId(snapshotSchedulePolicyId) - .build(); - return createSnapshotSchedulePolicy(request); + public final UnaryCallable updateVolumeCallable() { + return stub.updateVolumeCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Create a snapshot schedule policy in the specified project. + * Emergency Volume resize. * *

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 resizeVolumeAsync( + VolumeName volume, long sizeGib) { + ResizeVolumeRequest request = + ResizeVolumeRequest.newBuilder() + .setVolume(volume == null ? null : volume.toString()) + .setSizeGib(sizeGib) .build(); - return createSnapshotSchedulePolicy(request); + return resizeVolumeAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Create a snapshot schedule policy in the specified project. + * Emergency Volume resize. * *

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 resizeVolumeAsync( + String volume, long sizeGib) { + ResizeVolumeRequest request = + ResizeVolumeRequest.newBuilder().setVolume(volume).setSizeGib(sizeGib).build(); + return resizeVolumeAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Create a snapshot schedule policy in the specified project. + * Emergency Volume resize. * *

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 future = - * bareMetalSolutionClient.createSnapshotSchedulePolicyCallable().futureCall(request); - * // Do something. - * SnapshotSchedulePolicy response = future.get(); - * } - * } - */ - public final UnaryCallable - createSnapshotSchedulePolicyCallable() { - return stub.createSnapshotSchedulePolicyCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Update a snapshot schedule policy in the specified project. - * - *

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()) {
-   *   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. - *

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 resizeVolumeAsync( + ResizeVolumeRequest request) { + return resizeVolumeOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Update a snapshot schedule policy in the specified project. + * Emergency Volume resize. * *

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 future = + * bareMetalSolutionClient.resizeVolumeOperationCallable().futureCall(request); + * // Do something. + * Volume response = future.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 updateSnapshotSchedulePolicy( - UpdateSnapshotSchedulePolicyRequest request) { - return updateSnapshotSchedulePolicyCallable().call(request); + public final OperationCallable + resizeVolumeOperationCallable() { + return stub.resizeVolumeOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Update a snapshot schedule policy in the specified project. + * Emergency Volume resize. * *

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 future = - * bareMetalSolutionClient.updateSnapshotSchedulePolicyCallable().futureCall(request); + * ApiFuture future = + * bareMetalSolutionClient.resizeVolumeCallable().futureCall(request); * // Do something. - * SnapshotSchedulePolicy response = future.get(); + * Operation response = future.get(); * } * } */ - public final UnaryCallable - updateSnapshotSchedulePolicyCallable() { - return stub.updateSnapshotSchedulePolicyCallable(); + public final UnaryCallable resizeVolumeCallable() { + return stub.resizeVolumeCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Delete a named snapshot schedule policy. + * List network in a given project and location. * *

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 future = - * bareMetalSolutionClient.deleteSnapshotSchedulePolicyCallable().futureCall(request); + * ApiFuture future = + * bareMetalSolutionClient.listNetworksPagedCallable().futureCall(request); * // Do something. - * future.get(); + * for (Network element : future.get().iterateAll()) { + * // doThingsWith(element); + * } * } * } */ - public final UnaryCallable - deleteSnapshotSchedulePolicyCallable() { - return stub.deleteSnapshotSchedulePolicyCallable(); + public final UnaryCallable + listNetworksPagedCallable() { + return stub.listNetworksPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Create a storage volume snapshot in a containing volume. + * List network in a given project and location. * *

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 listNetworksCallable() { + return stub.listNetworksCallable(); } // 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: * @@ -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 future = - * bareMetalSolutionClient.createVolumeSnapshotCallable().futureCall(request); - * // Do something. - * VolumeSnapshot response = future.get(); + * ListNetworkUsageResponse response = bareMetalSolutionClient.listNetworkUsage(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 UnaryCallable - createVolumeSnapshotCallable() { - return stub.createVolumeSnapshotCallable(); + public final ListNetworkUsageResponse listNetworkUsage(ListNetworkUsageRequest request) { + return listNetworkUsageCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Restore a storage volume snapshot to its containing volume. + * List all Networks (and used IPs for each Network) in the vendor account associated with the + * specified project. * *

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 future = + * bareMetalSolutionClient.listNetworkUsageCallable().futureCall(request); + * // Do something. + * ListNetworkUsageResponse response = future.get(); * } * } - * - * @param volumeSnapshot Required. Name of the resource. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final OperationFuture restoreVolumeSnapshotAsync( - VolumeSnapshotName volumeSnapshot) { - RestoreVolumeSnapshotRequest request = - RestoreVolumeSnapshotRequest.newBuilder() - .setVolumeSnapshot(volumeSnapshot == null ? null : volumeSnapshot.toString()) - .build(); - return restoreVolumeSnapshotAsync(request); + public final UnaryCallable + listNetworkUsageCallable() { + return stub.listNetworkUsageCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Restore a storage volume snapshot to its containing volume. + * Get details of a single network. * *

Sample code: * @@ -1900,26 +1900,23 @@ public final OperationFuture restoreVolumeSna * // 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 volumeSnapshot = - * VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]").toString(); - * VolumeSnapshot response = - * bareMetalSolutionClient.restoreVolumeSnapshotAsync(volumeSnapshot).get(); + * NetworkName name = NetworkName.of("[PROJECT]", "[LOCATION]", "[NETWORK]"); + * Network response = bareMetalSolutionClient.getNetwork(name); * } * } * - * @param volumeSnapshot Required. Name of the resource. + * @param name Required. Name of the resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final OperationFuture restoreVolumeSnapshotAsync( - String volumeSnapshot) { - RestoreVolumeSnapshotRequest request = - RestoreVolumeSnapshotRequest.newBuilder().setVolumeSnapshot(volumeSnapshot).build(); - return restoreVolumeSnapshotAsync(request); + public final Network getNetwork(NetworkName name) { + GetNetworkRequest request = + GetNetworkRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getNetwork(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Restore a storage volume snapshot to its containing volume. + * Get details of a single network. * *

Sample code: * @@ -1927,27 +1924,22 @@ public final OperationFuture restoreVolumeSna * // This snippet has been automatically generated for illustrative purposes only. * // It may require modifications to work in your environment. * try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { - * RestoreVolumeSnapshotRequest request = - * RestoreVolumeSnapshotRequest.newBuilder() - * .setVolumeSnapshot( - * VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]") - * .toString()) - * .build(); - * VolumeSnapshot response = bareMetalSolutionClient.restoreVolumeSnapshotAsync(request).get(); + * String name = NetworkName.of("[PROJECT]", "[LOCATION]", "[NETWORK]").toString(); + * Network response = bareMetalSolutionClient.getNetwork(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 OperationFuture restoreVolumeSnapshotAsync( - RestoreVolumeSnapshotRequest request) { - return restoreVolumeSnapshotOperationCallable().futureCall(request); + public final Network getNetwork(String name) { + GetNetworkRequest request = GetNetworkRequest.newBuilder().setName(name).build(); + return getNetwork(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Restore a storage volume snapshot to its containing volume. + * Get details of a single network. * *

Sample code: * @@ -1955,27 +1947,24 @@ public final OperationFuture restoreVolumeSna * // This snippet has been automatically generated for illustrative purposes only. * // It may require modifications to work in your environment. * try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { - * RestoreVolumeSnapshotRequest request = - * RestoreVolumeSnapshotRequest.newBuilder() - * .setVolumeSnapshot( - * VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]") - * .toString()) + * GetNetworkRequest request = + * GetNetworkRequest.newBuilder() + * .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[NETWORK]").toString()) * .build(); - * OperationFuture future = - * bareMetalSolutionClient.restoreVolumeSnapshotOperationCallable().futureCall(request); - * // Do something. - * VolumeSnapshot response = future.get(); + * Network response = bareMetalSolutionClient.getNetwork(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 OperationCallable - restoreVolumeSnapshotOperationCallable() { - return stub.restoreVolumeSnapshotOperationCallable(); + public final Network getNetwork(GetNetworkRequest request) { + return getNetworkCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Restore a storage volume snapshot to its containing volume. + * Get details of a single network. * *

Sample code: * @@ -1983,27 +1972,23 @@ public final OperationFuture restoreVolumeSna * // This snippet has been automatically generated for illustrative purposes only. * // It may require modifications to work in your environment. * try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { - * RestoreVolumeSnapshotRequest request = - * RestoreVolumeSnapshotRequest.newBuilder() - * .setVolumeSnapshot( - * VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]") - * .toString()) + * GetNetworkRequest request = + * GetNetworkRequest.newBuilder() + * .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[NETWORK]").toString()) * .build(); - * ApiFuture future = - * bareMetalSolutionClient.restoreVolumeSnapshotCallable().futureCall(request); + * ApiFuture future = bareMetalSolutionClient.getNetworkCallable().futureCall(request); * // Do something. - * Operation response = future.get(); + * Network response = future.get(); * } * } */ - public final UnaryCallable - restoreVolumeSnapshotCallable() { - return stub.restoreVolumeSnapshotCallable(); + public final UnaryCallable getNetworkCallable() { + return stub.getNetworkCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a storage volume snapshot for a given volume. + * Update details of a single network. * *

Sample code: * @@ -2011,26 +1996,29 @@ public final OperationFuture restoreVolumeSna * // 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 name = - * VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]"); - * bareMetalSolutionClient.deleteVolumeSnapshot(name); + * Network network = Network.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * Network response = bareMetalSolutionClient.updateNetworkAsync(network, updateMask).get(); * } * } * - * @param name Required. The name of the snapshot to delete. + * @param network Required. The network to update. + *

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 updateNetworkAsync( + Network network, FieldMask updateMask) { + UpdateNetworkRequest request = + UpdateNetworkRequest.newBuilder().setNetwork(network).setUpdateMask(updateMask).build(); + return updateNetworkAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a storage volume snapshot for a given volume. + * Update details of a single network. * *

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 updateNetworkAsync( + UpdateNetworkRequest request) { + return updateNetworkOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a storage volume snapshot for a given volume. + * Update details of a single network. * *

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 future = + * bareMetalSolutionClient.updateNetworkOperationCallable().futureCall(request); + * // Do something. + * Network response = future.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 void deleteVolumeSnapshot(DeleteVolumeSnapshotRequest request) { - deleteVolumeSnapshotCallable().call(request); + public final OperationCallable + updateNetworkOperationCallable() { + return stub.updateNetworkOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a storage volume snapshot for a given volume. + * Update details of a single network. * *

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 future = - * bareMetalSolutionClient.deleteVolumeSnapshotCallable().futureCall(request); + * ApiFuture future = + * bareMetalSolutionClient.updateNetworkCallable().futureCall(request); * // Do something. - * future.get(); + * Operation response = future.get(); * } * } */ - public final UnaryCallable deleteVolumeSnapshotCallable() { - return stub.deleteVolumeSnapshotCallable(); + public final UnaryCallable updateNetworkCallable() { + return stub.updateNetworkCallable(); } // 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: * @@ -2117,26 +2106,23 @@ public final UnaryCallable deleteVolumeSnaps * // 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 name = - * VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]"); - * VolumeSnapshot response = bareMetalSolutionClient.getVolumeSnapshot(name); + * LunName name = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]"); + * 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(VolumeSnapshotName name) { - GetVolumeSnapshotRequest request = - GetVolumeSnapshotRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getVolumeSnapshot(request); + public final Lun getLun(LunName name) { + GetLunRequest request = + GetLunRequest.newBuilder().setName(name == null ? null : name.toString()).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: * @@ -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 future = - * bareMetalSolutionClient.getVolumeSnapshotCallable().futureCall(request); + * ApiFuture future = bareMetalSolutionClient.getLunCallable().futureCall(request); * // Do something. - * VolumeSnapshot response = future.get(); + * Lun response = future.get(); * } * } */ - public final UnaryCallable getVolumeSnapshotCallable() { - return stub.getVolumeSnapshotCallable(); + public final UnaryCallable getLunCallable() { + return stub.getLunCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * List storage volume snapshots for given storage volume. + * List storage volume luns for given storage volume. * *

Sample code: * @@ -2223,27 +2203,24 @@ public final UnaryCallable getVolumeSn * // It may require modifications to work in your environment. * try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { * VolumeName parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]"); - * 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(VolumeName parent) { - ListVolumeSnapshotsRequest request = - ListVolumeSnapshotsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listVolumeSnapshots(request); + public final ListLunsPagedResponse listLuns(VolumeName parent) { + ListLunsRequest request = + ListLunsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).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: * @@ -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 future = - * bareMetalSolutionClient.listVolumeSnapshotsPagedCallable().futureCall(request); + * ApiFuture future = bareMetalSolutionClient.listLunsPagedCallable().futureCall(request); * // Do something. - * for (VolumeSnapshot element : future.get().iterateAll()) { + * for (Lun element : future.get().iterateAll()) { * // doThingsWith(element); * } * } * } */ - public final UnaryCallable - listVolumeSnapshotsPagedCallable() { - return stub.listVolumeSnapshotsPagedCallable(); + public final UnaryCallable listLunsPagedCallable() { + return stub.listLunsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * List storage volume snapshots for given storage volume. + * List storage volume luns for given storage volume. * *

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 - listVolumeSnapshotsCallable() { - return stub.listVolumeSnapshotsCallable(); + public final UnaryCallable listLunsCallable() { + return stub.listLunsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Get details of a single storage logical unit number(LUN). + * Get details of a single NFS share. * *

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 future = bareMetalSolutionClient.getLunCallable().futureCall(request); + * ApiFuture future = + * bareMetalSolutionClient.getNfsShareCallable().futureCall(request); * // Do something. - * Lun response = future.get(); + * NfsShare response = future.get(); * } * } */ - public final UnaryCallable getLunCallable() { - return stub.getLunCallable(); + public final UnaryCallable getNfsShareCallable() { + return stub.getNfsShareCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * List storage volume luns for given storage volume. + * List NFS shares. * *

Sample code: * @@ -2472,25 +2442,27 @@ public final UnaryCallable getLunCallable() { * // 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]"); - * for (Lun element : bareMetalSolutionClient.listLuns(parent).iterateAll()) { + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * 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(VolumeName parent) { - ListLunsRequest request = - ListLunsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); - return listLuns(request); + public final ListNfsSharesPagedResponse listNfsShares(LocationName parent) { + ListNfsSharesRequest request = + ListNfsSharesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listNfsShares(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * List storage volume luns for given storage volume. + * List NFS shares. * *

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 future = bareMetalSolutionClient.listLunsPagedCallable().futureCall(request); + * ApiFuture future = + * bareMetalSolutionClient.listNfsSharesPagedCallable().futureCall(request); * // Do something. - * for (Lun element : future.get().iterateAll()) { + * for (NfsShare element : future.get().iterateAll()) { * // doThingsWith(element); * } * } * } */ - public final UnaryCallable listLunsPagedCallable() { - return stub.listLunsPagedCallable(); + public final UnaryCallable + listNfsSharesPagedCallable() { + return stub.listNfsSharesPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * List storage volume luns for given storage volume. + * List NFS shares. * *

Sample code: * @@ -2580,15 +2556,17 @@ public final UnaryCallable listLunsPaged * // 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(); * while (true) { - * ListLunsResponse response = bareMetalSolutionClient.listLunsCallable().call(request); - * for (Lun element : response.getLunsList()) { + * ListNfsSharesResponse response = + * bareMetalSolutionClient.listNfsSharesCallable().call(request); + * for (NfsShare element : response.getNfsSharesList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -2601,8 +2579,118 @@ public final UnaryCallable listLunsPaged * } * } */ - public final UnaryCallable listLunsCallable() { - return stub.listLunsCallable(); + public final UnaryCallable listNfsSharesCallable() { + return stub.listNfsSharesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update details of a single NFS share. + * + *

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()) {
+   *   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. + *

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 updateNfsShareAsync( + NfsShare nfsShare, FieldMask updateMask) { + UpdateNfsShareRequest request = + UpdateNfsShareRequest.newBuilder().setNfsShare(nfsShare).setUpdateMask(updateMask).build(); + return updateNfsShareAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update details of a single NFS share. + * + *

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()) {
+   *   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 updateNfsShareAsync( + UpdateNfsShareRequest request) { + return updateNfsShareOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update details of a single NFS share. + * + *

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()) {
+   *   UpdateNfsShareRequest request =
+   *       UpdateNfsShareRequest.newBuilder()
+   *           .setNfsShare(NfsShare.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       bareMetalSolutionClient.updateNfsShareOperationCallable().futureCall(request);
+   *   // Do something.
+   *   NfsShare response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateNfsShareOperationCallable() { + return stub.updateNfsShareOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update details of a single NFS share. + * + *

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()) {
+   *   UpdateNfsShareRequest request =
+   *       UpdateNfsShareRequest.newBuilder()
+   *           .setNfsShare(NfsShare.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       bareMetalSolutionClient.updateNfsShareCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateNfsShareCallable() { + return stub.updateNfsShareCallable(); } @Override @@ -2859,247 +2947,142 @@ protected ListNetworksFixedSizeCollection createCollection( } } - public static class ListSnapshotSchedulePoliciesPagedResponse + public static class ListLunsPagedResponse extends AbstractPagedListResponse< - ListSnapshotSchedulePoliciesRequest, - ListSnapshotSchedulePoliciesResponse, - SnapshotSchedulePolicy, - ListSnapshotSchedulePoliciesPage, - ListSnapshotSchedulePoliciesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext< - ListSnapshotSchedulePoliciesRequest, - ListSnapshotSchedulePoliciesResponse, - SnapshotSchedulePolicy> - context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListSnapshotSchedulePoliciesPage.createEmptyPage() - .createPageAsync(context, futureResponse); + ListLunsRequest, ListLunsResponse, Lun, ListLunsPage, ListLunsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLunsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( - futurePage, - input -> new ListSnapshotSchedulePoliciesPagedResponse(input), - MoreExecutors.directExecutor()); + futurePage, input -> new ListLunsPagedResponse(input), MoreExecutors.directExecutor()); } - private ListSnapshotSchedulePoliciesPagedResponse(ListSnapshotSchedulePoliciesPage page) { - super(page, ListSnapshotSchedulePoliciesFixedSizeCollection.createEmptyCollection()); + private ListLunsPagedResponse(ListLunsPage page) { + super(page, ListLunsFixedSizeCollection.createEmptyCollection()); } } - public static class ListSnapshotSchedulePoliciesPage - extends AbstractPage< - ListSnapshotSchedulePoliciesRequest, - ListSnapshotSchedulePoliciesResponse, - SnapshotSchedulePolicy, - ListSnapshotSchedulePoliciesPage> { - - private ListSnapshotSchedulePoliciesPage( - PageContext< - ListSnapshotSchedulePoliciesRequest, - ListSnapshotSchedulePoliciesResponse, - SnapshotSchedulePolicy> - context, - ListSnapshotSchedulePoliciesResponse response) { + public static class ListLunsPage + extends AbstractPage { + + private ListLunsPage( + PageContext context, ListLunsResponse response) { super(context, response); } - private static ListSnapshotSchedulePoliciesPage createEmptyPage() { - return new ListSnapshotSchedulePoliciesPage(null, null); + private static ListLunsPage createEmptyPage() { + return new ListLunsPage(null, null); } @Override - protected ListSnapshotSchedulePoliciesPage createPage( - PageContext< - ListSnapshotSchedulePoliciesRequest, - ListSnapshotSchedulePoliciesResponse, - SnapshotSchedulePolicy> - context, - ListSnapshotSchedulePoliciesResponse response) { - return new ListSnapshotSchedulePoliciesPage(context, response); + protected ListLunsPage createPage( + PageContext context, ListLunsResponse response) { + return new ListLunsPage(context, response); } @Override - public ApiFuture createPageAsync( - PageContext< - ListSnapshotSchedulePoliciesRequest, - ListSnapshotSchedulePoliciesResponse, - SnapshotSchedulePolicy> - context, - ApiFuture futureResponse) { + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } - public static class ListSnapshotSchedulePoliciesFixedSizeCollection + public static class ListLunsFixedSizeCollection extends AbstractFixedSizeCollection< - ListSnapshotSchedulePoliciesRequest, - ListSnapshotSchedulePoliciesResponse, - SnapshotSchedulePolicy, - ListSnapshotSchedulePoliciesPage, - ListSnapshotSchedulePoliciesFixedSizeCollection> { - - private ListSnapshotSchedulePoliciesFixedSizeCollection( - List pages, int collectionSize) { + ListLunsRequest, ListLunsResponse, Lun, ListLunsPage, ListLunsFixedSizeCollection> { + + private ListLunsFixedSizeCollection(List pages, int collectionSize) { super(pages, collectionSize); } - private static ListSnapshotSchedulePoliciesFixedSizeCollection createEmptyCollection() { - return new ListSnapshotSchedulePoliciesFixedSizeCollection(null, 0); + private static ListLunsFixedSizeCollection createEmptyCollection() { + return new ListLunsFixedSizeCollection(null, 0); } @Override - protected ListSnapshotSchedulePoliciesFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListSnapshotSchedulePoliciesFixedSizeCollection(pages, collectionSize); + protected ListLunsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLunsFixedSizeCollection(pages, collectionSize); } } - public static class ListVolumeSnapshotsPagedResponse + public static class ListNfsSharesPagedResponse extends AbstractPagedListResponse< - ListVolumeSnapshotsRequest, - ListVolumeSnapshotsResponse, - VolumeSnapshot, - ListVolumeSnapshotsPage, - ListVolumeSnapshotsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext - context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListVolumeSnapshotsPage.createEmptyPage().createPageAsync(context, futureResponse); + ListNfsSharesRequest, + ListNfsSharesResponse, + NfsShare, + ListNfsSharesPage, + ListNfsSharesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListNfsSharesPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, - input -> new ListVolumeSnapshotsPagedResponse(input), + input -> new ListNfsSharesPagedResponse(input), MoreExecutors.directExecutor()); } - private ListVolumeSnapshotsPagedResponse(ListVolumeSnapshotsPage page) { - super(page, ListVolumeSnapshotsFixedSizeCollection.createEmptyCollection()); + private ListNfsSharesPagedResponse(ListNfsSharesPage page) { + super(page, ListNfsSharesFixedSizeCollection.createEmptyCollection()); } } - public static class ListVolumeSnapshotsPage + public static class ListNfsSharesPage extends AbstractPage< - ListVolumeSnapshotsRequest, - ListVolumeSnapshotsResponse, - VolumeSnapshot, - ListVolumeSnapshotsPage> { - - private ListVolumeSnapshotsPage( - PageContext - context, - ListVolumeSnapshotsResponse response) { - super(context, response); - } - - private static ListVolumeSnapshotsPage createEmptyPage() { - return new ListVolumeSnapshotsPage(null, null); - } - - @Override - protected ListVolumeSnapshotsPage createPage( - PageContext - context, - ListVolumeSnapshotsResponse response) { - return new ListVolumeSnapshotsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext - context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListVolumeSnapshotsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListVolumeSnapshotsRequest, - ListVolumeSnapshotsResponse, - VolumeSnapshot, - ListVolumeSnapshotsPage, - ListVolumeSnapshotsFixedSizeCollection> { - - private ListVolumeSnapshotsFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListVolumeSnapshotsFixedSizeCollection createEmptyCollection() { - return new ListVolumeSnapshotsFixedSizeCollection(null, 0); - } - - @Override - protected ListVolumeSnapshotsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListVolumeSnapshotsFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListLunsPagedResponse - extends AbstractPagedListResponse< - ListLunsRequest, ListLunsResponse, Lun, ListLunsPage, ListLunsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListLunsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, input -> new ListLunsPagedResponse(input), MoreExecutors.directExecutor()); - } - - private ListLunsPagedResponse(ListLunsPage page) { - super(page, ListLunsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListLunsPage - extends AbstractPage { + ListNfsSharesRequest, ListNfsSharesResponse, NfsShare, ListNfsSharesPage> { - private ListLunsPage( - PageContext context, ListLunsResponse response) { + private ListNfsSharesPage( + PageContext context, + ListNfsSharesResponse response) { super(context, response); } - private static ListLunsPage createEmptyPage() { - return new ListLunsPage(null, null); + private static ListNfsSharesPage createEmptyPage() { + return new ListNfsSharesPage(null, null); } @Override - protected ListLunsPage createPage( - PageContext context, ListLunsResponse response) { - return new ListLunsPage(context, response); + protected ListNfsSharesPage createPage( + PageContext context, + ListNfsSharesResponse response) { + return new ListNfsSharesPage(context, response); } @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } - public static class ListLunsFixedSizeCollection + public static class ListNfsSharesFixedSizeCollection extends AbstractFixedSizeCollection< - ListLunsRequest, ListLunsResponse, Lun, ListLunsPage, ListLunsFixedSizeCollection> { + ListNfsSharesRequest, + ListNfsSharesResponse, + NfsShare, + ListNfsSharesPage, + ListNfsSharesFixedSizeCollection> { - private ListLunsFixedSizeCollection(List pages, int collectionSize) { + private ListNfsSharesFixedSizeCollection(List pages, int collectionSize) { super(pages, collectionSize); } - private static ListLunsFixedSizeCollection createEmptyCollection() { - return new ListLunsFixedSizeCollection(null, 0); + private static ListNfsSharesFixedSizeCollection createEmptyCollection() { + return new ListNfsSharesFixedSizeCollection(null, 0); } @Override - protected ListLunsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListLunsFixedSizeCollection(pages, collectionSize); + protected ListNfsSharesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListNfsSharesFixedSizeCollection(pages, collectionSize); } } } diff --git a/java-bare-metal-solution/google-cloud-bare-metal-solution/src/main/java/com/google/cloud/baremetalsolution/v2/BareMetalSolutionSettings.java b/java-bare-metal-solution/google-cloud-bare-metal-solution/src/main/java/com/google/cloud/baremetalsolution/v2/BareMetalSolutionSettings.java index ce3f297033e1..ead74045577d 100644 --- a/java-bare-metal-solution/google-cloud-bare-metal-solution/src/main/java/com/google/cloud/baremetalsolution/v2/BareMetalSolutionSettings.java +++ b/java-bare-metal-solution/google-cloud-bare-metal-solution/src/main/java/com/google/cloud/baremetalsolution/v2/BareMetalSolutionSettings.java @@ -19,8 +19,7 @@ import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListInstancesPagedResponse; import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListLunsPagedResponse; import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListNetworksPagedResponse; -import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListSnapshotSchedulePoliciesPagedResponse; -import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListVolumeSnapshotsPagedResponse; +import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListNfsSharesPagedResponse; import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListVolumesPagedResponse; import com.google.api.core.ApiFunction; @@ -28,6 +27,7 @@ import com.google.api.gax.core.GoogleCredentialsProvider; import com.google.api.gax.core.InstantiatingExecutorProvider; import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.ClientSettings; @@ -37,7 +37,6 @@ import com.google.api.gax.rpc.UnaryCallSettings; import com.google.cloud.baremetalsolution.v2.stub.BareMetalSolutionStubSettings; import com.google.longrunning.Operation; -import com.google.protobuf.Empty; import java.io.IOException; import java.util.List; import javax.annotation.Generated; @@ -91,6 +90,17 @@ public UnaryCallSettings getInstanceSettings() { return ((BareMetalSolutionStubSettings) getStubSettings()).getInstanceSettings(); } + /** Returns the object with the settings used for calls to updateInstance. */ + public UnaryCallSettings updateInstanceSettings() { + return ((BareMetalSolutionStubSettings) getStubSettings()).updateInstanceSettings(); + } + + /** Returns the object with the settings used for calls to updateInstance. */ + public OperationCallSettings + updateInstanceOperationSettings() { + return ((BareMetalSolutionStubSettings) getStubSettings()).updateInstanceOperationSettings(); + } + /** Returns the object with the settings used for calls to resetInstance. */ public UnaryCallSettings resetInstanceSettings() { return ((BareMetalSolutionStubSettings) getStubSettings()).resetInstanceSettings(); @@ -102,6 +112,39 @@ public UnaryCallSettings resetInstanceSettings( return ((BareMetalSolutionStubSettings) getStubSettings()).resetInstanceOperationSettings(); } + /** Returns the object with the settings used for calls to startInstance. */ + public UnaryCallSettings startInstanceSettings() { + return ((BareMetalSolutionStubSettings) getStubSettings()).startInstanceSettings(); + } + + /** Returns the object with the settings used for calls to startInstance. */ + public OperationCallSettings + startInstanceOperationSettings() { + return ((BareMetalSolutionStubSettings) getStubSettings()).startInstanceOperationSettings(); + } + + /** Returns the object with the settings used for calls to stopInstance. */ + public UnaryCallSettings stopInstanceSettings() { + return ((BareMetalSolutionStubSettings) getStubSettings()).stopInstanceSettings(); + } + + /** Returns the object with the settings used for calls to stopInstance. */ + public OperationCallSettings + stopInstanceOperationSettings() { + return ((BareMetalSolutionStubSettings) getStubSettings()).stopInstanceOperationSettings(); + } + + /** Returns the object with the settings used for calls to detachLun. */ + public UnaryCallSettings detachLunSettings() { + return ((BareMetalSolutionStubSettings) getStubSettings()).detachLunSettings(); + } + + /** Returns the object with the settings used for calls to detachLun. */ + public OperationCallSettings + detachLunOperationSettings() { + return ((BareMetalSolutionStubSettings) getStubSettings()).detachLunOperationSettings(); + } + /** Returns the object with the settings used for calls to listVolumes. */ public PagedCallSettings listVolumesSettings() { @@ -124,99 +167,76 @@ public UnaryCallSettings updateVolumeSettings() return ((BareMetalSolutionStubSettings) getStubSettings()).updateVolumeOperationSettings(); } + /** Returns the object with the settings used for calls to resizeVolume. */ + public UnaryCallSettings resizeVolumeSettings() { + return ((BareMetalSolutionStubSettings) getStubSettings()).resizeVolumeSettings(); + } + + /** Returns the object with the settings used for calls to resizeVolume. */ + public OperationCallSettings + resizeVolumeOperationSettings() { + return ((BareMetalSolutionStubSettings) getStubSettings()).resizeVolumeOperationSettings(); + } + /** Returns the object with the settings used for calls to listNetworks. */ public PagedCallSettings listNetworksSettings() { return ((BareMetalSolutionStubSettings) getStubSettings()).listNetworksSettings(); } + /** Returns the object with the settings used for calls to listNetworkUsage. */ + public UnaryCallSettings + listNetworkUsageSettings() { + return ((BareMetalSolutionStubSettings) getStubSettings()).listNetworkUsageSettings(); + } + /** Returns the object with the settings used for calls to getNetwork. */ public UnaryCallSettings getNetworkSettings() { return ((BareMetalSolutionStubSettings) getStubSettings()).getNetworkSettings(); } - /** Returns the object with the settings used for calls to listSnapshotSchedulePolicies. */ - public PagedCallSettings< - ListSnapshotSchedulePoliciesRequest, - ListSnapshotSchedulePoliciesResponse, - ListSnapshotSchedulePoliciesPagedResponse> - listSnapshotSchedulePoliciesSettings() { - return ((BareMetalSolutionStubSettings) getStubSettings()) - .listSnapshotSchedulePoliciesSettings(); - } - - /** Returns the object with the settings used for calls to getSnapshotSchedulePolicy. */ - public UnaryCallSettings - getSnapshotSchedulePolicySettings() { - return ((BareMetalSolutionStubSettings) getStubSettings()).getSnapshotSchedulePolicySettings(); - } - - /** Returns the object with the settings used for calls to createSnapshotSchedulePolicy. */ - public UnaryCallSettings - createSnapshotSchedulePolicySettings() { - return ((BareMetalSolutionStubSettings) getStubSettings()) - .createSnapshotSchedulePolicySettings(); + /** Returns the object with the settings used for calls to updateNetwork. */ + public UnaryCallSettings updateNetworkSettings() { + return ((BareMetalSolutionStubSettings) getStubSettings()).updateNetworkSettings(); } - /** Returns the object with the settings used for calls to updateSnapshotSchedulePolicy. */ - public UnaryCallSettings - updateSnapshotSchedulePolicySettings() { - return ((BareMetalSolutionStubSettings) getStubSettings()) - .updateSnapshotSchedulePolicySettings(); + /** Returns the object with the settings used for calls to updateNetwork. */ + public OperationCallSettings + updateNetworkOperationSettings() { + return ((BareMetalSolutionStubSettings) getStubSettings()).updateNetworkOperationSettings(); } - /** Returns the object with the settings used for calls to deleteSnapshotSchedulePolicy. */ - public UnaryCallSettings - deleteSnapshotSchedulePolicySettings() { - return ((BareMetalSolutionStubSettings) getStubSettings()) - .deleteSnapshotSchedulePolicySettings(); - } - - /** Returns the object with the settings used for calls to createVolumeSnapshot. */ - public UnaryCallSettings - createVolumeSnapshotSettings() { - return ((BareMetalSolutionStubSettings) getStubSettings()).createVolumeSnapshotSettings(); - } - - /** Returns the object with the settings used for calls to restoreVolumeSnapshot. */ - public UnaryCallSettings - restoreVolumeSnapshotSettings() { - return ((BareMetalSolutionStubSettings) getStubSettings()).restoreVolumeSnapshotSettings(); - } - - /** Returns the object with the settings used for calls to restoreVolumeSnapshot. */ - public OperationCallSettings - restoreVolumeSnapshotOperationSettings() { - return ((BareMetalSolutionStubSettings) getStubSettings()) - .restoreVolumeSnapshotOperationSettings(); + /** Returns the object with the settings used for calls to getLun. */ + public UnaryCallSettings getLunSettings() { + return ((BareMetalSolutionStubSettings) getStubSettings()).getLunSettings(); } - /** Returns the object with the settings used for calls to deleteVolumeSnapshot. */ - public UnaryCallSettings deleteVolumeSnapshotSettings() { - return ((BareMetalSolutionStubSettings) getStubSettings()).deleteVolumeSnapshotSettings(); + /** Returns the object with the settings used for calls to listLuns. */ + public PagedCallSettings + listLunsSettings() { + return ((BareMetalSolutionStubSettings) getStubSettings()).listLunsSettings(); } - /** Returns the object with the settings used for calls to getVolumeSnapshot. */ - public UnaryCallSettings getVolumeSnapshotSettings() { - return ((BareMetalSolutionStubSettings) getStubSettings()).getVolumeSnapshotSettings(); + /** Returns the object with the settings used for calls to getNfsShare. */ + public UnaryCallSettings getNfsShareSettings() { + return ((BareMetalSolutionStubSettings) getStubSettings()).getNfsShareSettings(); } - /** Returns the object with the settings used for calls to listVolumeSnapshots. */ - public PagedCallSettings< - ListVolumeSnapshotsRequest, ListVolumeSnapshotsResponse, ListVolumeSnapshotsPagedResponse> - listVolumeSnapshotsSettings() { - return ((BareMetalSolutionStubSettings) getStubSettings()).listVolumeSnapshotsSettings(); + /** Returns the object with the settings used for calls to listNfsShares. */ + public PagedCallSettings + listNfsSharesSettings() { + return ((BareMetalSolutionStubSettings) getStubSettings()).listNfsSharesSettings(); } - /** Returns the object with the settings used for calls to getLun. */ - public UnaryCallSettings getLunSettings() { - return ((BareMetalSolutionStubSettings) getStubSettings()).getLunSettings(); + /** Returns the object with the settings used for calls to updateNfsShare. */ + public UnaryCallSettings updateNfsShareSettings() { + return ((BareMetalSolutionStubSettings) getStubSettings()).updateNfsShareSettings(); } - /** Returns the object with the settings used for calls to listLuns. */ - public PagedCallSettings - listLunsSettings() { - return ((BareMetalSolutionStubSettings) getStubSettings()).listLunsSettings(); + /** Returns the object with the settings used for calls to updateNfsShare. */ + public OperationCallSettings + updateNfsShareOperationSettings() { + return ((BareMetalSolutionStubSettings) getStubSettings()).updateNfsShareOperationSettings(); } public static final BareMetalSolutionSettings create(BareMetalSolutionStubSettings stub) @@ -244,11 +264,18 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde return BareMetalSolutionStubSettings.defaultCredentialsProviderBuilder(); } - /** Returns a builder for the default ChannelProvider for this service. */ + /** Returns a builder for the default gRPC ChannelProvider for this service. */ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { return BareMetalSolutionStubSettings.defaultGrpcTransportProviderBuilder(); } + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return BareMetalSolutionStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + public static TransportChannelProvider defaultTransportChannelProvider() { return BareMetalSolutionStubSettings.defaultTransportChannelProvider(); } @@ -258,11 +285,17 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil return BareMetalSolutionStubSettings.defaultApiClientHeaderProviderBuilder(); } - /** Returns a new builder for this class. */ + /** Returns a new gRPC builder for this class. */ public static Builder newBuilder() { return Builder.createDefault(); } + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + /** Returns a new builder for this class. */ public static Builder newBuilder(ClientContext clientContext) { return new Builder(clientContext); @@ -300,6 +333,11 @@ private static Builder createDefault() { return new Builder(BareMetalSolutionStubSettings.newBuilder()); } + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(BareMetalSolutionStubSettings.newHttpJsonBuilder()); + } + public BareMetalSolutionStubSettings.Builder getStubSettingsBuilder() { return ((BareMetalSolutionStubSettings.Builder) getStubSettings()); } @@ -328,6 +366,17 @@ public UnaryCallSettings.Builder getInstanceSettin return getStubSettingsBuilder().getInstanceSettings(); } + /** Returns the builder for the settings used for calls to updateInstance. */ + public UnaryCallSettings.Builder updateInstanceSettings() { + return getStubSettingsBuilder().updateInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to updateInstance. */ + public OperationCallSettings.Builder + updateInstanceOperationSettings() { + return getStubSettingsBuilder().updateInstanceOperationSettings(); + } + /** Returns the builder for the settings used for calls to resetInstance. */ public UnaryCallSettings.Builder resetInstanceSettings() { return getStubSettingsBuilder().resetInstanceSettings(); @@ -340,6 +389,41 @@ public UnaryCallSettings.Builder resetInstanceS return getStubSettingsBuilder().resetInstanceOperationSettings(); } + /** Returns the builder for the settings used for calls to startInstance. */ + public UnaryCallSettings.Builder startInstanceSettings() { + return getStubSettingsBuilder().startInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to startInstance. */ + public OperationCallSettings.Builder< + StartInstanceRequest, StartInstanceResponse, OperationMetadata> + startInstanceOperationSettings() { + return getStubSettingsBuilder().startInstanceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to stopInstance. */ + public UnaryCallSettings.Builder stopInstanceSettings() { + return getStubSettingsBuilder().stopInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to stopInstance. */ + public OperationCallSettings.Builder< + StopInstanceRequest, StopInstanceResponse, OperationMetadata> + stopInstanceOperationSettings() { + return getStubSettingsBuilder().stopInstanceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to detachLun. */ + public UnaryCallSettings.Builder detachLunSettings() { + return getStubSettingsBuilder().detachLunSettings(); + } + + /** Returns the builder for the settings used for calls to detachLun. */ + public OperationCallSettings.Builder + detachLunOperationSettings() { + return getStubSettingsBuilder().detachLunOperationSettings(); + } + /** Returns the builder for the settings used for calls to listVolumes. */ public PagedCallSettings.Builder< ListVolumesRequest, ListVolumesResponse, ListVolumesPagedResponse> @@ -363,6 +447,17 @@ public UnaryCallSettings.Builder updateVolumeSet return getStubSettingsBuilder().updateVolumeOperationSettings(); } + /** Returns the builder for the settings used for calls to resizeVolume. */ + public UnaryCallSettings.Builder resizeVolumeSettings() { + return getStubSettingsBuilder().resizeVolumeSettings(); + } + + /** Returns the builder for the settings used for calls to resizeVolume. */ + public OperationCallSettings.Builder + resizeVolumeOperationSettings() { + return getStubSettingsBuilder().resizeVolumeOperationSettings(); + } + /** Returns the builder for the settings used for calls to listNetworks. */ public PagedCallSettings.Builder< ListNetworksRequest, ListNetworksResponse, ListNetworksPagedResponse> @@ -370,93 +465,60 @@ public UnaryCallSettings.Builder updateVolumeSet return getStubSettingsBuilder().listNetworksSettings(); } + /** Returns the builder for the settings used for calls to listNetworkUsage. */ + public UnaryCallSettings.Builder + listNetworkUsageSettings() { + return getStubSettingsBuilder().listNetworkUsageSettings(); + } + /** Returns the builder for the settings used for calls to getNetwork. */ public UnaryCallSettings.Builder getNetworkSettings() { return getStubSettingsBuilder().getNetworkSettings(); } - /** Returns the builder for the settings used for calls to listSnapshotSchedulePolicies. */ - public PagedCallSettings.Builder< - ListSnapshotSchedulePoliciesRequest, - ListSnapshotSchedulePoliciesResponse, - ListSnapshotSchedulePoliciesPagedResponse> - listSnapshotSchedulePoliciesSettings() { - return getStubSettingsBuilder().listSnapshotSchedulePoliciesSettings(); + /** Returns the builder for the settings used for calls to updateNetwork. */ + public UnaryCallSettings.Builder updateNetworkSettings() { + return getStubSettingsBuilder().updateNetworkSettings(); } - /** Returns the builder for the settings used for calls to getSnapshotSchedulePolicy. */ - public UnaryCallSettings.Builder - getSnapshotSchedulePolicySettings() { - return getStubSettingsBuilder().getSnapshotSchedulePolicySettings(); + /** Returns the builder for the settings used for calls to updateNetwork. */ + public OperationCallSettings.Builder + updateNetworkOperationSettings() { + return getStubSettingsBuilder().updateNetworkOperationSettings(); } - /** Returns the builder for the settings used for calls to createSnapshotSchedulePolicy. */ - public UnaryCallSettings.Builder - createSnapshotSchedulePolicySettings() { - return getStubSettingsBuilder().createSnapshotSchedulePolicySettings(); - } - - /** Returns the builder for the settings used for calls to updateSnapshotSchedulePolicy. */ - public UnaryCallSettings.Builder - updateSnapshotSchedulePolicySettings() { - return getStubSettingsBuilder().updateSnapshotSchedulePolicySettings(); - } - - /** Returns the builder for the settings used for calls to deleteSnapshotSchedulePolicy. */ - public UnaryCallSettings.Builder - deleteSnapshotSchedulePolicySettings() { - return getStubSettingsBuilder().deleteSnapshotSchedulePolicySettings(); - } - - /** Returns the builder for the settings used for calls to createVolumeSnapshot. */ - public UnaryCallSettings.Builder - createVolumeSnapshotSettings() { - return getStubSettingsBuilder().createVolumeSnapshotSettings(); - } - - /** Returns the builder for the settings used for calls to restoreVolumeSnapshot. */ - public UnaryCallSettings.Builder - restoreVolumeSnapshotSettings() { - return getStubSettingsBuilder().restoreVolumeSnapshotSettings(); - } - - /** Returns the builder for the settings used for calls to restoreVolumeSnapshot. */ - public OperationCallSettings.Builder< - RestoreVolumeSnapshotRequest, VolumeSnapshot, OperationMetadata> - restoreVolumeSnapshotOperationSettings() { - return getStubSettingsBuilder().restoreVolumeSnapshotOperationSettings(); + /** Returns the builder for the settings used for calls to getLun. */ + public UnaryCallSettings.Builder getLunSettings() { + return getStubSettingsBuilder().getLunSettings(); } - /** Returns the builder for the settings used for calls to deleteVolumeSnapshot. */ - public UnaryCallSettings.Builder - deleteVolumeSnapshotSettings() { - return getStubSettingsBuilder().deleteVolumeSnapshotSettings(); + /** Returns the builder for the settings used for calls to listLuns. */ + public PagedCallSettings.Builder + listLunsSettings() { + return getStubSettingsBuilder().listLunsSettings(); } - /** Returns the builder for the settings used for calls to getVolumeSnapshot. */ - public UnaryCallSettings.Builder - getVolumeSnapshotSettings() { - return getStubSettingsBuilder().getVolumeSnapshotSettings(); + /** Returns the builder for the settings used for calls to getNfsShare. */ + public UnaryCallSettings.Builder getNfsShareSettings() { + return getStubSettingsBuilder().getNfsShareSettings(); } - /** Returns the builder for the settings used for calls to listVolumeSnapshots. */ + /** Returns the builder for the settings used for calls to listNfsShares. */ public PagedCallSettings.Builder< - ListVolumeSnapshotsRequest, - ListVolumeSnapshotsResponse, - ListVolumeSnapshotsPagedResponse> - listVolumeSnapshotsSettings() { - return getStubSettingsBuilder().listVolumeSnapshotsSettings(); + ListNfsSharesRequest, ListNfsSharesResponse, ListNfsSharesPagedResponse> + listNfsSharesSettings() { + return getStubSettingsBuilder().listNfsSharesSettings(); } - /** Returns the builder for the settings used for calls to getLun. */ - public UnaryCallSettings.Builder getLunSettings() { - return getStubSettingsBuilder().getLunSettings(); + /** Returns the builder for the settings used for calls to updateNfsShare. */ + public UnaryCallSettings.Builder updateNfsShareSettings() { + return getStubSettingsBuilder().updateNfsShareSettings(); } - /** Returns the builder for the settings used for calls to listLuns. */ - public PagedCallSettings.Builder - listLunsSettings() { - return getStubSettingsBuilder().listLunsSettings(); + /** Returns the builder for the settings used for calls to updateNfsShare. */ + public OperationCallSettings.Builder + updateNfsShareOperationSettings() { + return getStubSettingsBuilder().updateNfsShareOperationSettings(); } @Override diff --git a/java-bare-metal-solution/google-cloud-bare-metal-solution/src/main/java/com/google/cloud/baremetalsolution/v2/gapic_metadata.json b/java-bare-metal-solution/google-cloud-bare-metal-solution/src/main/java/com/google/cloud/baremetalsolution/v2/gapic_metadata.json index a17a47c93402..22d1ec4af276 100644 --- a/java-bare-metal-solution/google-cloud-bare-metal-solution/src/main/java/com/google/cloud/baremetalsolution/v2/gapic_metadata.json +++ b/java-bare-metal-solution/google-cloud-bare-metal-solution/src/main/java/com/google/cloud/baremetalsolution/v2/gapic_metadata.json @@ -10,17 +10,8 @@ "grpc": { "libraryClient": "BareMetalSolutionClient", "rpcs": { - "CreateSnapshotSchedulePolicy": { - "methods": ["createSnapshotSchedulePolicy", "createSnapshotSchedulePolicy", "createSnapshotSchedulePolicy", "createSnapshotSchedulePolicyCallable"] - }, - "CreateVolumeSnapshot": { - "methods": ["createVolumeSnapshot", "createVolumeSnapshot", "createVolumeSnapshot", "createVolumeSnapshotCallable"] - }, - "DeleteSnapshotSchedulePolicy": { - "methods": ["deleteSnapshotSchedulePolicy", "deleteSnapshotSchedulePolicy", "deleteSnapshotSchedulePolicy", "deleteSnapshotSchedulePolicyCallable"] - }, - "DeleteVolumeSnapshot": { - "methods": ["deleteVolumeSnapshot", "deleteVolumeSnapshot", "deleteVolumeSnapshot", "deleteVolumeSnapshotCallable"] + "DetachLun": { + "methods": ["detachLunAsync", "detachLunAsync", "detachLunAsync", "detachLunAsync", "detachLunAsync", "detachLunOperationCallable", "detachLunCallable"] }, "GetInstance": { "methods": ["getInstance", "getInstance", "getInstance", "getInstanceCallable"] @@ -31,29 +22,26 @@ "GetNetwork": { "methods": ["getNetwork", "getNetwork", "getNetwork", "getNetworkCallable"] }, - "GetSnapshotSchedulePolicy": { - "methods": ["getSnapshotSchedulePolicy", "getSnapshotSchedulePolicy", "getSnapshotSchedulePolicy", "getSnapshotSchedulePolicyCallable"] + "GetNfsShare": { + "methods": ["getNfsShare", "getNfsShare", "getNfsShare", "getNfsShareCallable"] }, "GetVolume": { "methods": ["getVolume", "getVolume", "getVolume", "getVolumeCallable"] }, - "GetVolumeSnapshot": { - "methods": ["getVolumeSnapshot", "getVolumeSnapshot", "getVolumeSnapshot", "getVolumeSnapshotCallable"] - }, "ListInstances": { "methods": ["listInstances", "listInstances", "listInstances", "listInstancesPagedCallable", "listInstancesCallable"] }, "ListLuns": { "methods": ["listLuns", "listLuns", "listLuns", "listLunsPagedCallable", "listLunsCallable"] }, + "ListNetworkUsage": { + "methods": ["listNetworkUsage", "listNetworkUsage", "listNetworkUsage", "listNetworkUsageCallable"] + }, "ListNetworks": { "methods": ["listNetworks", "listNetworks", "listNetworks", "listNetworksPagedCallable", "listNetworksCallable"] }, - "ListSnapshotSchedulePolicies": { - "methods": ["listSnapshotSchedulePolicies", "listSnapshotSchedulePolicies", "listSnapshotSchedulePolicies", "listSnapshotSchedulePoliciesPagedCallable", "listSnapshotSchedulePoliciesCallable"] - }, - "ListVolumeSnapshots": { - "methods": ["listVolumeSnapshots", "listVolumeSnapshots", "listVolumeSnapshots", "listVolumeSnapshotsPagedCallable", "listVolumeSnapshotsCallable"] + "ListNfsShares": { + "methods": ["listNfsShares", "listNfsShares", "listNfsShares", "listNfsSharesPagedCallable", "listNfsSharesCallable"] }, "ListVolumes": { "methods": ["listVolumes", "listVolumes", "listVolumes", "listVolumesPagedCallable", "listVolumesCallable"] @@ -61,11 +49,23 @@ "ResetInstance": { "methods": ["resetInstanceAsync", "resetInstanceAsync", "resetInstanceAsync", "resetInstanceOperationCallable", "resetInstanceCallable"] }, - "RestoreVolumeSnapshot": { - "methods": ["restoreVolumeSnapshotAsync", "restoreVolumeSnapshotAsync", "restoreVolumeSnapshotAsync", "restoreVolumeSnapshotOperationCallable", "restoreVolumeSnapshotCallable"] + "ResizeVolume": { + "methods": ["resizeVolumeAsync", "resizeVolumeAsync", "resizeVolumeAsync", "resizeVolumeOperationCallable", "resizeVolumeCallable"] + }, + "StartInstance": { + "methods": ["startInstanceAsync", "startInstanceAsync", "startInstanceAsync", "startInstanceOperationCallable", "startInstanceCallable"] + }, + "StopInstance": { + "methods": ["stopInstanceAsync", "stopInstanceAsync", "stopInstanceAsync", "stopInstanceOperationCallable", "stopInstanceCallable"] + }, + "UpdateInstance": { + "methods": ["updateInstanceAsync", "updateInstanceAsync", "updateInstanceOperationCallable", "updateInstanceCallable"] + }, + "UpdateNetwork": { + "methods": ["updateNetworkAsync", "updateNetworkAsync", "updateNetworkOperationCallable", "updateNetworkCallable"] }, - "UpdateSnapshotSchedulePolicy": { - "methods": ["updateSnapshotSchedulePolicy", "updateSnapshotSchedulePolicy", "updateSnapshotSchedulePolicyCallable"] + "UpdateNfsShare": { + "methods": ["updateNfsShareAsync", "updateNfsShareAsync", "updateNfsShareOperationCallable", "updateNfsShareCallable"] }, "UpdateVolume": { "methods": ["updateVolumeAsync", "updateVolumeAsync", "updateVolumeOperationCallable", "updateVolumeCallable"] diff --git a/java-bare-metal-solution/google-cloud-bare-metal-solution/src/main/java/com/google/cloud/baremetalsolution/v2/stub/BareMetalSolutionStub.java b/java-bare-metal-solution/google-cloud-bare-metal-solution/src/main/java/com/google/cloud/baremetalsolution/v2/stub/BareMetalSolutionStub.java index b341c3256568..f1cf70deeeeb 100644 --- a/java-bare-metal-solution/google-cloud-bare-metal-solution/src/main/java/com/google/cloud/baremetalsolution/v2/stub/BareMetalSolutionStub.java +++ b/java-bare-metal-solution/google-cloud-bare-metal-solution/src/main/java/com/google/cloud/baremetalsolution/v2/stub/BareMetalSolutionStub.java @@ -19,50 +19,49 @@ import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListInstancesPagedResponse; import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListLunsPagedResponse; import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListNetworksPagedResponse; -import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListSnapshotSchedulePoliciesPagedResponse; -import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListVolumeSnapshotsPagedResponse; +import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListNfsSharesPagedResponse; import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListVolumesPagedResponse; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest; -import com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest; -import com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest; -import com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest; +import com.google.cloud.baremetalsolution.v2.DetachLunRequest; import com.google.cloud.baremetalsolution.v2.GetInstanceRequest; import com.google.cloud.baremetalsolution.v2.GetLunRequest; import com.google.cloud.baremetalsolution.v2.GetNetworkRequest; -import com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest; +import com.google.cloud.baremetalsolution.v2.GetNfsShareRequest; import com.google.cloud.baremetalsolution.v2.GetVolumeRequest; -import com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest; import com.google.cloud.baremetalsolution.v2.Instance; import com.google.cloud.baremetalsolution.v2.ListInstancesRequest; import com.google.cloud.baremetalsolution.v2.ListInstancesResponse; import com.google.cloud.baremetalsolution.v2.ListLunsRequest; import com.google.cloud.baremetalsolution.v2.ListLunsResponse; +import com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest; +import com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse; import com.google.cloud.baremetalsolution.v2.ListNetworksRequest; import com.google.cloud.baremetalsolution.v2.ListNetworksResponse; -import com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest; -import com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse; -import com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest; -import com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse; +import com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest; +import com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse; import com.google.cloud.baremetalsolution.v2.ListVolumesRequest; import com.google.cloud.baremetalsolution.v2.ListVolumesResponse; import com.google.cloud.baremetalsolution.v2.Lun; import com.google.cloud.baremetalsolution.v2.Network; +import com.google.cloud.baremetalsolution.v2.NfsShare; import com.google.cloud.baremetalsolution.v2.OperationMetadata; import com.google.cloud.baremetalsolution.v2.ResetInstanceRequest; import com.google.cloud.baremetalsolution.v2.ResetInstanceResponse; -import com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest; -import com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy; -import com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest; +import com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest; +import com.google.cloud.baremetalsolution.v2.StartInstanceRequest; +import com.google.cloud.baremetalsolution.v2.StartInstanceResponse; +import com.google.cloud.baremetalsolution.v2.StopInstanceRequest; +import com.google.cloud.baremetalsolution.v2.StopInstanceResponse; +import com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest; +import com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest; +import com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest; import com.google.cloud.baremetalsolution.v2.UpdateVolumeRequest; import com.google.cloud.baremetalsolution.v2.Volume; -import com.google.cloud.baremetalsolution.v2.VolumeSnapshot; import com.google.longrunning.Operation; import com.google.longrunning.stub.OperationsStub; -import com.google.protobuf.Empty; import javax.annotation.Generated; // AUTO-GENERATED DOCUMENTATION AND CLASS. @@ -75,7 +74,11 @@ public abstract class BareMetalSolutionStub implements BackgroundResource { public OperationsStub getOperationsStub() { - throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; } public UnaryCallable @@ -91,6 +94,15 @@ public UnaryCallable getInstanceCallable() { throw new UnsupportedOperationException("Not implemented: getInstanceCallable()"); } + public OperationCallable + updateInstanceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateInstanceOperationCallable()"); + } + + public UnaryCallable updateInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: updateInstanceCallable()"); + } + public OperationCallable resetInstanceOperationCallable() { throw new UnsupportedOperationException("Not implemented: resetInstanceOperationCallable()"); @@ -100,6 +112,33 @@ public UnaryCallable resetInstanceCallable() { throw new UnsupportedOperationException("Not implemented: resetInstanceCallable()"); } + public OperationCallable + startInstanceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: startInstanceOperationCallable()"); + } + + public UnaryCallable startInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: startInstanceCallable()"); + } + + public OperationCallable + stopInstanceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: stopInstanceOperationCallable()"); + } + + public UnaryCallable stopInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: stopInstanceCallable()"); + } + + public OperationCallable + detachLunOperationCallable() { + throw new UnsupportedOperationException("Not implemented: detachLunOperationCallable()"); + } + + public UnaryCallable detachLunCallable() { + throw new UnsupportedOperationException("Not implemented: detachLunCallable()"); + } + public UnaryCallable listVolumesPagedCallable() { throw new UnsupportedOperationException("Not implemented: listVolumesPagedCallable()"); } @@ -121,96 +160,73 @@ public UnaryCallable updateVolumeCallable() { throw new UnsupportedOperationException("Not implemented: updateVolumeCallable()"); } - public UnaryCallable listNetworksPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listNetworksPagedCallable()"); - } - - public UnaryCallable listNetworksCallable() { - throw new UnsupportedOperationException("Not implemented: listNetworksCallable()"); - } - - public UnaryCallable getNetworkCallable() { - throw new UnsupportedOperationException("Not implemented: getNetworkCallable()"); - } - - public UnaryCallable< - ListSnapshotSchedulePoliciesRequest, ListSnapshotSchedulePoliciesPagedResponse> - listSnapshotSchedulePoliciesPagedCallable() { - throw new UnsupportedOperationException( - "Not implemented: listSnapshotSchedulePoliciesPagedCallable()"); + public OperationCallable + resizeVolumeOperationCallable() { + throw new UnsupportedOperationException("Not implemented: resizeVolumeOperationCallable()"); } - public UnaryCallable - listSnapshotSchedulePoliciesCallable() { - throw new UnsupportedOperationException( - "Not implemented: listSnapshotSchedulePoliciesCallable()"); + public UnaryCallable resizeVolumeCallable() { + throw new UnsupportedOperationException("Not implemented: resizeVolumeCallable()"); } - public UnaryCallable - getSnapshotSchedulePolicyCallable() { - throw new UnsupportedOperationException("Not implemented: getSnapshotSchedulePolicyCallable()"); + public UnaryCallable listNetworksPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listNetworksPagedCallable()"); } - public UnaryCallable - createSnapshotSchedulePolicyCallable() { - throw new UnsupportedOperationException( - "Not implemented: createSnapshotSchedulePolicyCallable()"); + public UnaryCallable listNetworksCallable() { + throw new UnsupportedOperationException("Not implemented: listNetworksCallable()"); } - public UnaryCallable - updateSnapshotSchedulePolicyCallable() { - throw new UnsupportedOperationException( - "Not implemented: updateSnapshotSchedulePolicyCallable()"); + public UnaryCallable + listNetworkUsageCallable() { + throw new UnsupportedOperationException("Not implemented: listNetworkUsageCallable()"); } - public UnaryCallable - deleteSnapshotSchedulePolicyCallable() { - throw new UnsupportedOperationException( - "Not implemented: deleteSnapshotSchedulePolicyCallable()"); + public UnaryCallable getNetworkCallable() { + throw new UnsupportedOperationException("Not implemented: getNetworkCallable()"); } - public UnaryCallable createVolumeSnapshotCallable() { - throw new UnsupportedOperationException("Not implemented: createVolumeSnapshotCallable()"); + public OperationCallable + updateNetworkOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateNetworkOperationCallable()"); } - public OperationCallable - restoreVolumeSnapshotOperationCallable() { - throw new UnsupportedOperationException( - "Not implemented: restoreVolumeSnapshotOperationCallable()"); + public UnaryCallable updateNetworkCallable() { + throw new UnsupportedOperationException("Not implemented: updateNetworkCallable()"); } - public UnaryCallable restoreVolumeSnapshotCallable() { - throw new UnsupportedOperationException("Not implemented: restoreVolumeSnapshotCallable()"); + public UnaryCallable getLunCallable() { + throw new UnsupportedOperationException("Not implemented: getLunCallable()"); } - public UnaryCallable deleteVolumeSnapshotCallable() { - throw new UnsupportedOperationException("Not implemented: deleteVolumeSnapshotCallable()"); + public UnaryCallable listLunsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLunsPagedCallable()"); } - public UnaryCallable getVolumeSnapshotCallable() { - throw new UnsupportedOperationException("Not implemented: getVolumeSnapshotCallable()"); + public UnaryCallable listLunsCallable() { + throw new UnsupportedOperationException("Not implemented: listLunsCallable()"); } - public UnaryCallable - listVolumeSnapshotsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listVolumeSnapshotsPagedCallable()"); + public UnaryCallable getNfsShareCallable() { + throw new UnsupportedOperationException("Not implemented: getNfsShareCallable()"); } - public UnaryCallable - listVolumeSnapshotsCallable() { - throw new UnsupportedOperationException("Not implemented: listVolumeSnapshotsCallable()"); + public UnaryCallable + listNfsSharesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listNfsSharesPagedCallable()"); } - public UnaryCallable getLunCallable() { - throw new UnsupportedOperationException("Not implemented: getLunCallable()"); + public UnaryCallable listNfsSharesCallable() { + throw new UnsupportedOperationException("Not implemented: listNfsSharesCallable()"); } - public UnaryCallable listLunsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listLunsPagedCallable()"); + public OperationCallable + updateNfsShareOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateNfsShareOperationCallable()"); } - public UnaryCallable listLunsCallable() { - throw new UnsupportedOperationException("Not implemented: listLunsCallable()"); + public UnaryCallable updateNfsShareCallable() { + throw new UnsupportedOperationException("Not implemented: updateNfsShareCallable()"); } @Override diff --git a/java-bare-metal-solution/google-cloud-bare-metal-solution/src/main/java/com/google/cloud/baremetalsolution/v2/stub/BareMetalSolutionStubSettings.java b/java-bare-metal-solution/google-cloud-bare-metal-solution/src/main/java/com/google/cloud/baremetalsolution/v2/stub/BareMetalSolutionStubSettings.java index b0ba065ce82e..6866d5cc871a 100644 --- a/java-bare-metal-solution/google-cloud-bare-metal-solution/src/main/java/com/google/cloud/baremetalsolution/v2/stub/BareMetalSolutionStubSettings.java +++ b/java-bare-metal-solution/google-cloud-bare-metal-solution/src/main/java/com/google/cloud/baremetalsolution/v2/stub/BareMetalSolutionStubSettings.java @@ -19,8 +19,7 @@ import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListInstancesPagedResponse; import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListLunsPagedResponse; import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListNetworksPagedResponse; -import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListSnapshotSchedulePoliciesPagedResponse; -import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListVolumeSnapshotsPagedResponse; +import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListNfsSharesPagedResponse; import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListVolumesPagedResponse; import com.google.api.core.ApiFunction; @@ -33,6 +32,9 @@ import com.google.api.gax.grpc.GrpcTransportChannel; import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; import com.google.api.gax.longrunning.OperationSnapshot; import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; import com.google.api.gax.retrying.RetrySettings; @@ -49,46 +51,46 @@ import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest; -import com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest; -import com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest; -import com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest; +import com.google.cloud.baremetalsolution.v2.DetachLunRequest; import com.google.cloud.baremetalsolution.v2.GetInstanceRequest; import com.google.cloud.baremetalsolution.v2.GetLunRequest; import com.google.cloud.baremetalsolution.v2.GetNetworkRequest; -import com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest; +import com.google.cloud.baremetalsolution.v2.GetNfsShareRequest; import com.google.cloud.baremetalsolution.v2.GetVolumeRequest; -import com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest; import com.google.cloud.baremetalsolution.v2.Instance; import com.google.cloud.baremetalsolution.v2.ListInstancesRequest; import com.google.cloud.baremetalsolution.v2.ListInstancesResponse; import com.google.cloud.baremetalsolution.v2.ListLunsRequest; import com.google.cloud.baremetalsolution.v2.ListLunsResponse; +import com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest; +import com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse; import com.google.cloud.baremetalsolution.v2.ListNetworksRequest; import com.google.cloud.baremetalsolution.v2.ListNetworksResponse; -import com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest; -import com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse; -import com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest; -import com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse; +import com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest; +import com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse; import com.google.cloud.baremetalsolution.v2.ListVolumesRequest; import com.google.cloud.baremetalsolution.v2.ListVolumesResponse; import com.google.cloud.baremetalsolution.v2.Lun; import com.google.cloud.baremetalsolution.v2.Network; +import com.google.cloud.baremetalsolution.v2.NfsShare; import com.google.cloud.baremetalsolution.v2.OperationMetadata; import com.google.cloud.baremetalsolution.v2.ResetInstanceRequest; import com.google.cloud.baremetalsolution.v2.ResetInstanceResponse; -import com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest; -import com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy; -import com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest; +import com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest; +import com.google.cloud.baremetalsolution.v2.StartInstanceRequest; +import com.google.cloud.baremetalsolution.v2.StartInstanceResponse; +import com.google.cloud.baremetalsolution.v2.StopInstanceRequest; +import com.google.cloud.baremetalsolution.v2.StopInstanceResponse; +import com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest; +import com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest; +import com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest; import com.google.cloud.baremetalsolution.v2.UpdateVolumeRequest; import com.google.cloud.baremetalsolution.v2.Volume; -import com.google.cloud.baremetalsolution.v2.VolumeSnapshot; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; import com.google.longrunning.Operation; -import com.google.protobuf.Empty; import java.io.IOException; import java.util.List; import javax.annotation.Generated; @@ -140,49 +142,51 @@ public class BareMetalSolutionStubSettings extends StubSettings listInstancesSettings; private final UnaryCallSettings getInstanceSettings; + private final UnaryCallSettings updateInstanceSettings; + private final OperationCallSettings + updateInstanceOperationSettings; private final UnaryCallSettings resetInstanceSettings; private final OperationCallSettings< ResetInstanceRequest, ResetInstanceResponse, OperationMetadata> resetInstanceOperationSettings; + private final UnaryCallSettings startInstanceSettings; + private final OperationCallSettings< + StartInstanceRequest, StartInstanceResponse, OperationMetadata> + startInstanceOperationSettings; + private final UnaryCallSettings stopInstanceSettings; + private final OperationCallSettings + stopInstanceOperationSettings; + private final UnaryCallSettings detachLunSettings; + private final OperationCallSettings + detachLunOperationSettings; private final PagedCallSettings listVolumesSettings; private final UnaryCallSettings getVolumeSettings; private final UnaryCallSettings updateVolumeSettings; private final OperationCallSettings updateVolumeOperationSettings; + private final UnaryCallSettings resizeVolumeSettings; + private final OperationCallSettings + resizeVolumeOperationSettings; private final PagedCallSettings< ListNetworksRequest, ListNetworksResponse, ListNetworksPagedResponse> listNetworksSettings; + private final UnaryCallSettings + listNetworkUsageSettings; private final UnaryCallSettings getNetworkSettings; - private final PagedCallSettings< - ListSnapshotSchedulePoliciesRequest, - ListSnapshotSchedulePoliciesResponse, - ListSnapshotSchedulePoliciesPagedResponse> - listSnapshotSchedulePoliciesSettings; - private final UnaryCallSettings - getSnapshotSchedulePolicySettings; - private final UnaryCallSettings - createSnapshotSchedulePolicySettings; - private final UnaryCallSettings - updateSnapshotSchedulePolicySettings; - private final UnaryCallSettings - deleteSnapshotSchedulePolicySettings; - private final UnaryCallSettings - createVolumeSnapshotSettings; - private final UnaryCallSettings - restoreVolumeSnapshotSettings; - private final OperationCallSettings< - RestoreVolumeSnapshotRequest, VolumeSnapshot, OperationMetadata> - restoreVolumeSnapshotOperationSettings; - private final UnaryCallSettings deleteVolumeSnapshotSettings; - private final UnaryCallSettings - getVolumeSnapshotSettings; - private final PagedCallSettings< - ListVolumeSnapshotsRequest, ListVolumeSnapshotsResponse, ListVolumeSnapshotsPagedResponse> - listVolumeSnapshotsSettings; + private final UnaryCallSettings updateNetworkSettings; + private final OperationCallSettings + updateNetworkOperationSettings; private final UnaryCallSettings getLunSettings; private final PagedCallSettings listLunsSettings; + private final UnaryCallSettings getNfsShareSettings; + private final PagedCallSettings< + ListNfsSharesRequest, ListNfsSharesResponse, ListNfsSharesPagedResponse> + listNfsSharesSettings; + private final UnaryCallSettings updateNfsShareSettings; + private final OperationCallSettings + updateNfsShareOperationSettings; private static final PagedListDescriptor LIST_INSTANCES_PAGE_STR_DESC = @@ -292,128 +296,75 @@ public Iterable extractResources(ListNetworksResponse payload) { } }; - private static final PagedListDescriptor< - ListSnapshotSchedulePoliciesRequest, - ListSnapshotSchedulePoliciesResponse, - SnapshotSchedulePolicy> - LIST_SNAPSHOT_SCHEDULE_POLICIES_PAGE_STR_DESC = - new PagedListDescriptor< - ListSnapshotSchedulePoliciesRequest, - ListSnapshotSchedulePoliciesResponse, - SnapshotSchedulePolicy>() { + private static final PagedListDescriptor + LIST_LUNS_PAGE_STR_DESC = + new PagedListDescriptor() { @Override public String emptyToken() { return ""; } @Override - public ListSnapshotSchedulePoliciesRequest injectToken( - ListSnapshotSchedulePoliciesRequest payload, String token) { - return ListSnapshotSchedulePoliciesRequest.newBuilder(payload) - .setPageToken(token) - .build(); + public ListLunsRequest injectToken(ListLunsRequest payload, String token) { + return ListLunsRequest.newBuilder(payload).setPageToken(token).build(); } @Override - public ListSnapshotSchedulePoliciesRequest injectPageSize( - ListSnapshotSchedulePoliciesRequest payload, int pageSize) { - return ListSnapshotSchedulePoliciesRequest.newBuilder(payload) - .setPageSize(pageSize) - .build(); + public ListLunsRequest injectPageSize(ListLunsRequest payload, int pageSize) { + return ListLunsRequest.newBuilder(payload).setPageSize(pageSize).build(); } @Override - public Integer extractPageSize(ListSnapshotSchedulePoliciesRequest payload) { + public Integer extractPageSize(ListLunsRequest payload) { return payload.getPageSize(); } @Override - public String extractNextToken(ListSnapshotSchedulePoliciesResponse payload) { + public String extractNextToken(ListLunsResponse payload) { return payload.getNextPageToken(); } @Override - public Iterable extractResources( - ListSnapshotSchedulePoliciesResponse payload) { - return payload.getSnapshotSchedulePoliciesList() == null - ? ImmutableList.of() - : payload.getSnapshotSchedulePoliciesList(); + public Iterable extractResources(ListLunsResponse payload) { + return payload.getLunsList() == null + ? ImmutableList.of() + : payload.getLunsList(); } }; - private static final PagedListDescriptor< - ListVolumeSnapshotsRequest, ListVolumeSnapshotsResponse, VolumeSnapshot> - LIST_VOLUME_SNAPSHOTS_PAGE_STR_DESC = - new PagedListDescriptor< - ListVolumeSnapshotsRequest, ListVolumeSnapshotsResponse, VolumeSnapshot>() { + private static final PagedListDescriptor + LIST_NFS_SHARES_PAGE_STR_DESC = + new PagedListDescriptor() { @Override public String emptyToken() { return ""; } @Override - public ListVolumeSnapshotsRequest injectToken( - ListVolumeSnapshotsRequest payload, String token) { - return ListVolumeSnapshotsRequest.newBuilder(payload).setPageToken(token).build(); + public ListNfsSharesRequest injectToken(ListNfsSharesRequest payload, String token) { + return ListNfsSharesRequest.newBuilder(payload).setPageToken(token).build(); } @Override - public ListVolumeSnapshotsRequest injectPageSize( - ListVolumeSnapshotsRequest payload, int pageSize) { - return ListVolumeSnapshotsRequest.newBuilder(payload).setPageSize(pageSize).build(); + public ListNfsSharesRequest injectPageSize(ListNfsSharesRequest payload, int pageSize) { + return ListNfsSharesRequest.newBuilder(payload).setPageSize(pageSize).build(); } @Override - public Integer extractPageSize(ListVolumeSnapshotsRequest payload) { + public Integer extractPageSize(ListNfsSharesRequest payload) { return payload.getPageSize(); } @Override - public String extractNextToken(ListVolumeSnapshotsResponse payload) { + public String extractNextToken(ListNfsSharesResponse payload) { return payload.getNextPageToken(); } @Override - public Iterable extractResources(ListVolumeSnapshotsResponse payload) { - return payload.getVolumeSnapshotsList() == null - ? ImmutableList.of() - : payload.getVolumeSnapshotsList(); - } - }; - - private static final PagedListDescriptor - LIST_LUNS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListLunsRequest injectToken(ListLunsRequest payload, String token) { - return ListLunsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListLunsRequest injectPageSize(ListLunsRequest payload, int pageSize) { - return ListLunsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListLunsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListLunsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListLunsResponse payload) { - return payload.getLunsList() == null - ? ImmutableList.of() - : payload.getLunsList(); + public Iterable extractResources(ListNfsSharesResponse payload) { + return payload.getNfsSharesList() == null + ? ImmutableList.of() + : payload.getNfsSharesList(); } }; @@ -468,59 +419,6 @@ public ApiFuture getFuturePagedResponse( } }; - private static final PagedListResponseFactory< - ListSnapshotSchedulePoliciesRequest, - ListSnapshotSchedulePoliciesResponse, - ListSnapshotSchedulePoliciesPagedResponse> - LIST_SNAPSHOT_SCHEDULE_POLICIES_PAGE_STR_FACT = - new PagedListResponseFactory< - ListSnapshotSchedulePoliciesRequest, - ListSnapshotSchedulePoliciesResponse, - ListSnapshotSchedulePoliciesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable< - ListSnapshotSchedulePoliciesRequest, ListSnapshotSchedulePoliciesResponse> - callable, - ListSnapshotSchedulePoliciesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext< - ListSnapshotSchedulePoliciesRequest, - ListSnapshotSchedulePoliciesResponse, - SnapshotSchedulePolicy> - pageContext = - PageContext.create( - callable, - LIST_SNAPSHOT_SCHEDULE_POLICIES_PAGE_STR_DESC, - request, - context); - return ListSnapshotSchedulePoliciesPagedResponse.createAsync( - pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListVolumeSnapshotsRequest, ListVolumeSnapshotsResponse, ListVolumeSnapshotsPagedResponse> - LIST_VOLUME_SNAPSHOTS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListVolumeSnapshotsRequest, - ListVolumeSnapshotsResponse, - ListVolumeSnapshotsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListVolumeSnapshotsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext - pageContext = - PageContext.create( - callable, LIST_VOLUME_SNAPSHOTS_PAGE_STR_DESC, request, context); - return ListVolumeSnapshotsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - private static final PagedListResponseFactory< ListLunsRequest, ListLunsResponse, ListLunsPagedResponse> LIST_LUNS_PAGE_STR_FACT = @@ -537,6 +435,23 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListNfsSharesRequest, ListNfsSharesResponse, ListNfsSharesPagedResponse> + LIST_NFS_SHARES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListNfsSharesRequest, ListNfsSharesResponse, ListNfsSharesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListNfsSharesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_NFS_SHARES_PAGE_STR_DESC, request, context); + return ListNfsSharesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + /** Returns the object with the settings used for calls to listInstances. */ public PagedCallSettings listInstancesSettings() { @@ -548,6 +463,17 @@ public UnaryCallSettings getInstanceSettings() { return getInstanceSettings; } + /** Returns the object with the settings used for calls to updateInstance. */ + public UnaryCallSettings updateInstanceSettings() { + return updateInstanceSettings; + } + + /** Returns the object with the settings used for calls to updateInstance. */ + public OperationCallSettings + updateInstanceOperationSettings() { + return updateInstanceOperationSettings; + } + /** Returns the object with the settings used for calls to resetInstance. */ public UnaryCallSettings resetInstanceSettings() { return resetInstanceSettings; @@ -559,6 +485,39 @@ public UnaryCallSettings resetInstanceSettings( return resetInstanceOperationSettings; } + /** Returns the object with the settings used for calls to startInstance. */ + public UnaryCallSettings startInstanceSettings() { + return startInstanceSettings; + } + + /** Returns the object with the settings used for calls to startInstance. */ + public OperationCallSettings + startInstanceOperationSettings() { + return startInstanceOperationSettings; + } + + /** Returns the object with the settings used for calls to stopInstance. */ + public UnaryCallSettings stopInstanceSettings() { + return stopInstanceSettings; + } + + /** Returns the object with the settings used for calls to stopInstance. */ + public OperationCallSettings + stopInstanceOperationSettings() { + return stopInstanceOperationSettings; + } + + /** Returns the object with the settings used for calls to detachLun. */ + public UnaryCallSettings detachLunSettings() { + return detachLunSettings; + } + + /** Returns the object with the settings used for calls to detachLun. */ + public OperationCallSettings + detachLunOperationSettings() { + return detachLunOperationSettings; + } + /** Returns the object with the settings used for calls to listVolumes. */ public PagedCallSettings listVolumesSettings() { @@ -581,94 +540,76 @@ public UnaryCallSettings updateVolumeSettings() return updateVolumeOperationSettings; } + /** Returns the object with the settings used for calls to resizeVolume. */ + public UnaryCallSettings resizeVolumeSettings() { + return resizeVolumeSettings; + } + + /** Returns the object with the settings used for calls to resizeVolume. */ + public OperationCallSettings + resizeVolumeOperationSettings() { + return resizeVolumeOperationSettings; + } + /** Returns the object with the settings used for calls to listNetworks. */ public PagedCallSettings listNetworksSettings() { return listNetworksSettings; } + /** Returns the object with the settings used for calls to listNetworkUsage. */ + public UnaryCallSettings + listNetworkUsageSettings() { + return listNetworkUsageSettings; + } + /** Returns the object with the settings used for calls to getNetwork. */ public UnaryCallSettings getNetworkSettings() { return getNetworkSettings; } - /** Returns the object with the settings used for calls to listSnapshotSchedulePolicies. */ - public PagedCallSettings< - ListSnapshotSchedulePoliciesRequest, - ListSnapshotSchedulePoliciesResponse, - ListSnapshotSchedulePoliciesPagedResponse> - listSnapshotSchedulePoliciesSettings() { - return listSnapshotSchedulePoliciesSettings; - } - - /** Returns the object with the settings used for calls to getSnapshotSchedulePolicy. */ - public UnaryCallSettings - getSnapshotSchedulePolicySettings() { - return getSnapshotSchedulePolicySettings; - } - - /** Returns the object with the settings used for calls to createSnapshotSchedulePolicy. */ - public UnaryCallSettings - createSnapshotSchedulePolicySettings() { - return createSnapshotSchedulePolicySettings; - } - - /** Returns the object with the settings used for calls to updateSnapshotSchedulePolicy. */ - public UnaryCallSettings - updateSnapshotSchedulePolicySettings() { - return updateSnapshotSchedulePolicySettings; + /** Returns the object with the settings used for calls to updateNetwork. */ + public UnaryCallSettings updateNetworkSettings() { + return updateNetworkSettings; } - /** Returns the object with the settings used for calls to deleteSnapshotSchedulePolicy. */ - public UnaryCallSettings - deleteSnapshotSchedulePolicySettings() { - return deleteSnapshotSchedulePolicySettings; + /** Returns the object with the settings used for calls to updateNetwork. */ + public OperationCallSettings + updateNetworkOperationSettings() { + return updateNetworkOperationSettings; } - /** Returns the object with the settings used for calls to createVolumeSnapshot. */ - public UnaryCallSettings - createVolumeSnapshotSettings() { - return createVolumeSnapshotSettings; + /** Returns the object with the settings used for calls to getLun. */ + public UnaryCallSettings getLunSettings() { + return getLunSettings; } - /** Returns the object with the settings used for calls to restoreVolumeSnapshot. */ - public UnaryCallSettings - restoreVolumeSnapshotSettings() { - return restoreVolumeSnapshotSettings; + /** Returns the object with the settings used for calls to listLuns. */ + public PagedCallSettings + listLunsSettings() { + return listLunsSettings; } - /** Returns the object with the settings used for calls to restoreVolumeSnapshot. */ - public OperationCallSettings - restoreVolumeSnapshotOperationSettings() { - return restoreVolumeSnapshotOperationSettings; + /** Returns the object with the settings used for calls to getNfsShare. */ + public UnaryCallSettings getNfsShareSettings() { + return getNfsShareSettings; } - /** Returns the object with the settings used for calls to deleteVolumeSnapshot. */ - public UnaryCallSettings deleteVolumeSnapshotSettings() { - return deleteVolumeSnapshotSettings; + /** Returns the object with the settings used for calls to listNfsShares. */ + public PagedCallSettings + listNfsSharesSettings() { + return listNfsSharesSettings; } - /** Returns the object with the settings used for calls to getVolumeSnapshot. */ - public UnaryCallSettings getVolumeSnapshotSettings() { - return getVolumeSnapshotSettings; + /** Returns the object with the settings used for calls to updateNfsShare. */ + public UnaryCallSettings updateNfsShareSettings() { + return updateNfsShareSettings; } - /** Returns the object with the settings used for calls to listVolumeSnapshots. */ - public PagedCallSettings< - ListVolumeSnapshotsRequest, ListVolumeSnapshotsResponse, ListVolumeSnapshotsPagedResponse> - listVolumeSnapshotsSettings() { - return listVolumeSnapshotsSettings; - } - - /** Returns the object with the settings used for calls to getLun. */ - public UnaryCallSettings getLunSettings() { - return getLunSettings; - } - - /** Returns the object with the settings used for calls to listLuns. */ - public PagedCallSettings - listLunsSettings() { - return listLunsSettings; + /** Returns the object with the settings used for calls to updateNfsShare. */ + public OperationCallSettings + updateNfsShareOperationSettings() { + return updateNfsShareOperationSettings; } public BareMetalSolutionStub createStub() throws IOException { @@ -677,6 +618,11 @@ public BareMetalSolutionStub createStub() throws IOException { .equals(GrpcTransportChannel.getGrpcTransportName())) { return GrpcBareMetalSolutionStub.create(this); } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonBareMetalSolutionStub.create(this); + } throw new UnsupportedOperationException( String.format( "Transport not supported: %s", getTransportChannelProvider().getTransportName())); @@ -709,18 +655,25 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde .setUseJwtAccessWithScope(true); } - /** Returns a builder for the default ChannelProvider for this service. */ + /** Returns a builder for the default gRPC ChannelProvider for this service. */ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { return InstantiatingGrpcChannelProvider.newBuilder() .setMaxInboundMessageSize(Integer.MAX_VALUE); } + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + public static TransportChannelProvider defaultTransportChannelProvider() { return defaultGrpcTransportProviderBuilder().build(); } @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { return ApiClientHeaderProvider.newBuilder() .setGeneratedLibToken( "gapic", GaxProperties.getLibraryVersion(BareMetalSolutionStubSettings.class)) @@ -728,11 +681,30 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); } - /** Returns a new builder for this class. */ + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(BareMetalSolutionStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return BareMetalSolutionStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ public static Builder newBuilder() { return Builder.createDefault(); } + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + /** Returns a new builder for this class. */ public static Builder newBuilder(ClientContext clientContext) { return new Builder(clientContext); @@ -748,32 +720,33 @@ protected BareMetalSolutionStubSettings(Builder settingsBuilder) throws IOExcept listInstancesSettings = settingsBuilder.listInstancesSettings().build(); getInstanceSettings = settingsBuilder.getInstanceSettings().build(); + updateInstanceSettings = settingsBuilder.updateInstanceSettings().build(); + updateInstanceOperationSettings = settingsBuilder.updateInstanceOperationSettings().build(); resetInstanceSettings = settingsBuilder.resetInstanceSettings().build(); resetInstanceOperationSettings = settingsBuilder.resetInstanceOperationSettings().build(); + startInstanceSettings = settingsBuilder.startInstanceSettings().build(); + startInstanceOperationSettings = settingsBuilder.startInstanceOperationSettings().build(); + stopInstanceSettings = settingsBuilder.stopInstanceSettings().build(); + stopInstanceOperationSettings = settingsBuilder.stopInstanceOperationSettings().build(); + detachLunSettings = settingsBuilder.detachLunSettings().build(); + detachLunOperationSettings = settingsBuilder.detachLunOperationSettings().build(); listVolumesSettings = settingsBuilder.listVolumesSettings().build(); getVolumeSettings = settingsBuilder.getVolumeSettings().build(); updateVolumeSettings = settingsBuilder.updateVolumeSettings().build(); updateVolumeOperationSettings = settingsBuilder.updateVolumeOperationSettings().build(); + resizeVolumeSettings = settingsBuilder.resizeVolumeSettings().build(); + resizeVolumeOperationSettings = settingsBuilder.resizeVolumeOperationSettings().build(); listNetworksSettings = settingsBuilder.listNetworksSettings().build(); + listNetworkUsageSettings = settingsBuilder.listNetworkUsageSettings().build(); getNetworkSettings = settingsBuilder.getNetworkSettings().build(); - listSnapshotSchedulePoliciesSettings = - settingsBuilder.listSnapshotSchedulePoliciesSettings().build(); - getSnapshotSchedulePolicySettings = settingsBuilder.getSnapshotSchedulePolicySettings().build(); - createSnapshotSchedulePolicySettings = - settingsBuilder.createSnapshotSchedulePolicySettings().build(); - updateSnapshotSchedulePolicySettings = - settingsBuilder.updateSnapshotSchedulePolicySettings().build(); - deleteSnapshotSchedulePolicySettings = - settingsBuilder.deleteSnapshotSchedulePolicySettings().build(); - createVolumeSnapshotSettings = settingsBuilder.createVolumeSnapshotSettings().build(); - restoreVolumeSnapshotSettings = settingsBuilder.restoreVolumeSnapshotSettings().build(); - restoreVolumeSnapshotOperationSettings = - settingsBuilder.restoreVolumeSnapshotOperationSettings().build(); - deleteVolumeSnapshotSettings = settingsBuilder.deleteVolumeSnapshotSettings().build(); - getVolumeSnapshotSettings = settingsBuilder.getVolumeSnapshotSettings().build(); - listVolumeSnapshotsSettings = settingsBuilder.listVolumeSnapshotsSettings().build(); + updateNetworkSettings = settingsBuilder.updateNetworkSettings().build(); + updateNetworkOperationSettings = settingsBuilder.updateNetworkOperationSettings().build(); getLunSettings = settingsBuilder.getLunSettings().build(); listLunsSettings = settingsBuilder.listLunsSettings().build(); + getNfsShareSettings = settingsBuilder.getNfsShareSettings().build(); + listNfsSharesSettings = settingsBuilder.listNfsSharesSettings().build(); + updateNfsShareSettings = settingsBuilder.updateNfsShareSettings().build(); + updateNfsShareOperationSettings = settingsBuilder.updateNfsShareOperationSettings().build(); } /** Builder for BareMetalSolutionStubSettings. */ @@ -783,10 +756,25 @@ public static class Builder extends StubSettings.Builder listInstancesSettings; private final UnaryCallSettings.Builder getInstanceSettings; + private final UnaryCallSettings.Builder + updateInstanceSettings; + private final OperationCallSettings.Builder + updateInstanceOperationSettings; private final UnaryCallSettings.Builder resetInstanceSettings; private final OperationCallSettings.Builder< ResetInstanceRequest, ResetInstanceResponse, OperationMetadata> resetInstanceOperationSettings; + private final UnaryCallSettings.Builder startInstanceSettings; + private final OperationCallSettings.Builder< + StartInstanceRequest, StartInstanceResponse, OperationMetadata> + startInstanceOperationSettings; + private final UnaryCallSettings.Builder stopInstanceSettings; + private final OperationCallSettings.Builder< + StopInstanceRequest, StopInstanceResponse, OperationMetadata> + stopInstanceOperationSettings; + private final UnaryCallSettings.Builder detachLunSettings; + private final OperationCallSettings.Builder + detachLunOperationSettings; private final PagedCallSettings.Builder< ListVolumesRequest, ListVolumesResponse, ListVolumesPagedResponse> listVolumesSettings; @@ -794,46 +782,30 @@ public static class Builder extends StubSettings.Builder updateVolumeSettings; private final OperationCallSettings.Builder updateVolumeOperationSettings; + private final UnaryCallSettings.Builder resizeVolumeSettings; + private final OperationCallSettings.Builder + resizeVolumeOperationSettings; private final PagedCallSettings.Builder< ListNetworksRequest, ListNetworksResponse, ListNetworksPagedResponse> listNetworksSettings; + private final UnaryCallSettings.Builder + listNetworkUsageSettings; private final UnaryCallSettings.Builder getNetworkSettings; - private final PagedCallSettings.Builder< - ListSnapshotSchedulePoliciesRequest, - ListSnapshotSchedulePoliciesResponse, - ListSnapshotSchedulePoliciesPagedResponse> - listSnapshotSchedulePoliciesSettings; - private final UnaryCallSettings.Builder< - GetSnapshotSchedulePolicyRequest, SnapshotSchedulePolicy> - getSnapshotSchedulePolicySettings; - private final UnaryCallSettings.Builder< - CreateSnapshotSchedulePolicyRequest, SnapshotSchedulePolicy> - createSnapshotSchedulePolicySettings; - private final UnaryCallSettings.Builder< - UpdateSnapshotSchedulePolicyRequest, SnapshotSchedulePolicy> - updateSnapshotSchedulePolicySettings; - private final UnaryCallSettings.Builder - deleteSnapshotSchedulePolicySettings; - private final UnaryCallSettings.Builder - createVolumeSnapshotSettings; - private final UnaryCallSettings.Builder - restoreVolumeSnapshotSettings; - private final OperationCallSettings.Builder< - RestoreVolumeSnapshotRequest, VolumeSnapshot, OperationMetadata> - restoreVolumeSnapshotOperationSettings; - private final UnaryCallSettings.Builder - deleteVolumeSnapshotSettings; - private final UnaryCallSettings.Builder - getVolumeSnapshotSettings; - private final PagedCallSettings.Builder< - ListVolumeSnapshotsRequest, - ListVolumeSnapshotsResponse, - ListVolumeSnapshotsPagedResponse> - listVolumeSnapshotsSettings; + private final UnaryCallSettings.Builder updateNetworkSettings; + private final OperationCallSettings.Builder + updateNetworkOperationSettings; private final UnaryCallSettings.Builder getLunSettings; private final PagedCallSettings.Builder< ListLunsRequest, ListLunsResponse, ListLunsPagedResponse> listLunsSettings; + private final UnaryCallSettings.Builder getNfsShareSettings; + private final PagedCallSettings.Builder< + ListNfsSharesRequest, ListNfsSharesResponse, ListNfsSharesPagedResponse> + listNfsSharesSettings; + private final UnaryCallSettings.Builder + updateNfsShareSettings; + private final OperationCallSettings.Builder + updateNfsShareOperationSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -870,52 +842,56 @@ protected Builder(ClientContext clientContext) { listInstancesSettings = PagedCallSettings.newBuilder(LIST_INSTANCES_PAGE_STR_FACT); getInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateInstanceOperationSettings = OperationCallSettings.newBuilder(); resetInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); resetInstanceOperationSettings = OperationCallSettings.newBuilder(); + startInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + startInstanceOperationSettings = OperationCallSettings.newBuilder(); + stopInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + stopInstanceOperationSettings = OperationCallSettings.newBuilder(); + detachLunSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + detachLunOperationSettings = OperationCallSettings.newBuilder(); listVolumesSettings = PagedCallSettings.newBuilder(LIST_VOLUMES_PAGE_STR_FACT); getVolumeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); updateVolumeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); updateVolumeOperationSettings = OperationCallSettings.newBuilder(); + resizeVolumeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + resizeVolumeOperationSettings = OperationCallSettings.newBuilder(); listNetworksSettings = PagedCallSettings.newBuilder(LIST_NETWORKS_PAGE_STR_FACT); + listNetworkUsageSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); getNetworkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listSnapshotSchedulePoliciesSettings = - PagedCallSettings.newBuilder(LIST_SNAPSHOT_SCHEDULE_POLICIES_PAGE_STR_FACT); - getSnapshotSchedulePolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createSnapshotSchedulePolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateSnapshotSchedulePolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteSnapshotSchedulePolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createVolumeSnapshotSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - restoreVolumeSnapshotSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - restoreVolumeSnapshotOperationSettings = OperationCallSettings.newBuilder(); - deleteVolumeSnapshotSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getVolumeSnapshotSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listVolumeSnapshotsSettings = - PagedCallSettings.newBuilder(LIST_VOLUME_SNAPSHOTS_PAGE_STR_FACT); + updateNetworkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateNetworkOperationSettings = OperationCallSettings.newBuilder(); getLunSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listLunsSettings = PagedCallSettings.newBuilder(LIST_LUNS_PAGE_STR_FACT); + getNfsShareSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listNfsSharesSettings = PagedCallSettings.newBuilder(LIST_NFS_SHARES_PAGE_STR_FACT); + updateNfsShareSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateNfsShareOperationSettings = OperationCallSettings.newBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( listInstancesSettings, getInstanceSettings, + updateInstanceSettings, resetInstanceSettings, + startInstanceSettings, + stopInstanceSettings, + detachLunSettings, listVolumesSettings, getVolumeSettings, updateVolumeSettings, + resizeVolumeSettings, listNetworksSettings, + listNetworkUsageSettings, getNetworkSettings, - listSnapshotSchedulePoliciesSettings, - getSnapshotSchedulePolicySettings, - createSnapshotSchedulePolicySettings, - updateSnapshotSchedulePolicySettings, - deleteSnapshotSchedulePolicySettings, - createVolumeSnapshotSettings, - restoreVolumeSnapshotSettings, - deleteVolumeSnapshotSettings, - getVolumeSnapshotSettings, - listVolumeSnapshotsSettings, + updateNetworkSettings, getLunSettings, - listLunsSettings); + listLunsSettings, + getNfsShareSettings, + listNfsSharesSettings, + updateNfsShareSettings); initDefaults(this); } @@ -924,55 +900,56 @@ protected Builder(BareMetalSolutionStubSettings settings) { listInstancesSettings = settings.listInstancesSettings.toBuilder(); getInstanceSettings = settings.getInstanceSettings.toBuilder(); + updateInstanceSettings = settings.updateInstanceSettings.toBuilder(); + updateInstanceOperationSettings = settings.updateInstanceOperationSettings.toBuilder(); resetInstanceSettings = settings.resetInstanceSettings.toBuilder(); resetInstanceOperationSettings = settings.resetInstanceOperationSettings.toBuilder(); + startInstanceSettings = settings.startInstanceSettings.toBuilder(); + startInstanceOperationSettings = settings.startInstanceOperationSettings.toBuilder(); + stopInstanceSettings = settings.stopInstanceSettings.toBuilder(); + stopInstanceOperationSettings = settings.stopInstanceOperationSettings.toBuilder(); + detachLunSettings = settings.detachLunSettings.toBuilder(); + detachLunOperationSettings = settings.detachLunOperationSettings.toBuilder(); listVolumesSettings = settings.listVolumesSettings.toBuilder(); getVolumeSettings = settings.getVolumeSettings.toBuilder(); updateVolumeSettings = settings.updateVolumeSettings.toBuilder(); updateVolumeOperationSettings = settings.updateVolumeOperationSettings.toBuilder(); + resizeVolumeSettings = settings.resizeVolumeSettings.toBuilder(); + resizeVolumeOperationSettings = settings.resizeVolumeOperationSettings.toBuilder(); listNetworksSettings = settings.listNetworksSettings.toBuilder(); + listNetworkUsageSettings = settings.listNetworkUsageSettings.toBuilder(); getNetworkSettings = settings.getNetworkSettings.toBuilder(); - listSnapshotSchedulePoliciesSettings = - settings.listSnapshotSchedulePoliciesSettings.toBuilder(); - getSnapshotSchedulePolicySettings = settings.getSnapshotSchedulePolicySettings.toBuilder(); - createSnapshotSchedulePolicySettings = - settings.createSnapshotSchedulePolicySettings.toBuilder(); - updateSnapshotSchedulePolicySettings = - settings.updateSnapshotSchedulePolicySettings.toBuilder(); - deleteSnapshotSchedulePolicySettings = - settings.deleteSnapshotSchedulePolicySettings.toBuilder(); - createVolumeSnapshotSettings = settings.createVolumeSnapshotSettings.toBuilder(); - restoreVolumeSnapshotSettings = settings.restoreVolumeSnapshotSettings.toBuilder(); - restoreVolumeSnapshotOperationSettings = - settings.restoreVolumeSnapshotOperationSettings.toBuilder(); - deleteVolumeSnapshotSettings = settings.deleteVolumeSnapshotSettings.toBuilder(); - getVolumeSnapshotSettings = settings.getVolumeSnapshotSettings.toBuilder(); - listVolumeSnapshotsSettings = settings.listVolumeSnapshotsSettings.toBuilder(); + updateNetworkSettings = settings.updateNetworkSettings.toBuilder(); + updateNetworkOperationSettings = settings.updateNetworkOperationSettings.toBuilder(); getLunSettings = settings.getLunSettings.toBuilder(); listLunsSettings = settings.listLunsSettings.toBuilder(); + getNfsShareSettings = settings.getNfsShareSettings.toBuilder(); + listNfsSharesSettings = settings.listNfsSharesSettings.toBuilder(); + updateNfsShareSettings = settings.updateNfsShareSettings.toBuilder(); + updateNfsShareOperationSettings = settings.updateNfsShareOperationSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( listInstancesSettings, getInstanceSettings, + updateInstanceSettings, resetInstanceSettings, + startInstanceSettings, + stopInstanceSettings, + detachLunSettings, listVolumesSettings, getVolumeSettings, updateVolumeSettings, + resizeVolumeSettings, listNetworksSettings, + listNetworkUsageSettings, getNetworkSettings, - listSnapshotSchedulePoliciesSettings, - getSnapshotSchedulePolicySettings, - createSnapshotSchedulePolicySettings, - updateSnapshotSchedulePolicySettings, - deleteSnapshotSchedulePolicySettings, - createVolumeSnapshotSettings, - restoreVolumeSnapshotSettings, - deleteVolumeSnapshotSettings, - getVolumeSnapshotSettings, - listVolumeSnapshotsSettings, + updateNetworkSettings, getLunSettings, - listLunsSettings); + listLunsSettings, + getNfsShareSettings, + listNfsSharesSettings, + updateNfsShareSettings); } private static Builder createDefault() { @@ -988,6 +965,19 @@ private static Builder createDefault() { return initDefaults(builder); } + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + private static Builder initDefaults(Builder builder) { builder .listInstancesSettings() @@ -1000,95 +990,119 @@ private static Builder initDefaults(Builder builder) { .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); builder - .resetInstanceSettings() + .updateInstanceSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); builder - .listVolumesSettings() + .resetInstanceSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); builder - .getVolumeSettings() + .startInstanceSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); builder - .updateVolumeSettings() + .stopInstanceSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); builder - .listNetworksSettings() + .detachLunSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); builder - .getNetworkSettings() + .listVolumesSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); builder - .listSnapshotSchedulePoliciesSettings() + .getVolumeSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); builder - .getSnapshotSchedulePolicySettings() + .updateVolumeSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); builder - .createSnapshotSchedulePolicySettings() + .resizeVolumeSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); builder - .updateSnapshotSchedulePolicySettings() + .listNetworksSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); builder - .deleteSnapshotSchedulePolicySettings() + .listNetworkUsageSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); builder - .createVolumeSnapshotSettings() + .getNetworkSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); builder - .restoreVolumeSnapshotSettings() + .updateNetworkSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); builder - .deleteVolumeSnapshotSettings() + .getLunSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); builder - .getVolumeSnapshotSettings() + .listLunsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); builder - .listVolumeSnapshotsSettings() + .getNfsShareSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); builder - .getLunSettings() + .listNfsSharesSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); builder - .listLunsSettings() + .updateNfsShareSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + builder + .updateInstanceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + builder .resetInstanceOperationSettings() .setInitialCallSettings( @@ -1113,6 +1127,77 @@ private static Builder initDefaults(Builder builder) { .setTotalTimeout(Duration.ofMillis(300000L)) .build())); + builder + .startInstanceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(StartInstanceResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .stopInstanceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(StopInstanceResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .detachLunOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + builder .updateVolumeOperationSettings() .setInitialCallSettings( @@ -1138,15 +1223,63 @@ private static Builder initDefaults(Builder builder) { .build())); builder - .restoreVolumeSnapshotOperationSettings() + .resizeVolumeOperationSettings() .setInitialCallSettings( UnaryCallSettings - .newUnaryCallSettingsBuilder() + .newUnaryCallSettingsBuilder() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) .build()) .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(VolumeSnapshot.class)) + ProtoOperationTransformers.ResponseTransformer.create(Volume.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateNetworkOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Network.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateNfsShareOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(NfsShare.class)) .setMetadataTransformer( ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) .setPollingAlgorithm( @@ -1191,6 +1324,19 @@ public UnaryCallSettings.Builder getInstanceSettin return getInstanceSettings; } + /** Returns the builder for the settings used for calls to updateInstance. */ + public UnaryCallSettings.Builder updateInstanceSettings() { + return updateInstanceSettings; + } + + /** Returns the builder for the settings used for calls to updateInstance. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateInstanceOperationSettings() { + return updateInstanceOperationSettings; + } + /** Returns the builder for the settings used for calls to resetInstance. */ public UnaryCallSettings.Builder resetInstanceSettings() { return resetInstanceSettings; @@ -1205,6 +1351,47 @@ public UnaryCallSettings.Builder resetInstanceS return resetInstanceOperationSettings; } + /** Returns the builder for the settings used for calls to startInstance. */ + public UnaryCallSettings.Builder startInstanceSettings() { + return startInstanceSettings; + } + + /** Returns the builder for the settings used for calls to startInstance. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + StartInstanceRequest, StartInstanceResponse, OperationMetadata> + startInstanceOperationSettings() { + return startInstanceOperationSettings; + } + + /** Returns the builder for the settings used for calls to stopInstance. */ + public UnaryCallSettings.Builder stopInstanceSettings() { + return stopInstanceSettings; + } + + /** Returns the builder for the settings used for calls to stopInstance. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + StopInstanceRequest, StopInstanceResponse, OperationMetadata> + stopInstanceOperationSettings() { + return stopInstanceOperationSettings; + } + + /** Returns the builder for the settings used for calls to detachLun. */ + public UnaryCallSettings.Builder detachLunSettings() { + return detachLunSettings; + } + + /** Returns the builder for the settings used for calls to detachLun. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + detachLunOperationSettings() { + return detachLunOperationSettings; + } + /** Returns the builder for the settings used for calls to listVolumes. */ public PagedCallSettings.Builder< ListVolumesRequest, ListVolumesResponse, ListVolumesPagedResponse> @@ -1230,6 +1417,19 @@ public UnaryCallSettings.Builder updateVolumeSet return updateVolumeOperationSettings; } + /** Returns the builder for the settings used for calls to resizeVolume. */ + public UnaryCallSettings.Builder resizeVolumeSettings() { + return resizeVolumeSettings; + } + + /** Returns the builder for the settings used for calls to resizeVolume. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + resizeVolumeOperationSettings() { + return resizeVolumeOperationSettings; + } + /** Returns the builder for the settings used for calls to listNetworks. */ public PagedCallSettings.Builder< ListNetworksRequest, ListNetworksResponse, ListNetworksPagedResponse> @@ -1237,95 +1437,64 @@ public UnaryCallSettings.Builder updateVolumeSet return listNetworksSettings; } + /** Returns the builder for the settings used for calls to listNetworkUsage. */ + public UnaryCallSettings.Builder + listNetworkUsageSettings() { + return listNetworkUsageSettings; + } + /** Returns the builder for the settings used for calls to getNetwork. */ public UnaryCallSettings.Builder getNetworkSettings() { return getNetworkSettings; } - /** Returns the builder for the settings used for calls to listSnapshotSchedulePolicies. */ - public PagedCallSettings.Builder< - ListSnapshotSchedulePoliciesRequest, - ListSnapshotSchedulePoliciesResponse, - ListSnapshotSchedulePoliciesPagedResponse> - listSnapshotSchedulePoliciesSettings() { - return listSnapshotSchedulePoliciesSettings; + /** Returns the builder for the settings used for calls to updateNetwork. */ + public UnaryCallSettings.Builder updateNetworkSettings() { + return updateNetworkSettings; } - /** Returns the builder for the settings used for calls to getSnapshotSchedulePolicy. */ - public UnaryCallSettings.Builder - getSnapshotSchedulePolicySettings() { - return getSnapshotSchedulePolicySettings; + /** Returns the builder for the settings used for calls to updateNetwork. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateNetworkOperationSettings() { + return updateNetworkOperationSettings; } - /** Returns the builder for the settings used for calls to createSnapshotSchedulePolicy. */ - public UnaryCallSettings.Builder - createSnapshotSchedulePolicySettings() { - return createSnapshotSchedulePolicySettings; + /** Returns the builder for the settings used for calls to getLun. */ + public UnaryCallSettings.Builder getLunSettings() { + return getLunSettings; } - /** Returns the builder for the settings used for calls to updateSnapshotSchedulePolicy. */ - public UnaryCallSettings.Builder - updateSnapshotSchedulePolicySettings() { - return updateSnapshotSchedulePolicySettings; + /** Returns the builder for the settings used for calls to listLuns. */ + public PagedCallSettings.Builder + listLunsSettings() { + return listLunsSettings; } - /** Returns the builder for the settings used for calls to deleteSnapshotSchedulePolicy. */ - public UnaryCallSettings.Builder - deleteSnapshotSchedulePolicySettings() { - return deleteSnapshotSchedulePolicySettings; + /** Returns the builder for the settings used for calls to getNfsShare. */ + public UnaryCallSettings.Builder getNfsShareSettings() { + return getNfsShareSettings; } - /** Returns the builder for the settings used for calls to createVolumeSnapshot. */ - public UnaryCallSettings.Builder - createVolumeSnapshotSettings() { - return createVolumeSnapshotSettings; + /** Returns the builder for the settings used for calls to listNfsShares. */ + public PagedCallSettings.Builder< + ListNfsSharesRequest, ListNfsSharesResponse, ListNfsSharesPagedResponse> + listNfsSharesSettings() { + return listNfsSharesSettings; } - /** Returns the builder for the settings used for calls to restoreVolumeSnapshot. */ - public UnaryCallSettings.Builder - restoreVolumeSnapshotSettings() { - return restoreVolumeSnapshotSettings; + /** Returns the builder for the settings used for calls to updateNfsShare. */ + public UnaryCallSettings.Builder updateNfsShareSettings() { + return updateNfsShareSettings; } - /** Returns the builder for the settings used for calls to restoreVolumeSnapshot. */ + /** Returns the builder for the settings used for calls to updateNfsShare. */ @BetaApi( "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - RestoreVolumeSnapshotRequest, VolumeSnapshot, OperationMetadata> - restoreVolumeSnapshotOperationSettings() { - return restoreVolumeSnapshotOperationSettings; - } - - /** Returns the builder for the settings used for calls to deleteVolumeSnapshot. */ - public UnaryCallSettings.Builder - deleteVolumeSnapshotSettings() { - return deleteVolumeSnapshotSettings; - } - - /** Returns the builder for the settings used for calls to getVolumeSnapshot. */ - public UnaryCallSettings.Builder - getVolumeSnapshotSettings() { - return getVolumeSnapshotSettings; - } - - /** Returns the builder for the settings used for calls to listVolumeSnapshots. */ - public PagedCallSettings.Builder< - ListVolumeSnapshotsRequest, - ListVolumeSnapshotsResponse, - ListVolumeSnapshotsPagedResponse> - listVolumeSnapshotsSettings() { - return listVolumeSnapshotsSettings; - } - - /** Returns the builder for the settings used for calls to getLun. */ - public UnaryCallSettings.Builder getLunSettings() { - return getLunSettings; - } - - /** Returns the builder for the settings used for calls to listLuns. */ - public PagedCallSettings.Builder - listLunsSettings() { - return listLunsSettings; + public OperationCallSettings.Builder + updateNfsShareOperationSettings() { + return updateNfsShareOperationSettings; } @Override diff --git a/java-bare-metal-solution/google-cloud-bare-metal-solution/src/main/java/com/google/cloud/baremetalsolution/v2/stub/GrpcBareMetalSolutionStub.java b/java-bare-metal-solution/google-cloud-bare-metal-solution/src/main/java/com/google/cloud/baremetalsolution/v2/stub/GrpcBareMetalSolutionStub.java index 67989ca52b09..0e6e0e175d7e 100644 --- a/java-bare-metal-solution/google-cloud-bare-metal-solution/src/main/java/com/google/cloud/baremetalsolution/v2/stub/GrpcBareMetalSolutionStub.java +++ b/java-bare-metal-solution/google-cloud-bare-metal-solution/src/main/java/com/google/cloud/baremetalsolution/v2/stub/GrpcBareMetalSolutionStub.java @@ -19,8 +19,7 @@ import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListInstancesPagedResponse; import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListLunsPagedResponse; import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListNetworksPagedResponse; -import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListSnapshotSchedulePoliciesPagedResponse; -import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListVolumeSnapshotsPagedResponse; +import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListNfsSharesPagedResponse; import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListVolumesPagedResponse; import com.google.api.gax.core.BackgroundResource; @@ -30,44 +29,44 @@ import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest; -import com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest; -import com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest; -import com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest; +import com.google.cloud.baremetalsolution.v2.DetachLunRequest; import com.google.cloud.baremetalsolution.v2.GetInstanceRequest; import com.google.cloud.baremetalsolution.v2.GetLunRequest; import com.google.cloud.baremetalsolution.v2.GetNetworkRequest; -import com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest; +import com.google.cloud.baremetalsolution.v2.GetNfsShareRequest; import com.google.cloud.baremetalsolution.v2.GetVolumeRequest; -import com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest; import com.google.cloud.baremetalsolution.v2.Instance; import com.google.cloud.baremetalsolution.v2.ListInstancesRequest; import com.google.cloud.baremetalsolution.v2.ListInstancesResponse; import com.google.cloud.baremetalsolution.v2.ListLunsRequest; import com.google.cloud.baremetalsolution.v2.ListLunsResponse; +import com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest; +import com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse; import com.google.cloud.baremetalsolution.v2.ListNetworksRequest; import com.google.cloud.baremetalsolution.v2.ListNetworksResponse; -import com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest; -import com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse; -import com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest; -import com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse; +import com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest; +import com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse; import com.google.cloud.baremetalsolution.v2.ListVolumesRequest; import com.google.cloud.baremetalsolution.v2.ListVolumesResponse; import com.google.cloud.baremetalsolution.v2.Lun; import com.google.cloud.baremetalsolution.v2.Network; +import com.google.cloud.baremetalsolution.v2.NfsShare; import com.google.cloud.baremetalsolution.v2.OperationMetadata; import com.google.cloud.baremetalsolution.v2.ResetInstanceRequest; import com.google.cloud.baremetalsolution.v2.ResetInstanceResponse; -import com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest; -import com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy; -import com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest; +import com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest; +import com.google.cloud.baremetalsolution.v2.StartInstanceRequest; +import com.google.cloud.baremetalsolution.v2.StartInstanceResponse; +import com.google.cloud.baremetalsolution.v2.StopInstanceRequest; +import com.google.cloud.baremetalsolution.v2.StopInstanceResponse; +import com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest; +import com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest; +import com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest; import com.google.cloud.baremetalsolution.v2.UpdateVolumeRequest; import com.google.cloud.baremetalsolution.v2.Volume; -import com.google.cloud.baremetalsolution.v2.VolumeSnapshot; import com.google.common.collect.ImmutableMap; import com.google.longrunning.Operation; import com.google.longrunning.stub.GrpcOperationsStub; -import com.google.protobuf.Empty; import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; @@ -102,6 +101,17 @@ public class GrpcBareMetalSolutionStub extends BareMetalSolutionStub { .setResponseMarshaller(ProtoUtils.marshaller(Instance.getDefaultInstance())) .build(); + private static final MethodDescriptor + updateInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.baremetalsolution.v2.BareMetalSolution/UpdateInstance") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor resetInstanceMethodDescriptor = MethodDescriptor.newBuilder() @@ -113,6 +123,34 @@ public class GrpcBareMetalSolutionStub extends BareMetalSolutionStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + startInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.baremetalsolution.v2.BareMetalSolution/StartInstance") + .setRequestMarshaller( + ProtoUtils.marshaller(StartInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + stopInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.baremetalsolution.v2.BareMetalSolution/StopInstance") + .setRequestMarshaller(ProtoUtils.marshaller(StopInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor detachLunMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.baremetalsolution.v2.BareMetalSolution/DetachLun") + .setRequestMarshaller(ProtoUtils.marshaller(DetachLunRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor listVolumesMethodDescriptor = MethodDescriptor.newBuilder() @@ -140,6 +178,15 @@ public class GrpcBareMetalSolutionStub extends BareMetalSolutionStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + resizeVolumeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.baremetalsolution.v2.BareMetalSolution/ResizeVolume") + .setRequestMarshaller(ProtoUtils.marshaller(ResizeVolumeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor listNetworksMethodDescriptor = MethodDescriptor.newBuilder() @@ -150,6 +197,18 @@ public class GrpcBareMetalSolutionStub extends BareMetalSolutionStub { ProtoUtils.marshaller(ListNetworksResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor + listNetworkUsageMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.baremetalsolution.v2.BareMetalSolution/ListNetworkUsage") + .setRequestMarshaller( + ProtoUtils.marshaller(ListNetworkUsageRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListNetworkUsageResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor getNetworkMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -158,124 +217,17 @@ public class GrpcBareMetalSolutionStub extends BareMetalSolutionStub { .setResponseMarshaller(ProtoUtils.marshaller(Network.getDefaultInstance())) .build(); - private static final MethodDescriptor< - ListSnapshotSchedulePoliciesRequest, ListSnapshotSchedulePoliciesResponse> - listSnapshotSchedulePoliciesMethodDescriptor = - MethodDescriptor - . - newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.baremetalsolution.v2.BareMetalSolution/ListSnapshotSchedulePolicies") - .setRequestMarshaller( - ProtoUtils.marshaller(ListSnapshotSchedulePoliciesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListSnapshotSchedulePoliciesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getSnapshotSchedulePolicyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.baremetalsolution.v2.BareMetalSolution/GetSnapshotSchedulePolicy") - .setRequestMarshaller( - ProtoUtils.marshaller(GetSnapshotSchedulePolicyRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(SnapshotSchedulePolicy.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createSnapshotSchedulePolicyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.baremetalsolution.v2.BareMetalSolution/CreateSnapshotSchedulePolicy") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateSnapshotSchedulePolicyRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(SnapshotSchedulePolicy.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateSnapshotSchedulePolicyMethodDescriptor = - MethodDescriptor.newBuilder() + private static final MethodDescriptor + updateNetworkMethodDescriptor = + MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName( - "google.cloud.baremetalsolution.v2.BareMetalSolution/UpdateSnapshotSchedulePolicy") + "google.cloud.baremetalsolution.v2.BareMetalSolution/UpdateNetwork") .setRequestMarshaller( - ProtoUtils.marshaller(UpdateSnapshotSchedulePolicyRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(SnapshotSchedulePolicy.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteSnapshotSchedulePolicyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.baremetalsolution.v2.BareMetalSolution/DeleteSnapshotSchedulePolicy") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteSnapshotSchedulePolicyRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createVolumeSnapshotMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.baremetalsolution.v2.BareMetalSolution/CreateVolumeSnapshot") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateVolumeSnapshotRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(VolumeSnapshot.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - restoreVolumeSnapshotMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.baremetalsolution.v2.BareMetalSolution/RestoreVolumeSnapshot") - .setRequestMarshaller( - ProtoUtils.marshaller(RestoreVolumeSnapshotRequest.getDefaultInstance())) + ProtoUtils.marshaller(UpdateNetworkRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); - private static final MethodDescriptor - deleteVolumeSnapshotMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.baremetalsolution.v2.BareMetalSolution/DeleteVolumeSnapshot") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteVolumeSnapshotRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getVolumeSnapshotMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.baremetalsolution.v2.BareMetalSolution/GetVolumeSnapshot") - .setRequestMarshaller( - ProtoUtils.marshaller(GetVolumeSnapshotRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(VolumeSnapshot.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listVolumeSnapshotsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.baremetalsolution.v2.BareMetalSolution/ListVolumeSnapshots") - .setRequestMarshaller( - ProtoUtils.marshaller(ListVolumeSnapshotsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListVolumeSnapshotsResponse.getDefaultInstance())) - .build(); - private static final MethodDescriptor getLunMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -293,13 +245,56 @@ public class GrpcBareMetalSolutionStub extends BareMetalSolutionStub { .setResponseMarshaller(ProtoUtils.marshaller(ListLunsResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor getNfsShareMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.baremetalsolution.v2.BareMetalSolution/GetNfsShare") + .setRequestMarshaller(ProtoUtils.marshaller(GetNfsShareRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(NfsShare.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listNfsSharesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.baremetalsolution.v2.BareMetalSolution/ListNfsShares") + .setRequestMarshaller( + ProtoUtils.marshaller(ListNfsSharesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListNfsSharesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateNfsShareMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.baremetalsolution.v2.BareMetalSolution/UpdateNfsShare") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateNfsShareRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private final UnaryCallable listInstancesCallable; private final UnaryCallable listInstancesPagedCallable; private final UnaryCallable getInstanceCallable; + private final UnaryCallable updateInstanceCallable; + private final OperationCallable + updateInstanceOperationCallable; private final UnaryCallable resetInstanceCallable; private final OperationCallable resetInstanceOperationCallable; + private final UnaryCallable startInstanceCallable; + private final OperationCallable + startInstanceOperationCallable; + private final UnaryCallable stopInstanceCallable; + private final OperationCallable + stopInstanceOperationCallable; + private final UnaryCallable detachLunCallable; + private final OperationCallable + detachLunOperationCallable; private final UnaryCallable listVolumesCallable; private final UnaryCallable listVolumesPagedCallable; @@ -307,39 +302,28 @@ public class GrpcBareMetalSolutionStub extends BareMetalSolutionStub { private final UnaryCallable updateVolumeCallable; private final OperationCallable updateVolumeOperationCallable; + private final UnaryCallable resizeVolumeCallable; + private final OperationCallable + resizeVolumeOperationCallable; private final UnaryCallable listNetworksCallable; private final UnaryCallable listNetworksPagedCallable; + private final UnaryCallable + listNetworkUsageCallable; private final UnaryCallable getNetworkCallable; - private final UnaryCallable< - ListSnapshotSchedulePoliciesRequest, ListSnapshotSchedulePoliciesResponse> - listSnapshotSchedulePoliciesCallable; - private final UnaryCallable< - ListSnapshotSchedulePoliciesRequest, ListSnapshotSchedulePoliciesPagedResponse> - listSnapshotSchedulePoliciesPagedCallable; - private final UnaryCallable - getSnapshotSchedulePolicyCallable; - private final UnaryCallable - createSnapshotSchedulePolicyCallable; - private final UnaryCallable - updateSnapshotSchedulePolicyCallable; - private final UnaryCallable - deleteSnapshotSchedulePolicyCallable; - private final UnaryCallable - createVolumeSnapshotCallable; - private final UnaryCallable - restoreVolumeSnapshotCallable; - private final OperationCallable - restoreVolumeSnapshotOperationCallable; - private final UnaryCallable deleteVolumeSnapshotCallable; - private final UnaryCallable getVolumeSnapshotCallable; - private final UnaryCallable - listVolumeSnapshotsCallable; - private final UnaryCallable - listVolumeSnapshotsPagedCallable; + private final UnaryCallable updateNetworkCallable; + private final OperationCallable + updateNetworkOperationCallable; private final UnaryCallable getLunCallable; private final UnaryCallable listLunsCallable; private final UnaryCallable listLunsPagedCallable; + private final UnaryCallable getNfsShareCallable; + private final UnaryCallable listNfsSharesCallable; + private final UnaryCallable + listNfsSharesPagedCallable; + private final UnaryCallable updateNfsShareCallable; + private final OperationCallable + updateNfsShareOperationCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -405,6 +389,16 @@ protected GrpcBareMetalSolutionStub( return params.build(); }) .build(); + GrpcCallSettings updateInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateInstanceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("instance.name", String.valueOf(request.getInstance().getName())); + return params.build(); + }) + .build(); GrpcCallSettings resetInstanceTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(resetInstanceMethodDescriptor) @@ -415,6 +409,36 @@ protected GrpcBareMetalSolutionStub( return params.build(); }) .build(); + GrpcCallSettings startInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(startInstanceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings stopInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(stopInstanceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings detachLunTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(detachLunMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("instance", String.valueOf(request.getInstance())); + return params.build(); + }) + .build(); GrpcCallSettings listVolumesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listVolumesMethodDescriptor) @@ -445,112 +469,40 @@ protected GrpcBareMetalSolutionStub( return params.build(); }) .build(); - GrpcCallSettings listNetworksTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listNetworksMethodDescriptor) + GrpcCallSettings resizeVolumeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(resizeVolumeMethodDescriptor) .setParamsExtractor( request -> { ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); + params.put("volume", String.valueOf(request.getVolume())); return params.build(); }) .build(); - GrpcCallSettings getNetworkTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getNetworkMethodDescriptor) + GrpcCallSettings listNetworksTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listNetworksMethodDescriptor) .setParamsExtractor( request -> { ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); + params.put("parent", String.valueOf(request.getParent())); return params.build(); }) .build(); - GrpcCallSettings - listSnapshotSchedulePoliciesTransportSettings = - GrpcCallSettings - . - newBuilder() - .setMethodDescriptor(listSnapshotSchedulePoliciesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings - getSnapshotSchedulePolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getSnapshotSchedulePolicyMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - createSnapshotSchedulePolicyTransportSettings = - GrpcCallSettings - .newBuilder() - .setMethodDescriptor(createSnapshotSchedulePolicyMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings - updateSnapshotSchedulePolicyTransportSettings = - GrpcCallSettings - .newBuilder() - .setMethodDescriptor(updateSnapshotSchedulePolicyMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put( - "snapshot_schedule_policy.name", - String.valueOf(request.getSnapshotSchedulePolicy().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - deleteSnapshotSchedulePolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteSnapshotSchedulePolicyMethodDescriptor) + GrpcCallSettings + listNetworkUsageTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listNetworkUsageMethodDescriptor) .setParamsExtractor( request -> { ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); + params.put("location", String.valueOf(request.getLocation())); return params.build(); }) .build(); - GrpcCallSettings - createVolumeSnapshotTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createVolumeSnapshotMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings - restoreVolumeSnapshotTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(restoreVolumeSnapshotMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("volume_snapshot", String.valueOf(request.getVolumeSnapshot())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteVolumeSnapshotTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteVolumeSnapshotMethodDescriptor) + GrpcCallSettings getNetworkTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getNetworkMethodDescriptor) .setParamsExtractor( request -> { ImmutableMap.Builder params = ImmutableMap.builder(); @@ -558,27 +510,16 @@ protected GrpcBareMetalSolutionStub( return params.build(); }) .build(); - GrpcCallSettings getVolumeSnapshotTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getVolumeSnapshotMethodDescriptor) + GrpcCallSettings updateNetworkTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateNetworkMethodDescriptor) .setParamsExtractor( request -> { ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); + params.put("network.name", String.valueOf(request.getNetwork().getName())); return params.build(); }) .build(); - GrpcCallSettings - listVolumeSnapshotsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listVolumeSnapshotsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); GrpcCallSettings getLunTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getLunMethodDescriptor) @@ -599,6 +540,36 @@ protected GrpcBareMetalSolutionStub( return params.build(); }) .build(); + GrpcCallSettings getNfsShareTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getNfsShareMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings listNfsSharesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listNfsSharesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings updateNfsShareTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateNfsShareMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("nfs_share.name", String.valueOf(request.getNfsShare().getName())); + return params.build(); + }) + .build(); this.listInstancesCallable = callableFactory.createUnaryCallable( @@ -609,6 +580,15 @@ protected GrpcBareMetalSolutionStub( this.getInstanceCallable = callableFactory.createUnaryCallable( getInstanceTransportSettings, settings.getInstanceSettings(), clientContext); + this.updateInstanceCallable = + callableFactory.createUnaryCallable( + updateInstanceTransportSettings, settings.updateInstanceSettings(), clientContext); + this.updateInstanceOperationCallable = + callableFactory.createOperationCallable( + updateInstanceTransportSettings, + settings.updateInstanceOperationSettings(), + clientContext, + operationsStub); this.resetInstanceCallable = callableFactory.createUnaryCallable( resetInstanceTransportSettings, settings.resetInstanceSettings(), clientContext); @@ -618,6 +598,33 @@ protected GrpcBareMetalSolutionStub( settings.resetInstanceOperationSettings(), clientContext, operationsStub); + this.startInstanceCallable = + callableFactory.createUnaryCallable( + startInstanceTransportSettings, settings.startInstanceSettings(), clientContext); + this.startInstanceOperationCallable = + callableFactory.createOperationCallable( + startInstanceTransportSettings, + settings.startInstanceOperationSettings(), + clientContext, + operationsStub); + this.stopInstanceCallable = + callableFactory.createUnaryCallable( + stopInstanceTransportSettings, settings.stopInstanceSettings(), clientContext); + this.stopInstanceOperationCallable = + callableFactory.createOperationCallable( + stopInstanceTransportSettings, + settings.stopInstanceOperationSettings(), + clientContext, + operationsStub); + this.detachLunCallable = + callableFactory.createUnaryCallable( + detachLunTransportSettings, settings.detachLunSettings(), clientContext); + this.detachLunOperationCallable = + callableFactory.createOperationCallable( + detachLunTransportSettings, + settings.detachLunOperationSettings(), + clientContext, + operationsStub); this.listVolumesCallable = callableFactory.createUnaryCallable( listVolumesTransportSettings, settings.listVolumesSettings(), clientContext); @@ -636,81 +643,36 @@ protected GrpcBareMetalSolutionStub( settings.updateVolumeOperationSettings(), clientContext, operationsStub); + this.resizeVolumeCallable = + callableFactory.createUnaryCallable( + resizeVolumeTransportSettings, settings.resizeVolumeSettings(), clientContext); + this.resizeVolumeOperationCallable = + callableFactory.createOperationCallable( + resizeVolumeTransportSettings, + settings.resizeVolumeOperationSettings(), + clientContext, + operationsStub); this.listNetworksCallable = callableFactory.createUnaryCallable( listNetworksTransportSettings, settings.listNetworksSettings(), clientContext); this.listNetworksPagedCallable = callableFactory.createPagedCallable( listNetworksTransportSettings, settings.listNetworksSettings(), clientContext); + this.listNetworkUsageCallable = + callableFactory.createUnaryCallable( + listNetworkUsageTransportSettings, settings.listNetworkUsageSettings(), clientContext); this.getNetworkCallable = callableFactory.createUnaryCallable( getNetworkTransportSettings, settings.getNetworkSettings(), clientContext); - this.listSnapshotSchedulePoliciesCallable = - callableFactory.createUnaryCallable( - listSnapshotSchedulePoliciesTransportSettings, - settings.listSnapshotSchedulePoliciesSettings(), - clientContext); - this.listSnapshotSchedulePoliciesPagedCallable = - callableFactory.createPagedCallable( - listSnapshotSchedulePoliciesTransportSettings, - settings.listSnapshotSchedulePoliciesSettings(), - clientContext); - this.getSnapshotSchedulePolicyCallable = + this.updateNetworkCallable = callableFactory.createUnaryCallable( - getSnapshotSchedulePolicyTransportSettings, - settings.getSnapshotSchedulePolicySettings(), - clientContext); - this.createSnapshotSchedulePolicyCallable = - callableFactory.createUnaryCallable( - createSnapshotSchedulePolicyTransportSettings, - settings.createSnapshotSchedulePolicySettings(), - clientContext); - this.updateSnapshotSchedulePolicyCallable = - callableFactory.createUnaryCallable( - updateSnapshotSchedulePolicyTransportSettings, - settings.updateSnapshotSchedulePolicySettings(), - clientContext); - this.deleteSnapshotSchedulePolicyCallable = - callableFactory.createUnaryCallable( - deleteSnapshotSchedulePolicyTransportSettings, - settings.deleteSnapshotSchedulePolicySettings(), - clientContext); - this.createVolumeSnapshotCallable = - callableFactory.createUnaryCallable( - createVolumeSnapshotTransportSettings, - settings.createVolumeSnapshotSettings(), - clientContext); - this.restoreVolumeSnapshotCallable = - callableFactory.createUnaryCallable( - restoreVolumeSnapshotTransportSettings, - settings.restoreVolumeSnapshotSettings(), - clientContext); - this.restoreVolumeSnapshotOperationCallable = + updateNetworkTransportSettings, settings.updateNetworkSettings(), clientContext); + this.updateNetworkOperationCallable = callableFactory.createOperationCallable( - restoreVolumeSnapshotTransportSettings, - settings.restoreVolumeSnapshotOperationSettings(), + updateNetworkTransportSettings, + settings.updateNetworkOperationSettings(), clientContext, operationsStub); - this.deleteVolumeSnapshotCallable = - callableFactory.createUnaryCallable( - deleteVolumeSnapshotTransportSettings, - settings.deleteVolumeSnapshotSettings(), - clientContext); - this.getVolumeSnapshotCallable = - callableFactory.createUnaryCallable( - getVolumeSnapshotTransportSettings, - settings.getVolumeSnapshotSettings(), - clientContext); - this.listVolumeSnapshotsCallable = - callableFactory.createUnaryCallable( - listVolumeSnapshotsTransportSettings, - settings.listVolumeSnapshotsSettings(), - clientContext); - this.listVolumeSnapshotsPagedCallable = - callableFactory.createPagedCallable( - listVolumeSnapshotsTransportSettings, - settings.listVolumeSnapshotsSettings(), - clientContext); this.getLunCallable = callableFactory.createUnaryCallable( getLunTransportSettings, settings.getLunSettings(), clientContext); @@ -720,6 +682,24 @@ protected GrpcBareMetalSolutionStub( this.listLunsPagedCallable = callableFactory.createPagedCallable( listLunsTransportSettings, settings.listLunsSettings(), clientContext); + this.getNfsShareCallable = + callableFactory.createUnaryCallable( + getNfsShareTransportSettings, settings.getNfsShareSettings(), clientContext); + this.listNfsSharesCallable = + callableFactory.createUnaryCallable( + listNfsSharesTransportSettings, settings.listNfsSharesSettings(), clientContext); + this.listNfsSharesPagedCallable = + callableFactory.createPagedCallable( + listNfsSharesTransportSettings, settings.listNfsSharesSettings(), clientContext); + this.updateNfsShareCallable = + callableFactory.createUnaryCallable( + updateNfsShareTransportSettings, settings.updateNfsShareSettings(), clientContext); + this.updateNfsShareOperationCallable = + callableFactory.createOperationCallable( + updateNfsShareTransportSettings, + settings.updateNfsShareOperationSettings(), + clientContext, + operationsStub); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -745,6 +725,17 @@ public UnaryCallable getInstanceCallable() { return getInstanceCallable; } + @Override + public UnaryCallable updateInstanceCallable() { + return updateInstanceCallable; + } + + @Override + public OperationCallable + updateInstanceOperationCallable() { + return updateInstanceOperationCallable; + } + @Override public UnaryCallable resetInstanceCallable() { return resetInstanceCallable; @@ -756,6 +747,39 @@ public UnaryCallable resetInstanceCallable() { return resetInstanceOperationCallable; } + @Override + public UnaryCallable startInstanceCallable() { + return startInstanceCallable; + } + + @Override + public OperationCallable + startInstanceOperationCallable() { + return startInstanceOperationCallable; + } + + @Override + public UnaryCallable stopInstanceCallable() { + return stopInstanceCallable; + } + + @Override + public OperationCallable + stopInstanceOperationCallable() { + return stopInstanceOperationCallable; + } + + @Override + public UnaryCallable detachLunCallable() { + return detachLunCallable; + } + + @Override + public OperationCallable + detachLunOperationCallable() { + return detachLunOperationCallable; + } + @Override public UnaryCallable listVolumesCallable() { return listVolumesCallable; @@ -783,108 +807,88 @@ public UnaryCallable updateVolumeCallable() { } @Override - public UnaryCallable listNetworksCallable() { - return listNetworksCallable; - } - - @Override - public UnaryCallable listNetworksPagedCallable() { - return listNetworksPagedCallable; - } - - @Override - public UnaryCallable getNetworkCallable() { - return getNetworkCallable; - } - - @Override - public UnaryCallable - listSnapshotSchedulePoliciesCallable() { - return listSnapshotSchedulePoliciesCallable; + public UnaryCallable resizeVolumeCallable() { + return resizeVolumeCallable; } @Override - public UnaryCallable< - ListSnapshotSchedulePoliciesRequest, ListSnapshotSchedulePoliciesPagedResponse> - listSnapshotSchedulePoliciesPagedCallable() { - return listSnapshotSchedulePoliciesPagedCallable; + public OperationCallable + resizeVolumeOperationCallable() { + return resizeVolumeOperationCallable; } @Override - public UnaryCallable - getSnapshotSchedulePolicyCallable() { - return getSnapshotSchedulePolicyCallable; + public UnaryCallable listNetworksCallable() { + return listNetworksCallable; } @Override - public UnaryCallable - createSnapshotSchedulePolicyCallable() { - return createSnapshotSchedulePolicyCallable; + public UnaryCallable listNetworksPagedCallable() { + return listNetworksPagedCallable; } @Override - public UnaryCallable - updateSnapshotSchedulePolicyCallable() { - return updateSnapshotSchedulePolicyCallable; + public UnaryCallable + listNetworkUsageCallable() { + return listNetworkUsageCallable; } @Override - public UnaryCallable - deleteSnapshotSchedulePolicyCallable() { - return deleteSnapshotSchedulePolicyCallable; + public UnaryCallable getNetworkCallable() { + return getNetworkCallable; } @Override - public UnaryCallable createVolumeSnapshotCallable() { - return createVolumeSnapshotCallable; + public UnaryCallable updateNetworkCallable() { + return updateNetworkCallable; } @Override - public UnaryCallable restoreVolumeSnapshotCallable() { - return restoreVolumeSnapshotCallable; + public OperationCallable + updateNetworkOperationCallable() { + return updateNetworkOperationCallable; } @Override - public OperationCallable - restoreVolumeSnapshotOperationCallable() { - return restoreVolumeSnapshotOperationCallable; + public UnaryCallable getLunCallable() { + return getLunCallable; } @Override - public UnaryCallable deleteVolumeSnapshotCallable() { - return deleteVolumeSnapshotCallable; + public UnaryCallable listLunsCallable() { + return listLunsCallable; } @Override - public UnaryCallable getVolumeSnapshotCallable() { - return getVolumeSnapshotCallable; + public UnaryCallable listLunsPagedCallable() { + return listLunsPagedCallable; } @Override - public UnaryCallable - listVolumeSnapshotsCallable() { - return listVolumeSnapshotsCallable; + public UnaryCallable getNfsShareCallable() { + return getNfsShareCallable; } @Override - public UnaryCallable - listVolumeSnapshotsPagedCallable() { - return listVolumeSnapshotsPagedCallable; + public UnaryCallable listNfsSharesCallable() { + return listNfsSharesCallable; } @Override - public UnaryCallable getLunCallable() { - return getLunCallable; + public UnaryCallable + listNfsSharesPagedCallable() { + return listNfsSharesPagedCallable; } @Override - public UnaryCallable listLunsCallable() { - return listLunsCallable; + public UnaryCallable updateNfsShareCallable() { + return updateNfsShareCallable; } @Override - public UnaryCallable listLunsPagedCallable() { - return listLunsPagedCallable; + public OperationCallable + updateNfsShareOperationCallable() { + return updateNfsShareOperationCallable; } @Override diff --git a/java-bare-metal-solution/google-cloud-bare-metal-solution/src/main/java/com/google/cloud/baremetalsolution/v2/stub/HttpJsonBareMetalSolutionCallableFactory.java b/java-bare-metal-solution/google-cloud-bare-metal-solution/src/main/java/com/google/cloud/baremetalsolution/v2/stub/HttpJsonBareMetalSolutionCallableFactory.java new file mode 100644 index 000000000000..d9ca5003dc97 --- /dev/null +++ b/java-bare-metal-solution/google-cloud-bare-metal-solution/src/main/java/com/google/cloud/baremetalsolution/v2/stub/HttpJsonBareMetalSolutionCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the BareMetalSolution service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonBareMetalSolutionCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-bare-metal-solution/google-cloud-bare-metal-solution/src/main/java/com/google/cloud/baremetalsolution/v2/stub/HttpJsonBareMetalSolutionStub.java b/java-bare-metal-solution/google-cloud-bare-metal-solution/src/main/java/com/google/cloud/baremetalsolution/v2/stub/HttpJsonBareMetalSolutionStub.java new file mode 100644 index 000000000000..819488acc65c --- /dev/null +++ b/java-bare-metal-solution/google-cloud-bare-metal-solution/src/main/java/com/google/cloud/baremetalsolution/v2/stub/HttpJsonBareMetalSolutionStub.java @@ -0,0 +1,1423 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.stub; + +import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListInstancesPagedResponse; +import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListLunsPagedResponse; +import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListNetworksPagedResponse; +import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListNfsSharesPagedResponse; +import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListVolumesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.baremetalsolution.v2.DetachLunRequest; +import com.google.cloud.baremetalsolution.v2.GetInstanceRequest; +import com.google.cloud.baremetalsolution.v2.GetLunRequest; +import com.google.cloud.baremetalsolution.v2.GetNetworkRequest; +import com.google.cloud.baremetalsolution.v2.GetNfsShareRequest; +import com.google.cloud.baremetalsolution.v2.GetVolumeRequest; +import com.google.cloud.baremetalsolution.v2.Instance; +import com.google.cloud.baremetalsolution.v2.ListInstancesRequest; +import com.google.cloud.baremetalsolution.v2.ListInstancesResponse; +import com.google.cloud.baremetalsolution.v2.ListLunsRequest; +import com.google.cloud.baremetalsolution.v2.ListLunsResponse; +import com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest; +import com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse; +import com.google.cloud.baremetalsolution.v2.ListNetworksRequest; +import com.google.cloud.baremetalsolution.v2.ListNetworksResponse; +import com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest; +import com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse; +import com.google.cloud.baremetalsolution.v2.ListVolumesRequest; +import com.google.cloud.baremetalsolution.v2.ListVolumesResponse; +import com.google.cloud.baremetalsolution.v2.Lun; +import com.google.cloud.baremetalsolution.v2.Network; +import com.google.cloud.baremetalsolution.v2.NfsShare; +import com.google.cloud.baremetalsolution.v2.OperationMetadata; +import com.google.cloud.baremetalsolution.v2.ResetInstanceRequest; +import com.google.cloud.baremetalsolution.v2.ResetInstanceResponse; +import com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest; +import com.google.cloud.baremetalsolution.v2.StartInstanceRequest; +import com.google.cloud.baremetalsolution.v2.StartInstanceResponse; +import com.google.cloud.baremetalsolution.v2.StopInstanceRequest; +import com.google.cloud.baremetalsolution.v2.StopInstanceResponse; +import com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest; +import com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest; +import com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest; +import com.google.cloud.baremetalsolution.v2.UpdateVolumeRequest; +import com.google.cloud.baremetalsolution.v2.Volume; +import com.google.longrunning.Operation; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the BareMetalSolution service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonBareMetalSolutionStub extends BareMetalSolutionStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(StartInstanceResponse.getDescriptor()) + .add(ResetInstanceResponse.getDescriptor()) + .add(Volume.getDescriptor()) + .add(StopInstanceResponse.getDescriptor()) + .add(NfsShare.getDescriptor()) + .add(OperationMetadata.getDescriptor()) + .add(Instance.getDescriptor()) + .add(Network.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + listInstancesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.baremetalsolution.v2.BareMetalSolution/ListInstances") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=projects/*/locations/*}/instances", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListInstancesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getInstanceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.baremetalsolution.v2.BareMetalSolution/GetInstance") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=projects/*/locations/*/instances/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Instance.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateInstanceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.baremetalsolution.v2.BareMetalSolution/UpdateInstance") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{instance.name=projects/*/locations/*/instances/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "instance.name", request.getInstance().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("instance", request.getInstance())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateInstanceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + resetInstanceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.baremetalsolution.v2.BareMetalSolution/ResetInstance") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=projects/*/locations/*/instances/*}:reset", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (ResetInstanceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + startInstanceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.baremetalsolution.v2.BareMetalSolution/StartInstance") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=projects/*/locations/*/instances/*}:start", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (StartInstanceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + stopInstanceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.baremetalsolution.v2.BareMetalSolution/StopInstance") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=projects/*/locations/*/instances/*}:stop", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (StopInstanceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor detachLunMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.baremetalsolution.v2.BareMetalSolution/DetachLun") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{instance=projects/*/locations/*/instances/*}:detachLun", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "instance", request.getInstance()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearInstance().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DetachLunRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listVolumesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.baremetalsolution.v2.BareMetalSolution/ListVolumes") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=projects/*/locations/*}/volumes", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListVolumesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getVolumeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.baremetalsolution.v2.BareMetalSolution/GetVolume") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=projects/*/locations/*/volumes/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Volume.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateVolumeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.baremetalsolution.v2.BareMetalSolution/UpdateVolume") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{volume.name=projects/*/locations/*/volumes/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "volume.name", request.getVolume().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create().toBody("volume", request.getVolume())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateVolumeRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + resizeVolumeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.baremetalsolution.v2.BareMetalSolution/ResizeVolume") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{volume=projects/*/locations/*/volumes/*}:resize", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "volume", request.getVolume()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearVolume().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (ResizeVolumeRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listNetworksMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.baremetalsolution.v2.BareMetalSolution/ListNetworks") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=projects/*/locations/*}/networks", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListNetworksResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listNetworkUsageMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.baremetalsolution.v2.BareMetalSolution/ListNetworkUsage") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{location=projects/*/locations/*}/networks:listNetworkUsage", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "location", request.getLocation()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListNetworkUsageResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getNetworkMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.baremetalsolution.v2.BareMetalSolution/GetNetwork") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=projects/*/locations/*/networks/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Network.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateNetworkMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.baremetalsolution.v2.BareMetalSolution/UpdateNetwork") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{network.name=projects/*/locations/*/networks/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "network.name", request.getNetwork().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create().toBody("network", request.getNetwork())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateNetworkRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor getLunMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.baremetalsolution.v2.BareMetalSolution/GetLun") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=projects/*/locations/*/volumes/*/luns/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Lun.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listLunsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.baremetalsolution.v2.BareMetalSolution/ListLuns") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=projects/*/locations/*/volumes/*}/luns", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLunsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getNfsShareMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.baremetalsolution.v2.BareMetalSolution/GetNfsShare") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=projects/*/locations/*/nfsShares/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(NfsShare.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listNfsSharesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.baremetalsolution.v2.BareMetalSolution/ListNfsShares") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=projects/*/locations/*}/nfsShares", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListNfsSharesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateNfsShareMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.baremetalsolution.v2.BareMetalSolution/UpdateNfsShare") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{nfsShare.name=projects/*/locations/*/nfsShares/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "nfsShare.name", request.getNfsShare().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("nfsShare", request.getNfsShare())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateNfsShareRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private final UnaryCallable listInstancesCallable; + private final UnaryCallable + listInstancesPagedCallable; + private final UnaryCallable getInstanceCallable; + private final UnaryCallable updateInstanceCallable; + private final OperationCallable + updateInstanceOperationCallable; + private final UnaryCallable resetInstanceCallable; + private final OperationCallable + resetInstanceOperationCallable; + private final UnaryCallable startInstanceCallable; + private final OperationCallable + startInstanceOperationCallable; + private final UnaryCallable stopInstanceCallable; + private final OperationCallable + stopInstanceOperationCallable; + private final UnaryCallable detachLunCallable; + private final OperationCallable + detachLunOperationCallable; + private final UnaryCallable listVolumesCallable; + private final UnaryCallable + listVolumesPagedCallable; + private final UnaryCallable getVolumeCallable; + private final UnaryCallable updateVolumeCallable; + private final OperationCallable + updateVolumeOperationCallable; + private final UnaryCallable resizeVolumeCallable; + private final OperationCallable + resizeVolumeOperationCallable; + private final UnaryCallable listNetworksCallable; + private final UnaryCallable + listNetworksPagedCallable; + private final UnaryCallable + listNetworkUsageCallable; + private final UnaryCallable getNetworkCallable; + private final UnaryCallable updateNetworkCallable; + private final OperationCallable + updateNetworkOperationCallable; + private final UnaryCallable getLunCallable; + private final UnaryCallable listLunsCallable; + private final UnaryCallable listLunsPagedCallable; + private final UnaryCallable getNfsShareCallable; + private final UnaryCallable listNfsSharesCallable; + private final UnaryCallable + listNfsSharesPagedCallable; + private final UnaryCallable updateNfsShareCallable; + private final OperationCallable + updateNfsShareOperationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonBareMetalSolutionStub create(BareMetalSolutionStubSettings settings) + throws IOException { + return new HttpJsonBareMetalSolutionStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonBareMetalSolutionStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonBareMetalSolutionStub( + BareMetalSolutionStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonBareMetalSolutionStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonBareMetalSolutionStub( + BareMetalSolutionStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonBareMetalSolutionStub, 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 HttpJsonBareMetalSolutionStub( + BareMetalSolutionStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonBareMetalSolutionCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonBareMetalSolutionStub, 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 HttpJsonBareMetalSolutionStub( + BareMetalSolutionStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry); + + HttpJsonCallSettings + listInstancesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listInstancesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getInstanceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getInstanceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updateInstanceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateInstanceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings resetInstanceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(resetInstanceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings startInstanceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(startInstanceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings stopInstanceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(stopInstanceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings detachLunTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(detachLunMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings listVolumesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listVolumesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getVolumeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getVolumeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updateVolumeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateVolumeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings resizeVolumeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(resizeVolumeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings listNetworksTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listNetworksMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listNetworkUsageTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listNetworkUsageMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getNetworkTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getNetworkMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updateNetworkTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateNetworkMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getLunTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLunMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings listLunsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLunsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getNfsShareTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getNfsShareMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listNfsSharesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listNfsSharesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updateNfsShareTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateNfsShareMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.listInstancesCallable = + callableFactory.createUnaryCallable( + listInstancesTransportSettings, settings.listInstancesSettings(), clientContext); + this.listInstancesPagedCallable = + callableFactory.createPagedCallable( + listInstancesTransportSettings, settings.listInstancesSettings(), clientContext); + this.getInstanceCallable = + callableFactory.createUnaryCallable( + getInstanceTransportSettings, settings.getInstanceSettings(), clientContext); + this.updateInstanceCallable = + callableFactory.createUnaryCallable( + updateInstanceTransportSettings, settings.updateInstanceSettings(), clientContext); + this.updateInstanceOperationCallable = + callableFactory.createOperationCallable( + updateInstanceTransportSettings, + settings.updateInstanceOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.resetInstanceCallable = + callableFactory.createUnaryCallable( + resetInstanceTransportSettings, settings.resetInstanceSettings(), clientContext); + this.resetInstanceOperationCallable = + callableFactory.createOperationCallable( + resetInstanceTransportSettings, + settings.resetInstanceOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.startInstanceCallable = + callableFactory.createUnaryCallable( + startInstanceTransportSettings, settings.startInstanceSettings(), clientContext); + this.startInstanceOperationCallable = + callableFactory.createOperationCallable( + startInstanceTransportSettings, + settings.startInstanceOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.stopInstanceCallable = + callableFactory.createUnaryCallable( + stopInstanceTransportSettings, settings.stopInstanceSettings(), clientContext); + this.stopInstanceOperationCallable = + callableFactory.createOperationCallable( + stopInstanceTransportSettings, + settings.stopInstanceOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.detachLunCallable = + callableFactory.createUnaryCallable( + detachLunTransportSettings, settings.detachLunSettings(), clientContext); + this.detachLunOperationCallable = + callableFactory.createOperationCallable( + detachLunTransportSettings, + settings.detachLunOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listVolumesCallable = + callableFactory.createUnaryCallable( + listVolumesTransportSettings, settings.listVolumesSettings(), clientContext); + this.listVolumesPagedCallable = + callableFactory.createPagedCallable( + listVolumesTransportSettings, settings.listVolumesSettings(), clientContext); + this.getVolumeCallable = + callableFactory.createUnaryCallable( + getVolumeTransportSettings, settings.getVolumeSettings(), clientContext); + this.updateVolumeCallable = + callableFactory.createUnaryCallable( + updateVolumeTransportSettings, settings.updateVolumeSettings(), clientContext); + this.updateVolumeOperationCallable = + callableFactory.createOperationCallable( + updateVolumeTransportSettings, + settings.updateVolumeOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.resizeVolumeCallable = + callableFactory.createUnaryCallable( + resizeVolumeTransportSettings, settings.resizeVolumeSettings(), clientContext); + this.resizeVolumeOperationCallable = + callableFactory.createOperationCallable( + resizeVolumeTransportSettings, + settings.resizeVolumeOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listNetworksCallable = + callableFactory.createUnaryCallable( + listNetworksTransportSettings, settings.listNetworksSettings(), clientContext); + this.listNetworksPagedCallable = + callableFactory.createPagedCallable( + listNetworksTransportSettings, settings.listNetworksSettings(), clientContext); + this.listNetworkUsageCallable = + callableFactory.createUnaryCallable( + listNetworkUsageTransportSettings, settings.listNetworkUsageSettings(), clientContext); + this.getNetworkCallable = + callableFactory.createUnaryCallable( + getNetworkTransportSettings, settings.getNetworkSettings(), clientContext); + this.updateNetworkCallable = + callableFactory.createUnaryCallable( + updateNetworkTransportSettings, settings.updateNetworkSettings(), clientContext); + this.updateNetworkOperationCallable = + callableFactory.createOperationCallable( + updateNetworkTransportSettings, + settings.updateNetworkOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getLunCallable = + callableFactory.createUnaryCallable( + getLunTransportSettings, settings.getLunSettings(), clientContext); + this.listLunsCallable = + callableFactory.createUnaryCallable( + listLunsTransportSettings, settings.listLunsSettings(), clientContext); + this.listLunsPagedCallable = + callableFactory.createPagedCallable( + listLunsTransportSettings, settings.listLunsSettings(), clientContext); + this.getNfsShareCallable = + callableFactory.createUnaryCallable( + getNfsShareTransportSettings, settings.getNfsShareSettings(), clientContext); + this.listNfsSharesCallable = + callableFactory.createUnaryCallable( + listNfsSharesTransportSettings, settings.listNfsSharesSettings(), clientContext); + this.listNfsSharesPagedCallable = + callableFactory.createPagedCallable( + listNfsSharesTransportSettings, settings.listNfsSharesSettings(), clientContext); + this.updateNfsShareCallable = + callableFactory.createUnaryCallable( + updateNfsShareTransportSettings, settings.updateNfsShareSettings(), clientContext); + this.updateNfsShareOperationCallable = + callableFactory.createOperationCallable( + updateNfsShareTransportSettings, + settings.updateNfsShareOperationSettings(), + clientContext, + httpJsonOperationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(listInstancesMethodDescriptor); + methodDescriptors.add(getInstanceMethodDescriptor); + methodDescriptors.add(updateInstanceMethodDescriptor); + methodDescriptors.add(resetInstanceMethodDescriptor); + methodDescriptors.add(startInstanceMethodDescriptor); + methodDescriptors.add(stopInstanceMethodDescriptor); + methodDescriptors.add(detachLunMethodDescriptor); + methodDescriptors.add(listVolumesMethodDescriptor); + methodDescriptors.add(getVolumeMethodDescriptor); + methodDescriptors.add(updateVolumeMethodDescriptor); + methodDescriptors.add(resizeVolumeMethodDescriptor); + methodDescriptors.add(listNetworksMethodDescriptor); + methodDescriptors.add(listNetworkUsageMethodDescriptor); + methodDescriptors.add(getNetworkMethodDescriptor); + methodDescriptors.add(updateNetworkMethodDescriptor); + methodDescriptors.add(getLunMethodDescriptor); + methodDescriptors.add(listLunsMethodDescriptor); + methodDescriptors.add(getNfsShareMethodDescriptor); + methodDescriptors.add(listNfsSharesMethodDescriptor); + methodDescriptors.add(updateNfsShareMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable listInstancesCallable() { + return listInstancesCallable; + } + + @Override + public UnaryCallable + listInstancesPagedCallable() { + return listInstancesPagedCallable; + } + + @Override + public UnaryCallable getInstanceCallable() { + return getInstanceCallable; + } + + @Override + public UnaryCallable updateInstanceCallable() { + return updateInstanceCallable; + } + + @Override + public OperationCallable + updateInstanceOperationCallable() { + return updateInstanceOperationCallable; + } + + @Override + public UnaryCallable resetInstanceCallable() { + return resetInstanceCallable; + } + + @Override + public OperationCallable + resetInstanceOperationCallable() { + return resetInstanceOperationCallable; + } + + @Override + public UnaryCallable startInstanceCallable() { + return startInstanceCallable; + } + + @Override + public OperationCallable + startInstanceOperationCallable() { + return startInstanceOperationCallable; + } + + @Override + public UnaryCallable stopInstanceCallable() { + return stopInstanceCallable; + } + + @Override + public OperationCallable + stopInstanceOperationCallable() { + return stopInstanceOperationCallable; + } + + @Override + public UnaryCallable detachLunCallable() { + return detachLunCallable; + } + + @Override + public OperationCallable + detachLunOperationCallable() { + return detachLunOperationCallable; + } + + @Override + public UnaryCallable listVolumesCallable() { + return listVolumesCallable; + } + + @Override + public UnaryCallable listVolumesPagedCallable() { + return listVolumesPagedCallable; + } + + @Override + public UnaryCallable getVolumeCallable() { + return getVolumeCallable; + } + + @Override + public UnaryCallable updateVolumeCallable() { + return updateVolumeCallable; + } + + @Override + public OperationCallable + updateVolumeOperationCallable() { + return updateVolumeOperationCallable; + } + + @Override + public UnaryCallable resizeVolumeCallable() { + return resizeVolumeCallable; + } + + @Override + public OperationCallable + resizeVolumeOperationCallable() { + return resizeVolumeOperationCallable; + } + + @Override + public UnaryCallable listNetworksCallable() { + return listNetworksCallable; + } + + @Override + public UnaryCallable listNetworksPagedCallable() { + return listNetworksPagedCallable; + } + + @Override + public UnaryCallable + listNetworkUsageCallable() { + return listNetworkUsageCallable; + } + + @Override + public UnaryCallable getNetworkCallable() { + return getNetworkCallable; + } + + @Override + public UnaryCallable updateNetworkCallable() { + return updateNetworkCallable; + } + + @Override + public OperationCallable + updateNetworkOperationCallable() { + return updateNetworkOperationCallable; + } + + @Override + public UnaryCallable getLunCallable() { + return getLunCallable; + } + + @Override + public UnaryCallable listLunsCallable() { + return listLunsCallable; + } + + @Override + public UnaryCallable listLunsPagedCallable() { + return listLunsPagedCallable; + } + + @Override + public UnaryCallable getNfsShareCallable() { + return getNfsShareCallable; + } + + @Override + public UnaryCallable listNfsSharesCallable() { + return listNfsSharesCallable; + } + + @Override + public UnaryCallable + listNfsSharesPagedCallable() { + return listNfsSharesPagedCallable; + } + + @Override + public UnaryCallable updateNfsShareCallable() { + return updateNfsShareCallable; + } + + @Override + public OperationCallable + updateNfsShareOperationCallable() { + return updateNfsShareOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-bare-metal-solution/google-cloud-bare-metal-solution/src/test/java/com/google/cloud/baremetalsolution/v2/BareMetalSolutionClientHttpJsonTest.java b/java-bare-metal-solution/google-cloud-bare-metal-solution/src/test/java/com/google/cloud/baremetalsolution/v2/BareMetalSolutionClientHttpJsonTest.java new file mode 100644 index 000000000000..1b2e0c4aa15e --- /dev/null +++ b/java-bare-metal-solution/google-cloud-bare-metal-solution/src/test/java/com/google/cloud/baremetalsolution/v2/BareMetalSolutionClientHttpJsonTest.java @@ -0,0 +1,2187 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2; + +import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListInstancesPagedResponse; +import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListLunsPagedResponse; +import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListNetworksPagedResponse; +import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListNfsSharesPagedResponse; +import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListVolumesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.baremetalsolution.v2.stub.HttpJsonBareMetalSolutionStub; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class BareMetalSolutionClientHttpJsonTest { + private static MockHttpService mockService; + private static BareMetalSolutionClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonBareMetalSolutionStub.getMethodDescriptors(), + BareMetalSolutionSettings.getDefaultEndpoint()); + BareMetalSolutionSettings settings = + BareMetalSolutionSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + BareMetalSolutionSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = BareMetalSolutionClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void listInstancesTest() throws Exception { + Instance responsesElement = Instance.newBuilder().build(); + ListInstancesResponse expectedResponse = + ListInstancesResponse.newBuilder() + .setNextPageToken("") + .addAllInstances(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListInstancesPagedResponse pagedListResponse = client.listInstances(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInstancesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listInstancesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listInstances(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInstancesTest2() throws Exception { + Instance responsesElement = Instance.newBuilder().build(); + ListInstancesResponse expectedResponse = + ListInstancesResponse.newBuilder() + .setNextPageToken("") + .addAllInstances(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListInstancesPagedResponse pagedListResponse = client.listInstances(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInstancesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listInstancesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listInstances(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setId("id3355") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMachineType("machineType-218117087") + .setHyperthreadingEnabled(true) + .putAllLabels(new HashMap()) + .addAllLuns(new ArrayList()) + .addAllNetworks(new ArrayList()) + .setInteractiveSerialConsoleEnabled(true) + .setOsImage("osImage-1203193385") + .setPod("pod111173") + .setNetworkTemplate("networkTemplate1699249352") + .addAllLogicalInterfaces(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + + Instance actualResponse = client.getInstance(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getInstanceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + client.getInstance(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInstanceTest2() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setId("id3355") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMachineType("machineType-218117087") + .setHyperthreadingEnabled(true) + .putAllLabels(new HashMap()) + .addAllLuns(new ArrayList()) + .addAllNetworks(new ArrayList()) + .setInteractiveSerialConsoleEnabled(true) + .setOsImage("osImage-1203193385") + .setPod("pod111173") + .setNetworkTemplate("networkTemplate1699249352") + .addAllLogicalInterfaces(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-9412/locations/location-9412/instances/instance-9412"; + + Instance actualResponse = client.getInstance(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getInstanceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-9412/locations/location-9412/instances/instance-9412"; + client.getInstance(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setId("id3355") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMachineType("machineType-218117087") + .setHyperthreadingEnabled(true) + .putAllLabels(new HashMap()) + .addAllLuns(new ArrayList()) + .addAllNetworks(new ArrayList()) + .setInteractiveSerialConsoleEnabled(true) + .setOsImage("osImage-1203193385") + .setPod("pod111173") + .setNetworkTemplate("networkTemplate1699249352") + .addAllLogicalInterfaces(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Instance instance = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setId("id3355") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMachineType("machineType-218117087") + .setHyperthreadingEnabled(true) + .putAllLabels(new HashMap()) + .addAllLuns(new ArrayList()) + .addAllNetworks(new ArrayList()) + .setInteractiveSerialConsoleEnabled(true) + .setOsImage("osImage-1203193385") + .setPod("pod111173") + .setNetworkTemplate("networkTemplate1699249352") + .addAllLogicalInterfaces(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Instance actualResponse = client.updateInstanceAsync(instance, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateInstanceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Instance instance = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setId("id3355") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMachineType("machineType-218117087") + .setHyperthreadingEnabled(true) + .putAllLabels(new HashMap()) + .addAllLuns(new ArrayList()) + .addAllNetworks(new ArrayList()) + .setInteractiveSerialConsoleEnabled(true) + .setOsImage("osImage-1203193385") + .setPod("pod111173") + .setNetworkTemplate("networkTemplate1699249352") + .addAllLogicalInterfaces(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateInstanceAsync(instance, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void resetInstanceTest() throws Exception { + ResetInstanceResponse expectedResponse = ResetInstanceResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("resetInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + + ResetInstanceResponse actualResponse = client.resetInstanceAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void resetInstanceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + client.resetInstanceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void resetInstanceTest2() throws Exception { + ResetInstanceResponse expectedResponse = ResetInstanceResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("resetInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-9412/locations/location-9412/instances/instance-9412"; + + ResetInstanceResponse actualResponse = client.resetInstanceAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void resetInstanceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-9412/locations/location-9412/instances/instance-9412"; + client.resetInstanceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void startInstanceTest() throws Exception { + StartInstanceResponse expectedResponse = StartInstanceResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("startInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + + StartInstanceResponse actualResponse = client.startInstanceAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void startInstanceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + client.startInstanceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void startInstanceTest2() throws Exception { + StartInstanceResponse expectedResponse = StartInstanceResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("startInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-9412/locations/location-9412/instances/instance-9412"; + + StartInstanceResponse actualResponse = client.startInstanceAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void startInstanceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-9412/locations/location-9412/instances/instance-9412"; + client.startInstanceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void stopInstanceTest() throws Exception { + StopInstanceResponse expectedResponse = StopInstanceResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("stopInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + + StopInstanceResponse actualResponse = client.stopInstanceAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void stopInstanceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + client.stopInstanceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void stopInstanceTest2() throws Exception { + StopInstanceResponse expectedResponse = StopInstanceResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("stopInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-9412/locations/location-9412/instances/instance-9412"; + + StopInstanceResponse actualResponse = client.stopInstanceAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void stopInstanceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-9412/locations/location-9412/instances/instance-9412"; + client.stopInstanceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void detachLunTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setId("id3355") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMachineType("machineType-218117087") + .setHyperthreadingEnabled(true) + .putAllLabels(new HashMap()) + .addAllLuns(new ArrayList()) + .addAllNetworks(new ArrayList()) + .setInteractiveSerialConsoleEnabled(true) + .setOsImage("osImage-1203193385") + .setPod("pod111173") + .setNetworkTemplate("networkTemplate1699249352") + .addAllLogicalInterfaces(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("detachLunTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + InstanceName instance = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + LunName lun = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]"); + + Instance actualResponse = client.detachLunAsync(instance, lun).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void detachLunExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InstanceName instance = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + LunName lun = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]"); + client.detachLunAsync(instance, lun).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void detachLunTest2() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setId("id3355") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMachineType("machineType-218117087") + .setHyperthreadingEnabled(true) + .putAllLabels(new HashMap()) + .addAllLuns(new ArrayList()) + .addAllNetworks(new ArrayList()) + .setInteractiveSerialConsoleEnabled(true) + .setOsImage("osImage-1203193385") + .setPod("pod111173") + .setNetworkTemplate("networkTemplate1699249352") + .addAllLogicalInterfaces(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("detachLunTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + InstanceName instance = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + String lun = "lun107525"; + + Instance actualResponse = client.detachLunAsync(instance, lun).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void detachLunExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InstanceName instance = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + String lun = "lun107525"; + client.detachLunAsync(instance, lun).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void detachLunTest3() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setId("id3355") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMachineType("machineType-218117087") + .setHyperthreadingEnabled(true) + .putAllLabels(new HashMap()) + .addAllLuns(new ArrayList()) + .addAllNetworks(new ArrayList()) + .setInteractiveSerialConsoleEnabled(true) + .setOsImage("osImage-1203193385") + .setPod("pod111173") + .setNetworkTemplate("networkTemplate1699249352") + .addAllLogicalInterfaces(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("detachLunTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String instance = "projects/project-2526/locations/location-2526/instances/instance-2526"; + LunName lun = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]"); + + Instance actualResponse = client.detachLunAsync(instance, lun).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void detachLunExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String instance = "projects/project-2526/locations/location-2526/instances/instance-2526"; + LunName lun = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]"); + client.detachLunAsync(instance, lun).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void detachLunTest4() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setId("id3355") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMachineType("machineType-218117087") + .setHyperthreadingEnabled(true) + .putAllLabels(new HashMap()) + .addAllLuns(new ArrayList()) + .addAllNetworks(new ArrayList()) + .setInteractiveSerialConsoleEnabled(true) + .setOsImage("osImage-1203193385") + .setPod("pod111173") + .setNetworkTemplate("networkTemplate1699249352") + .addAllLogicalInterfaces(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("detachLunTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String instance = "projects/project-2526/locations/location-2526/instances/instance-2526"; + String lun = "lun107525"; + + Instance actualResponse = client.detachLunAsync(instance, lun).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void detachLunExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String instance = "projects/project-2526/locations/location-2526/instances/instance-2526"; + String lun = "lun107525"; + client.detachLunAsync(instance, lun).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listVolumesTest() throws Exception { + Volume responsesElement = Volume.newBuilder().build(); + ListVolumesResponse expectedResponse = + ListVolumesResponse.newBuilder() + .setNextPageToken("") + .addAllVolumes(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListVolumesPagedResponse pagedListResponse = client.listVolumes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getVolumesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listVolumesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listVolumes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listVolumesTest2() throws Exception { + Volume responsesElement = Volume.newBuilder().build(); + ListVolumesResponse expectedResponse = + ListVolumesResponse.newBuilder() + .setNextPageToken("") + .addAllVolumes(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListVolumesPagedResponse pagedListResponse = client.listVolumes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getVolumesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listVolumesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listVolumes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getVolumeTest() throws Exception { + Volume expectedResponse = + Volume.newBuilder() + .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .setId("id3355") + .setRequestedSizeGib(525454387) + .setCurrentSizeGib(72696456) + .setEmergencySizeGib(1936971120) + .setAutoGrownSizeGib(1245638678) + .setRemainingSpaceGib(1423108606) + .setSnapshotReservationDetail(Volume.SnapshotReservationDetail.newBuilder().build()) + .putAllLabels(new HashMap()) + .setSnapshotEnabled(true) + .setPod("pod111173") + .build(); + mockService.addResponse(expectedResponse); + + VolumeName name = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]"); + + Volume actualResponse = client.getVolume(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getVolumeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + VolumeName name = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]"); + client.getVolume(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getVolumeTest2() throws Exception { + Volume expectedResponse = + Volume.newBuilder() + .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .setId("id3355") + .setRequestedSizeGib(525454387) + .setCurrentSizeGib(72696456) + .setEmergencySizeGib(1936971120) + .setAutoGrownSizeGib(1245638678) + .setRemainingSpaceGib(1423108606) + .setSnapshotReservationDetail(Volume.SnapshotReservationDetail.newBuilder().build()) + .putAllLabels(new HashMap()) + .setSnapshotEnabled(true) + .setPod("pod111173") + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-4193/locations/location-4193/volumes/volume-4193"; + + Volume actualResponse = client.getVolume(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getVolumeExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-4193/locations/location-4193/volumes/volume-4193"; + client.getVolume(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateVolumeTest() throws Exception { + Volume expectedResponse = + Volume.newBuilder() + .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .setId("id3355") + .setRequestedSizeGib(525454387) + .setCurrentSizeGib(72696456) + .setEmergencySizeGib(1936971120) + .setAutoGrownSizeGib(1245638678) + .setRemainingSpaceGib(1423108606) + .setSnapshotReservationDetail(Volume.SnapshotReservationDetail.newBuilder().build()) + .putAllLabels(new HashMap()) + .setSnapshotEnabled(true) + .setPod("pod111173") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateVolumeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Volume volume = + Volume.newBuilder() + .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .setId("id3355") + .setRequestedSizeGib(525454387) + .setCurrentSizeGib(72696456) + .setEmergencySizeGib(1936971120) + .setAutoGrownSizeGib(1245638678) + .setRemainingSpaceGib(1423108606) + .setSnapshotReservationDetail(Volume.SnapshotReservationDetail.newBuilder().build()) + .putAllLabels(new HashMap()) + .setSnapshotEnabled(true) + .setPod("pod111173") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Volume actualResponse = client.updateVolumeAsync(volume, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateVolumeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Volume volume = + Volume.newBuilder() + .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .setId("id3355") + .setRequestedSizeGib(525454387) + .setCurrentSizeGib(72696456) + .setEmergencySizeGib(1936971120) + .setAutoGrownSizeGib(1245638678) + .setRemainingSpaceGib(1423108606) + .setSnapshotReservationDetail(Volume.SnapshotReservationDetail.newBuilder().build()) + .putAllLabels(new HashMap()) + .setSnapshotEnabled(true) + .setPod("pod111173") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateVolumeAsync(volume, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void resizeVolumeTest() throws Exception { + Volume expectedResponse = + Volume.newBuilder() + .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .setId("id3355") + .setRequestedSizeGib(525454387) + .setCurrentSizeGib(72696456) + .setEmergencySizeGib(1936971120) + .setAutoGrownSizeGib(1245638678) + .setRemainingSpaceGib(1423108606) + .setSnapshotReservationDetail(Volume.SnapshotReservationDetail.newBuilder().build()) + .putAllLabels(new HashMap()) + .setSnapshotEnabled(true) + .setPod("pod111173") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("resizeVolumeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + VolumeName volume = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]"); + long sizeGib = 847296130; + + Volume actualResponse = client.resizeVolumeAsync(volume, sizeGib).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void resizeVolumeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + VolumeName volume = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]"); + long sizeGib = 847296130; + client.resizeVolumeAsync(volume, sizeGib).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void resizeVolumeTest2() throws Exception { + Volume expectedResponse = + Volume.newBuilder() + .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .setId("id3355") + .setRequestedSizeGib(525454387) + .setCurrentSizeGib(72696456) + .setEmergencySizeGib(1936971120) + .setAutoGrownSizeGib(1245638678) + .setRemainingSpaceGib(1423108606) + .setSnapshotReservationDetail(Volume.SnapshotReservationDetail.newBuilder().build()) + .putAllLabels(new HashMap()) + .setSnapshotEnabled(true) + .setPod("pod111173") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("resizeVolumeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String volume = "projects/project-6830/locations/location-6830/volumes/volume-6830"; + long sizeGib = 847296130; + + Volume actualResponse = client.resizeVolumeAsync(volume, sizeGib).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void resizeVolumeExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String volume = "projects/project-6830/locations/location-6830/volumes/volume-6830"; + long sizeGib = 847296130; + client.resizeVolumeAsync(volume, sizeGib).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listNetworksTest() throws Exception { + Network responsesElement = Network.newBuilder().build(); + ListNetworksResponse expectedResponse = + ListNetworksResponse.newBuilder() + .setNextPageToken("") + .addAllNetworks(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListNetworksPagedResponse pagedListResponse = client.listNetworks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNetworksList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listNetworksExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listNetworks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNetworksTest2() throws Exception { + Network responsesElement = Network.newBuilder().build(); + ListNetworksResponse expectedResponse = + ListNetworksResponse.newBuilder() + .setNextPageToken("") + .addAllNetworks(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListNetworksPagedResponse pagedListResponse = client.listNetworks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNetworksList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listNetworksExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listNetworks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNetworkUsageTest() throws Exception { + ListNetworkUsageResponse expectedResponse = + ListNetworkUsageResponse.newBuilder().addAllNetworks(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + LocationName location = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListNetworkUsageResponse actualResponse = client.listNetworkUsage(location); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listNetworkUsageExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName location = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listNetworkUsage(location); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNetworkUsageTest2() throws Exception { + ListNetworkUsageResponse expectedResponse = + ListNetworkUsageResponse.newBuilder().addAllNetworks(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + String location = "projects/project-7132/locations/location-7132"; + + ListNetworkUsageResponse actualResponse = client.listNetworkUsage(location); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listNetworkUsageExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String location = "projects/project-7132/locations/location-7132"; + client.listNetworkUsage(location); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNetworkTest() throws Exception { + Network expectedResponse = + Network.newBuilder() + .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[NETWORK]").toString()) + .setId("id3355") + .setIpAddress("ipAddress1634032845") + .addAllMacAddress(new ArrayList()) + .setVlanId("vlanId-813989410") + .setCidr("cidr3053428") + .setVrf(VRF.newBuilder().build()) + .putAllLabels(new HashMap()) + .setServicesCidr("servicesCidr377076978") + .addAllReservations(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + NetworkName name = NetworkName.of("[PROJECT]", "[LOCATION]", "[NETWORK]"); + + Network actualResponse = client.getNetwork(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getNetworkExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + NetworkName name = NetworkName.of("[PROJECT]", "[LOCATION]", "[NETWORK]"); + client.getNetwork(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNetworkTest2() throws Exception { + Network expectedResponse = + Network.newBuilder() + .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[NETWORK]").toString()) + .setId("id3355") + .setIpAddress("ipAddress1634032845") + .addAllMacAddress(new ArrayList()) + .setVlanId("vlanId-813989410") + .setCidr("cidr3053428") + .setVrf(VRF.newBuilder().build()) + .putAllLabels(new HashMap()) + .setServicesCidr("servicesCidr377076978") + .addAllReservations(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-6795/locations/location-6795/networks/network-6795"; + + Network actualResponse = client.getNetwork(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getNetworkExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-6795/locations/location-6795/networks/network-6795"; + client.getNetwork(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateNetworkTest() throws Exception { + Network expectedResponse = + Network.newBuilder() + .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[NETWORK]").toString()) + .setId("id3355") + .setIpAddress("ipAddress1634032845") + .addAllMacAddress(new ArrayList()) + .setVlanId("vlanId-813989410") + .setCidr("cidr3053428") + .setVrf(VRF.newBuilder().build()) + .putAllLabels(new HashMap()) + .setServicesCidr("servicesCidr377076978") + .addAllReservations(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateNetworkTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Network network = + Network.newBuilder() + .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[NETWORK]").toString()) + .setId("id3355") + .setIpAddress("ipAddress1634032845") + .addAllMacAddress(new ArrayList()) + .setVlanId("vlanId-813989410") + .setCidr("cidr3053428") + .setVrf(VRF.newBuilder().build()) + .putAllLabels(new HashMap()) + .setServicesCidr("servicesCidr377076978") + .addAllReservations(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Network actualResponse = client.updateNetworkAsync(network, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateNetworkExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Network network = + Network.newBuilder() + .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[NETWORK]").toString()) + .setId("id3355") + .setIpAddress("ipAddress1634032845") + .addAllMacAddress(new ArrayList()) + .setVlanId("vlanId-813989410") + .setCidr("cidr3053428") + .setVrf(VRF.newBuilder().build()) + .putAllLabels(new HashMap()) + .setServicesCidr("servicesCidr377076978") + .addAllReservations(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateNetworkAsync(network, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getLunTest() throws Exception { + Lun expectedResponse = + Lun.newBuilder() + .setName(LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString()) + .setId("id3355") + .setSizeGb(2105542105) + .setStorageVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .setShareable(true) + .setBootLun(true) + .setWwid("wwid3662843") + .build(); + mockService.addResponse(expectedResponse); + + LunName name = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]"); + + Lun actualResponse = client.getLun(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getLunExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LunName name = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]"); + client.getLun(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLunTest2() throws Exception { + Lun expectedResponse = + Lun.newBuilder() + .setName(LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString()) + .setId("id3355") + .setSizeGb(2105542105) + .setStorageVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .setShareable(true) + .setBootLun(true) + .setWwid("wwid3662843") + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-5639/locations/location-5639/volumes/volume-5639/luns/lun-5639"; + + Lun actualResponse = client.getLun(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getLunExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-5639/locations/location-5639/volumes/volume-5639/luns/lun-5639"; + client.getLun(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLunsTest() throws Exception { + Lun responsesElement = Lun.newBuilder().build(); + ListLunsResponse expectedResponse = + ListLunsResponse.newBuilder() + .setNextPageToken("") + .addAllLuns(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + VolumeName parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]"); + + ListLunsPagedResponse pagedListResponse = client.listLuns(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLunsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listLunsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + VolumeName parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]"); + client.listLuns(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLunsTest2() throws Exception { + Lun responsesElement = Lun.newBuilder().build(); + ListLunsResponse expectedResponse = + ListLunsResponse.newBuilder() + .setNextPageToken("") + .addAllLuns(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-402/locations/location-402/volumes/volume-402"; + + ListLunsPagedResponse pagedListResponse = client.listLuns(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLunsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listLunsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-402/locations/location-402/volumes/volume-402"; + client.listLuns(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNfsShareTest() throws Exception { + NfsShare expectedResponse = + NfsShare.newBuilder() + .setName(NFSShareName.of("[PROJECT]", "[LOCATION]", "[NFS_SHARE]").toString()) + .setNfsShareId("nfsShareId-1834781921") + .setVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .addAllAllowedClients(new ArrayList()) + .putAllLabels(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + NFSShareName name = NFSShareName.of("[PROJECT]", "[LOCATION]", "[NFS_SHARE]"); + + NfsShare actualResponse = client.getNfsShare(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getNfsShareExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + NFSShareName name = NFSShareName.of("[PROJECT]", "[LOCATION]", "[NFS_SHARE]"); + client.getNfsShare(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNfsShareTest2() throws Exception { + NfsShare expectedResponse = + NfsShare.newBuilder() + .setName(NFSShareName.of("[PROJECT]", "[LOCATION]", "[NFS_SHARE]").toString()) + .setNfsShareId("nfsShareId-1834781921") + .setVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .addAllAllowedClients(new ArrayList()) + .putAllLabels(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-1365/locations/location-1365/nfsShares/nfsShare-1365"; + + NfsShare actualResponse = client.getNfsShare(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getNfsShareExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-1365/locations/location-1365/nfsShares/nfsShare-1365"; + client.getNfsShare(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNfsSharesTest() throws Exception { + NfsShare responsesElement = NfsShare.newBuilder().build(); + ListNfsSharesResponse expectedResponse = + ListNfsSharesResponse.newBuilder() + .setNextPageToken("") + .addAllNfsShares(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListNfsSharesPagedResponse pagedListResponse = client.listNfsShares(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNfsSharesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listNfsSharesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listNfsShares(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNfsSharesTest2() throws Exception { + NfsShare responsesElement = NfsShare.newBuilder().build(); + ListNfsSharesResponse expectedResponse = + ListNfsSharesResponse.newBuilder() + .setNextPageToken("") + .addAllNfsShares(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListNfsSharesPagedResponse pagedListResponse = client.listNfsShares(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNfsSharesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listNfsSharesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listNfsShares(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateNfsShareTest() throws Exception { + NfsShare expectedResponse = + NfsShare.newBuilder() + .setName(NFSShareName.of("[PROJECT]", "[LOCATION]", "[NFS_SHARE]").toString()) + .setNfsShareId("nfsShareId-1834781921") + .setVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .addAllAllowedClients(new ArrayList()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateNfsShareTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + NfsShare nfsShare = + NfsShare.newBuilder() + .setName(NFSShareName.of("[PROJECT]", "[LOCATION]", "[NFS_SHARE]").toString()) + .setNfsShareId("nfsShareId-1834781921") + .setVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .addAllAllowedClients(new ArrayList()) + .putAllLabels(new HashMap()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + NfsShare actualResponse = client.updateNfsShareAsync(nfsShare, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateNfsShareExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + NfsShare nfsShare = + NfsShare.newBuilder() + .setName(NFSShareName.of("[PROJECT]", "[LOCATION]", "[NFS_SHARE]").toString()) + .setNfsShareId("nfsShareId-1834781921") + .setVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .addAllAllowedClients(new ArrayList()) + .putAllLabels(new HashMap()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateNfsShareAsync(nfsShare, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } +} diff --git a/java-bare-metal-solution/google-cloud-bare-metal-solution/src/test/java/com/google/cloud/baremetalsolution/v2/BareMetalSolutionClientTest.java b/java-bare-metal-solution/google-cloud-bare-metal-solution/src/test/java/com/google/cloud/baremetalsolution/v2/BareMetalSolutionClientTest.java index 8d5d1588746d..7a2ef9fae28c 100644 --- a/java-bare-metal-solution/google-cloud-bare-metal-solution/src/test/java/com/google/cloud/baremetalsolution/v2/BareMetalSolutionClientTest.java +++ b/java-bare-metal-solution/google-cloud-bare-metal-solution/src/test/java/com/google/cloud/baremetalsolution/v2/BareMetalSolutionClientTest.java @@ -19,8 +19,7 @@ import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListInstancesPagedResponse; import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListLunsPagedResponse; import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListNetworksPagedResponse; -import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListSnapshotSchedulePoliciesPagedResponse; -import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListVolumeSnapshotsPagedResponse; +import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListNfsSharesPagedResponse; import static com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient.ListVolumesPagedResponse; import com.google.api.gax.core.NoCredentialsProvider; @@ -35,7 +34,6 @@ import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; -import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; import com.google.protobuf.Timestamp; import io.grpc.StatusRuntimeException; @@ -185,6 +183,7 @@ public void getInstanceTest() throws Exception { Instance expectedResponse = Instance.newBuilder() .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setId("id3355") .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .setMachineType("machineType-218117087") @@ -193,6 +192,10 @@ public void getInstanceTest() throws Exception { .addAllLuns(new ArrayList()) .addAllNetworks(new ArrayList()) .setInteractiveSerialConsoleEnabled(true) + .setOsImage("osImage-1203193385") + .setPod("pod111173") + .setNetworkTemplate("networkTemplate1699249352") + .addAllLogicalInterfaces(new ArrayList()) .build(); mockBareMetalSolution.addResponse(expectedResponse); @@ -231,6 +234,7 @@ public void getInstanceTest2() throws Exception { Instance expectedResponse = Instance.newBuilder() .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setId("id3355") .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .setMachineType("machineType-218117087") @@ -239,6 +243,10 @@ public void getInstanceTest2() throws Exception { .addAllLuns(new ArrayList()) .addAllNetworks(new ArrayList()) .setInteractiveSerialConsoleEnabled(true) + .setOsImage("osImage-1203193385") + .setPod("pod111173") + .setNetworkTemplate("networkTemplate1699249352") + .addAllLogicalInterfaces(new ArrayList()) .build(); mockBareMetalSolution.addResponse(expectedResponse); @@ -273,26 +281,44 @@ public void getInstanceExceptionTest2() throws Exception { } @Test - public void resetInstanceTest() throws Exception { - ResetInstanceResponse expectedResponse = ResetInstanceResponse.newBuilder().build(); + public void updateInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setId("id3355") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMachineType("machineType-218117087") + .setHyperthreadingEnabled(true) + .putAllLabels(new HashMap()) + .addAllLuns(new ArrayList()) + .addAllNetworks(new ArrayList()) + .setInteractiveSerialConsoleEnabled(true) + .setOsImage("osImage-1203193385") + .setPod("pod111173") + .setNetworkTemplate("networkTemplate1699249352") + .addAllLogicalInterfaces(new ArrayList()) + .build(); Operation resultOperation = Operation.newBuilder() - .setName("resetInstanceTest") + .setName("updateInstanceTest") .setDone(true) .setResponse(Any.pack(expectedResponse)) .build(); mockBareMetalSolution.addResponse(resultOperation); - InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + Instance instance = Instance.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - ResetInstanceResponse actualResponse = client.resetInstanceAsync(name).get(); + Instance actualResponse = client.updateInstanceAsync(instance, updateMask).get(); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockBareMetalSolution.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ResetInstanceRequest actualRequest = ((ResetInstanceRequest) actualRequests.get(0)); + UpdateInstanceRequest actualRequest = ((UpdateInstanceRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(instance, actualRequest.getInstance()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -300,13 +326,14 @@ public void resetInstanceTest() throws Exception { } @Test - public void resetInstanceExceptionTest() throws Exception { + public void updateInstanceExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockBareMetalSolution.addException(exception); try { - InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); - client.resetInstanceAsync(name).get(); + Instance instance = Instance.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateInstanceAsync(instance, updateMask).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); @@ -316,7 +343,7 @@ public void resetInstanceExceptionTest() throws Exception { } @Test - public void resetInstanceTest2() throws Exception { + public void resetInstanceTest() throws Exception { ResetInstanceResponse expectedResponse = ResetInstanceResponse.newBuilder().build(); Operation resultOperation = Operation.newBuilder() @@ -326,7 +353,7 @@ public void resetInstanceTest2() throws Exception { .build(); mockBareMetalSolution.addResponse(resultOperation); - String name = "name3373707"; + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); ResetInstanceResponse actualResponse = client.resetInstanceAsync(name).get(); Assert.assertEquals(expectedResponse, actualResponse); @@ -335,7 +362,7 @@ public void resetInstanceTest2() throws Exception { Assert.assertEquals(1, actualRequests.size()); ResetInstanceRequest actualRequest = ((ResetInstanceRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -343,12 +370,12 @@ public void resetInstanceTest2() throws Exception { } @Test - public void resetInstanceExceptionTest2() throws Exception { + public void resetInstanceExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockBareMetalSolution.addException(exception); try { - String name = "name3373707"; + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); client.resetInstanceAsync(name).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { @@ -359,29 +386,26 @@ public void resetInstanceExceptionTest2() throws Exception { } @Test - public void listVolumesTest() throws Exception { - Volume responsesElement = Volume.newBuilder().build(); - ListVolumesResponse expectedResponse = - ListVolumesResponse.newBuilder() - .setNextPageToken("") - .addAllVolumes(Arrays.asList(responsesElement)) + public void resetInstanceTest2() throws Exception { + ResetInstanceResponse expectedResponse = ResetInstanceResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("resetInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) .build(); - mockBareMetalSolution.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListVolumesPagedResponse pagedListResponse = client.listVolumes(parent); + mockBareMetalSolution.addResponse(resultOperation); - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + String name = "name3373707"; - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getVolumesList().get(0), resources.get(0)); + ResetInstanceResponse actualResponse = client.resetInstanceAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockBareMetalSolution.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListVolumesRequest actualRequest = ((ListVolumesRequest) actualRequests.get(0)); + ResetInstanceRequest actualRequest = ((ResetInstanceRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -389,43 +413,42 @@ public void listVolumesTest() throws Exception { } @Test - public void listVolumesExceptionTest() throws Exception { + public void resetInstanceExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockBareMetalSolution.addException(exception); try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listVolumes(parent); + String name = "name3373707"; + client.resetInstanceAsync(name).get(); Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - public void listVolumesTest2() throws Exception { - Volume responsesElement = Volume.newBuilder().build(); - ListVolumesResponse expectedResponse = - ListVolumesResponse.newBuilder() - .setNextPageToken("") - .addAllVolumes(Arrays.asList(responsesElement)) + public void startInstanceTest() throws Exception { + StartInstanceResponse expectedResponse = StartInstanceResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("startInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) .build(); - mockBareMetalSolution.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListVolumesPagedResponse pagedListResponse = client.listVolumes(parent); + mockBareMetalSolution.addResponse(resultOperation); - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getVolumesList().get(0), resources.get(0)); + StartInstanceResponse actualResponse = client.startInstanceAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockBareMetalSolution.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListVolumesRequest actualRequest = ((ListVolumesRequest) actualRequests.get(0)); + StartInstanceRequest actualRequest = ((StartInstanceRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -433,46 +456,42 @@ public void listVolumesTest2() throws Exception { } @Test - public void listVolumesExceptionTest2() throws Exception { + public void startInstanceExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockBareMetalSolution.addException(exception); try { - String parent = "parent-995424086"; - client.listVolumes(parent); + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + client.startInstanceAsync(name).get(); Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - public void getVolumeTest() throws Exception { - Volume expectedResponse = - Volume.newBuilder() - .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) - .setRequestedSizeGib(525454387) - .setCurrentSizeGib(72696456) - .setAutoGrownSizeGib(1245638678) - .setRemainingSpaceGib(1423108606) - .setSnapshotReservationDetail(Volume.SnapshotReservationDetail.newBuilder().build()) - .setSnapshotSchedulePolicy( - SnapshotSchedulePolicyName.of( - "[PROJECT]", "[LOCATION]", "[SNAPSHOT_SCHEDULE_POLICY]") - .toString()) + public void startInstanceTest2() throws Exception { + StartInstanceResponse expectedResponse = StartInstanceResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("startInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) .build(); - mockBareMetalSolution.addResponse(expectedResponse); + mockBareMetalSolution.addResponse(resultOperation); - VolumeName name = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]"); + String name = "name3373707"; - Volume actualResponse = client.getVolume(name); + StartInstanceResponse actualResponse = client.startInstanceAsync(name).get(); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockBareMetalSolution.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetVolumeRequest actualRequest = ((GetVolumeRequest) actualRequests.get(0)); + StartInstanceRequest actualRequest = ((StartInstanceRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -480,46 +499,42 @@ public void getVolumeTest() throws Exception { } @Test - public void getVolumeExceptionTest() throws Exception { + public void startInstanceExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockBareMetalSolution.addException(exception); try { - VolumeName name = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]"); - client.getVolume(name); + String name = "name3373707"; + client.startInstanceAsync(name).get(); Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - public void getVolumeTest2() throws Exception { - Volume expectedResponse = - Volume.newBuilder() - .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) - .setRequestedSizeGib(525454387) - .setCurrentSizeGib(72696456) - .setAutoGrownSizeGib(1245638678) - .setRemainingSpaceGib(1423108606) - .setSnapshotReservationDetail(Volume.SnapshotReservationDetail.newBuilder().build()) - .setSnapshotSchedulePolicy( - SnapshotSchedulePolicyName.of( - "[PROJECT]", "[LOCATION]", "[SNAPSHOT_SCHEDULE_POLICY]") - .toString()) + public void stopInstanceTest() throws Exception { + StopInstanceResponse expectedResponse = StopInstanceResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("stopInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) .build(); - mockBareMetalSolution.addResponse(expectedResponse); + mockBareMetalSolution.addResponse(resultOperation); - String name = "name3373707"; + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); - Volume actualResponse = client.getVolume(name); + StopInstanceResponse actualResponse = client.stopInstanceAsync(name).get(); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockBareMetalSolution.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetVolumeRequest actualRequest = ((GetVolumeRequest) actualRequests.get(0)); + StopInstanceRequest actualRequest = ((StopInstanceRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -527,54 +542,42 @@ public void getVolumeTest2() throws Exception { } @Test - public void getVolumeExceptionTest2() throws Exception { + public void stopInstanceExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockBareMetalSolution.addException(exception); try { - String name = "name3373707"; - client.getVolume(name); + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + client.stopInstanceAsync(name).get(); Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - public void updateVolumeTest() throws Exception { - Volume expectedResponse = - Volume.newBuilder() - .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) - .setRequestedSizeGib(525454387) - .setCurrentSizeGib(72696456) - .setAutoGrownSizeGib(1245638678) - .setRemainingSpaceGib(1423108606) - .setSnapshotReservationDetail(Volume.SnapshotReservationDetail.newBuilder().build()) - .setSnapshotSchedulePolicy( - SnapshotSchedulePolicyName.of( - "[PROJECT]", "[LOCATION]", "[SNAPSHOT_SCHEDULE_POLICY]") - .toString()) - .build(); + public void stopInstanceTest2() throws Exception { + StopInstanceResponse expectedResponse = StopInstanceResponse.newBuilder().build(); Operation resultOperation = Operation.newBuilder() - .setName("updateVolumeTest") + .setName("stopInstanceTest") .setDone(true) .setResponse(Any.pack(expectedResponse)) .build(); mockBareMetalSolution.addResponse(resultOperation); - Volume volume = Volume.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); + String name = "name3373707"; - Volume actualResponse = client.updateVolumeAsync(volume, updateMask).get(); + StopInstanceResponse actualResponse = client.stopInstanceAsync(name).get(); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockBareMetalSolution.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UpdateVolumeRequest actualRequest = ((UpdateVolumeRequest) actualRequests.get(0)); + StopInstanceRequest actualRequest = ((StopInstanceRequest) actualRequests.get(0)); - Assert.assertEquals(volume, actualRequest.getVolume()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -582,14 +585,13 @@ public void updateVolumeTest() throws Exception { } @Test - public void updateVolumeExceptionTest() throws Exception { + public void stopInstanceExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockBareMetalSolution.addException(exception); try { - Volume volume = Volume.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateVolumeAsync(volume, updateMask).get(); + String name = "name3373707"; + client.stopInstanceAsync(name).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); @@ -599,29 +601,44 @@ public void updateVolumeExceptionTest() throws Exception { } @Test - public void listNetworksTest() throws Exception { - Network responsesElement = Network.newBuilder().build(); - ListNetworksResponse expectedResponse = - ListNetworksResponse.newBuilder() - .setNextPageToken("") - .addAllNetworks(Arrays.asList(responsesElement)) + public void detachLunTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setId("id3355") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMachineType("machineType-218117087") + .setHyperthreadingEnabled(true) + .putAllLabels(new HashMap()) + .addAllLuns(new ArrayList()) + .addAllNetworks(new ArrayList()) + .setInteractiveSerialConsoleEnabled(true) + .setOsImage("osImage-1203193385") + .setPod("pod111173") + .setNetworkTemplate("networkTemplate1699249352") + .addAllLogicalInterfaces(new ArrayList()) .build(); - mockBareMetalSolution.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListNetworksPagedResponse pagedListResponse = client.listNetworks(parent); + Operation resultOperation = + Operation.newBuilder() + .setName("detachLunTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBareMetalSolution.addResponse(resultOperation); - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + InstanceName instance = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + LunName lun = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]"); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getNetworksList().get(0), resources.get(0)); + Instance actualResponse = client.detachLunAsync(instance, lun).get(); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockBareMetalSolution.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListNetworksRequest actualRequest = ((ListNetworksRequest) actualRequests.get(0)); + DetachLunRequest actualRequest = ((DetachLunRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(instance.toString(), actualRequest.getInstance()); + Assert.assertEquals(lun.toString(), actualRequest.getLun()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -629,43 +646,61 @@ public void listNetworksTest() throws Exception { } @Test - public void listNetworksExceptionTest() throws Exception { + public void detachLunExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockBareMetalSolution.addException(exception); try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listNetworks(parent); + InstanceName instance = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + LunName lun = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]"); + client.detachLunAsync(instance, lun).get(); Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - public void listNetworksTest2() throws Exception { - Network responsesElement = Network.newBuilder().build(); - ListNetworksResponse expectedResponse = - ListNetworksResponse.newBuilder() - .setNextPageToken("") - .addAllNetworks(Arrays.asList(responsesElement)) + public void detachLunTest2() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setId("id3355") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMachineType("machineType-218117087") + .setHyperthreadingEnabled(true) + .putAllLabels(new HashMap()) + .addAllLuns(new ArrayList()) + .addAllNetworks(new ArrayList()) + .setInteractiveSerialConsoleEnabled(true) + .setOsImage("osImage-1203193385") + .setPod("pod111173") + .setNetworkTemplate("networkTemplate1699249352") + .addAllLogicalInterfaces(new ArrayList()) .build(); - mockBareMetalSolution.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListNetworksPagedResponse pagedListResponse = client.listNetworks(parent); + Operation resultOperation = + Operation.newBuilder() + .setName("detachLunTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBareMetalSolution.addResponse(resultOperation); - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + InstanceName instance = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + String lun = "lun107525"; - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getNetworksList().get(0), resources.get(0)); + Instance actualResponse = client.detachLunAsync(instance, lun).get(); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockBareMetalSolution.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListNetworksRequest actualRequest = ((ListNetworksRequest) actualRequests.get(0)); + DetachLunRequest actualRequest = ((DetachLunRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(instance.toString(), actualRequest.getInstance()); + Assert.assertEquals(lun, actualRequest.getLun()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -673,43 +708,61 @@ public void listNetworksTest2() throws Exception { } @Test - public void listNetworksExceptionTest2() throws Exception { + public void detachLunExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockBareMetalSolution.addException(exception); try { - String parent = "parent-995424086"; - client.listNetworks(parent); + InstanceName instance = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + String lun = "lun107525"; + client.detachLunAsync(instance, lun).get(); Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - public void getNetworkTest() throws Exception { - Network expectedResponse = - Network.newBuilder() - .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[NETWORK]").toString()) - .setNetwork("network1843485230") - .setIpAddress("ipAddress1634032845") - .addAllMacAddress(new ArrayList()) - .setVlanId("vlanId-813989410") - .setCidr("cidr3053428") - .setVrf(VRF.newBuilder().build()) + public void detachLunTest3() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setId("id3355") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMachineType("machineType-218117087") + .setHyperthreadingEnabled(true) + .putAllLabels(new HashMap()) + .addAllLuns(new ArrayList()) + .addAllNetworks(new ArrayList()) + .setInteractiveSerialConsoleEnabled(true) + .setOsImage("osImage-1203193385") + .setPod("pod111173") + .setNetworkTemplate("networkTemplate1699249352") + .addAllLogicalInterfaces(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("detachLunTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) .build(); - mockBareMetalSolution.addResponse(expectedResponse); + mockBareMetalSolution.addResponse(resultOperation); - NetworkName name = NetworkName.of("[PROJECT]", "[LOCATION]", "[NETWORK]"); + String instance = "instance555127957"; + LunName lun = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]"); - Network actualResponse = client.getNetwork(name); + Instance actualResponse = client.detachLunAsync(instance, lun).get(); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockBareMetalSolution.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetNetworkRequest actualRequest = ((GetNetworkRequest) actualRequests.get(0)); + DetachLunRequest actualRequest = ((DetachLunRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(instance, actualRequest.getInstance()); + Assert.assertEquals(lun.toString(), actualRequest.getLun()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -717,43 +770,61 @@ public void getNetworkTest() throws Exception { } @Test - public void getNetworkExceptionTest() throws Exception { + public void detachLunExceptionTest3() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockBareMetalSolution.addException(exception); try { - NetworkName name = NetworkName.of("[PROJECT]", "[LOCATION]", "[NETWORK]"); - client.getNetwork(name); + String instance = "instance555127957"; + LunName lun = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]"); + client.detachLunAsync(instance, lun).get(); Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - public void getNetworkTest2() throws Exception { - Network expectedResponse = - Network.newBuilder() - .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[NETWORK]").toString()) - .setNetwork("network1843485230") - .setIpAddress("ipAddress1634032845") - .addAllMacAddress(new ArrayList()) - .setVlanId("vlanId-813989410") - .setCidr("cidr3053428") - .setVrf(VRF.newBuilder().build()) + public void detachLunTest4() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setId("id3355") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setMachineType("machineType-218117087") + .setHyperthreadingEnabled(true) + .putAllLabels(new HashMap()) + .addAllLuns(new ArrayList()) + .addAllNetworks(new ArrayList()) + .setInteractiveSerialConsoleEnabled(true) + .setOsImage("osImage-1203193385") + .setPod("pod111173") + .setNetworkTemplate("networkTemplate1699249352") + .addAllLogicalInterfaces(new ArrayList()) .build(); - mockBareMetalSolution.addResponse(expectedResponse); + Operation resultOperation = + Operation.newBuilder() + .setName("detachLunTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBareMetalSolution.addResponse(resultOperation); - String name = "name3373707"; + String instance = "instance555127957"; + String lun = "lun107525"; - Network actualResponse = client.getNetwork(name); + Instance actualResponse = client.detachLunAsync(instance, lun).get(); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockBareMetalSolution.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetNetworkRequest actualRequest = ((GetNetworkRequest) actualRequests.get(0)); + DetachLunRequest actualRequest = ((DetachLunRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(instance, actualRequest.getInstance()); + Assert.assertEquals(lun, actualRequest.getLun()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -761,44 +832,44 @@ public void getNetworkTest2() throws Exception { } @Test - public void getNetworkExceptionTest2() throws Exception { + public void detachLunExceptionTest4() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockBareMetalSolution.addException(exception); try { - String name = "name3373707"; - client.getNetwork(name); + String instance = "instance555127957"; + String lun = "lun107525"; + client.detachLunAsync(instance, lun).get(); Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - public void listSnapshotSchedulePoliciesTest() throws Exception { - SnapshotSchedulePolicy responsesElement = SnapshotSchedulePolicy.newBuilder().build(); - ListSnapshotSchedulePoliciesResponse expectedResponse = - ListSnapshotSchedulePoliciesResponse.newBuilder() + public void listVolumesTest() throws Exception { + Volume responsesElement = Volume.newBuilder().build(); + ListVolumesResponse expectedResponse = + ListVolumesResponse.newBuilder() .setNextPageToken("") - .addAllSnapshotSchedulePolicies(Arrays.asList(responsesElement)) + .addAllVolumes(Arrays.asList(responsesElement)) .build(); mockBareMetalSolution.addResponse(expectedResponse); LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ListSnapshotSchedulePoliciesPagedResponse pagedListResponse = - client.listSnapshotSchedulePolicies(parent); + ListVolumesPagedResponse pagedListResponse = client.listVolumes(parent); - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); - Assert.assertEquals( - expectedResponse.getSnapshotSchedulePoliciesList().get(0), resources.get(0)); + Assert.assertEquals(expectedResponse.getVolumesList().get(0), resources.get(0)); List actualRequests = mockBareMetalSolution.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListSnapshotSchedulePoliciesRequest actualRequest = - ((ListSnapshotSchedulePoliciesRequest) actualRequests.get(0)); + ListVolumesRequest actualRequest = ((ListVolumesRequest) actualRequests.get(0)); Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( @@ -808,13 +879,13 @@ public void listSnapshotSchedulePoliciesTest() throws Exception { } @Test - public void listSnapshotSchedulePoliciesExceptionTest() throws Exception { + public void listVolumesExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockBareMetalSolution.addException(exception); try { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listSnapshotSchedulePolicies(parent); + client.listVolumes(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -822,30 +893,27 @@ public void listSnapshotSchedulePoliciesExceptionTest() throws Exception { } @Test - public void listSnapshotSchedulePoliciesTest2() throws Exception { - SnapshotSchedulePolicy responsesElement = SnapshotSchedulePolicy.newBuilder().build(); - ListSnapshotSchedulePoliciesResponse expectedResponse = - ListSnapshotSchedulePoliciesResponse.newBuilder() + public void listVolumesTest2() throws Exception { + Volume responsesElement = Volume.newBuilder().build(); + ListVolumesResponse expectedResponse = + ListVolumesResponse.newBuilder() .setNextPageToken("") - .addAllSnapshotSchedulePolicies(Arrays.asList(responsesElement)) + .addAllVolumes(Arrays.asList(responsesElement)) .build(); mockBareMetalSolution.addResponse(expectedResponse); String parent = "parent-995424086"; - ListSnapshotSchedulePoliciesPagedResponse pagedListResponse = - client.listSnapshotSchedulePolicies(parent); + ListVolumesPagedResponse pagedListResponse = client.listVolumes(parent); - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); - Assert.assertEquals( - expectedResponse.getSnapshotSchedulePoliciesList().get(0), resources.get(0)); + Assert.assertEquals(expectedResponse.getVolumesList().get(0), resources.get(0)); List actualRequests = mockBareMetalSolution.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListSnapshotSchedulePoliciesRequest actualRequest = - ((ListSnapshotSchedulePoliciesRequest) actualRequests.get(0)); + ListVolumesRequest actualRequest = ((ListVolumesRequest) actualRequests.get(0)); Assert.assertEquals(parent, actualRequest.getParent()); Assert.assertTrue( @@ -855,13 +923,13 @@ public void listSnapshotSchedulePoliciesTest2() throws Exception { } @Test - public void listSnapshotSchedulePoliciesExceptionTest2() throws Exception { + public void listVolumesExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockBareMetalSolution.addException(exception); try { String parent = "parent-995424086"; - client.listSnapshotSchedulePolicies(parent); + client.listVolumes(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -869,28 +937,31 @@ public void listSnapshotSchedulePoliciesExceptionTest2() throws Exception { } @Test - public void getSnapshotSchedulePolicyTest() throws Exception { - SnapshotSchedulePolicy expectedResponse = - SnapshotSchedulePolicy.newBuilder() - .setName( - SnapshotSchedulePolicyName.of( - "[PROJECT]", "[LOCATION]", "[SNAPSHOT_SCHEDULE_POLICY]") - .toString()) - .setDescription("description-1724546052") - .addAllSchedules(new ArrayList()) + public void getVolumeTest() throws Exception { + Volume expectedResponse = + Volume.newBuilder() + .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .setId("id3355") + .setRequestedSizeGib(525454387) + .setCurrentSizeGib(72696456) + .setEmergencySizeGib(1936971120) + .setAutoGrownSizeGib(1245638678) + .setRemainingSpaceGib(1423108606) + .setSnapshotReservationDetail(Volume.SnapshotReservationDetail.newBuilder().build()) + .putAllLabels(new HashMap()) + .setSnapshotEnabled(true) + .setPod("pod111173") .build(); mockBareMetalSolution.addResponse(expectedResponse); - SnapshotSchedulePolicyName name = - SnapshotSchedulePolicyName.of("[PROJECT]", "[LOCATION]", "[SNAPSHOT_SCHEDULE_POLICY]"); + VolumeName name = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]"); - SnapshotSchedulePolicy actualResponse = client.getSnapshotSchedulePolicy(name); + Volume actualResponse = client.getVolume(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockBareMetalSolution.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetSnapshotSchedulePolicyRequest actualRequest = - ((GetSnapshotSchedulePolicyRequest) actualRequests.get(0)); + GetVolumeRequest actualRequest = ((GetVolumeRequest) actualRequests.get(0)); Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( @@ -900,14 +971,13 @@ public void getSnapshotSchedulePolicyTest() throws Exception { } @Test - public void getSnapshotSchedulePolicyExceptionTest() throws Exception { + public void getVolumeExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockBareMetalSolution.addException(exception); try { - SnapshotSchedulePolicyName name = - SnapshotSchedulePolicyName.of("[PROJECT]", "[LOCATION]", "[SNAPSHOT_SCHEDULE_POLICY]"); - client.getSnapshotSchedulePolicy(name); + VolumeName name = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]"); + client.getVolume(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -915,27 +985,31 @@ public void getSnapshotSchedulePolicyExceptionTest() throws Exception { } @Test - public void getSnapshotSchedulePolicyTest2() throws Exception { - SnapshotSchedulePolicy expectedResponse = - SnapshotSchedulePolicy.newBuilder() - .setName( - SnapshotSchedulePolicyName.of( - "[PROJECT]", "[LOCATION]", "[SNAPSHOT_SCHEDULE_POLICY]") - .toString()) - .setDescription("description-1724546052") - .addAllSchedules(new ArrayList()) + public void getVolumeTest2() throws Exception { + Volume expectedResponse = + Volume.newBuilder() + .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .setId("id3355") + .setRequestedSizeGib(525454387) + .setCurrentSizeGib(72696456) + .setEmergencySizeGib(1936971120) + .setAutoGrownSizeGib(1245638678) + .setRemainingSpaceGib(1423108606) + .setSnapshotReservationDetail(Volume.SnapshotReservationDetail.newBuilder().build()) + .putAllLabels(new HashMap()) + .setSnapshotEnabled(true) + .setPod("pod111173") .build(); mockBareMetalSolution.addResponse(expectedResponse); String name = "name3373707"; - SnapshotSchedulePolicy actualResponse = client.getSnapshotSchedulePolicy(name); + Volume actualResponse = client.getVolume(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockBareMetalSolution.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetSnapshotSchedulePolicyRequest actualRequest = - ((GetSnapshotSchedulePolicyRequest) actualRequests.get(0)); + GetVolumeRequest actualRequest = ((GetVolumeRequest) actualRequests.get(0)); Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( @@ -945,13 +1019,13 @@ public void getSnapshotSchedulePolicyTest2() throws Exception { } @Test - public void getSnapshotSchedulePolicyExceptionTest2() throws Exception { + public void getVolumeExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockBareMetalSolution.addException(exception); try { String name = "name3373707"; - client.getSnapshotSchedulePolicy(name); + client.getVolume(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -959,35 +1033,41 @@ public void getSnapshotSchedulePolicyExceptionTest2() throws Exception { } @Test - public void createSnapshotSchedulePolicyTest() throws Exception { - SnapshotSchedulePolicy expectedResponse = - SnapshotSchedulePolicy.newBuilder() - .setName( - SnapshotSchedulePolicyName.of( - "[PROJECT]", "[LOCATION]", "[SNAPSHOT_SCHEDULE_POLICY]") - .toString()) - .setDescription("description-1724546052") - .addAllSchedules(new ArrayList()) + public void updateVolumeTest() throws Exception { + Volume expectedResponse = + Volume.newBuilder() + .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .setId("id3355") + .setRequestedSizeGib(525454387) + .setCurrentSizeGib(72696456) + .setEmergencySizeGib(1936971120) + .setAutoGrownSizeGib(1245638678) + .setRemainingSpaceGib(1423108606) + .setSnapshotReservationDetail(Volume.SnapshotReservationDetail.newBuilder().build()) + .putAllLabels(new HashMap()) + .setSnapshotEnabled(true) + .setPod("pod111173") .build(); - mockBareMetalSolution.addResponse(expectedResponse); + Operation resultOperation = + Operation.newBuilder() + .setName("updateVolumeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBareMetalSolution.addResponse(resultOperation); - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - SnapshotSchedulePolicy snapshotSchedulePolicy = SnapshotSchedulePolicy.newBuilder().build(); - String snapshotSchedulePolicyId = "snapshotSchedulePolicyId1929948040"; + Volume volume = Volume.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - SnapshotSchedulePolicy actualResponse = - client.createSnapshotSchedulePolicy( - parent, snapshotSchedulePolicy, snapshotSchedulePolicyId); + Volume actualResponse = client.updateVolumeAsync(volume, updateMask).get(); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockBareMetalSolution.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateSnapshotSchedulePolicyRequest actualRequest = - ((CreateSnapshotSchedulePolicyRequest) actualRequests.get(0)); + UpdateVolumeRequest actualRequest = ((UpdateVolumeRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(snapshotSchedulePolicy, actualRequest.getSnapshotSchedulePolicy()); - Assert.assertEquals(snapshotSchedulePolicyId, actualRequest.getSnapshotSchedulePolicyId()); + Assert.assertEquals(volume, actualRequest.getVolume()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -995,51 +1075,58 @@ public void createSnapshotSchedulePolicyTest() throws Exception { } @Test - public void createSnapshotSchedulePolicyExceptionTest() throws Exception { + public void updateVolumeExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockBareMetalSolution.addException(exception); try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - SnapshotSchedulePolicy snapshotSchedulePolicy = SnapshotSchedulePolicy.newBuilder().build(); - String snapshotSchedulePolicyId = "snapshotSchedulePolicyId1929948040"; - client.createSnapshotSchedulePolicy(parent, snapshotSchedulePolicy, snapshotSchedulePolicyId); + Volume volume = Volume.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateVolumeAsync(volume, updateMask).get(); Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - public void createSnapshotSchedulePolicyTest2() throws Exception { - SnapshotSchedulePolicy expectedResponse = - SnapshotSchedulePolicy.newBuilder() - .setName( - SnapshotSchedulePolicyName.of( - "[PROJECT]", "[LOCATION]", "[SNAPSHOT_SCHEDULE_POLICY]") - .toString()) - .setDescription("description-1724546052") - .addAllSchedules(new ArrayList()) + public void resizeVolumeTest() throws Exception { + Volume expectedResponse = + Volume.newBuilder() + .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .setId("id3355") + .setRequestedSizeGib(525454387) + .setCurrentSizeGib(72696456) + .setEmergencySizeGib(1936971120) + .setAutoGrownSizeGib(1245638678) + .setRemainingSpaceGib(1423108606) + .setSnapshotReservationDetail(Volume.SnapshotReservationDetail.newBuilder().build()) + .putAllLabels(new HashMap()) + .setSnapshotEnabled(true) + .setPod("pod111173") .build(); - mockBareMetalSolution.addResponse(expectedResponse); + Operation resultOperation = + Operation.newBuilder() + .setName("resizeVolumeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBareMetalSolution.addResponse(resultOperation); - String parent = "parent-995424086"; - SnapshotSchedulePolicy snapshotSchedulePolicy = SnapshotSchedulePolicy.newBuilder().build(); - String snapshotSchedulePolicyId = "snapshotSchedulePolicyId1929948040"; + VolumeName volume = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]"); + long sizeGib = 847296130; - SnapshotSchedulePolicy actualResponse = - client.createSnapshotSchedulePolicy( - parent, snapshotSchedulePolicy, snapshotSchedulePolicyId); + Volume actualResponse = client.resizeVolumeAsync(volume, sizeGib).get(); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockBareMetalSolution.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateSnapshotSchedulePolicyRequest actualRequest = - ((CreateSnapshotSchedulePolicyRequest) actualRequests.get(0)); + ResizeVolumeRequest actualRequest = ((ResizeVolumeRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(snapshotSchedulePolicy, actualRequest.getSnapshotSchedulePolicy()); - Assert.assertEquals(snapshotSchedulePolicyId, actualRequest.getSnapshotSchedulePolicyId()); + Assert.assertEquals(volume.toString(), actualRequest.getVolume()); + Assert.assertEquals(sizeGib, actualRequest.getSizeGib()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1047,48 +1134,58 @@ public void createSnapshotSchedulePolicyTest2() throws Exception { } @Test - public void createSnapshotSchedulePolicyExceptionTest2() throws Exception { + public void resizeVolumeExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockBareMetalSolution.addException(exception); try { - String parent = "parent-995424086"; - SnapshotSchedulePolicy snapshotSchedulePolicy = SnapshotSchedulePolicy.newBuilder().build(); - String snapshotSchedulePolicyId = "snapshotSchedulePolicyId1929948040"; - client.createSnapshotSchedulePolicy(parent, snapshotSchedulePolicy, snapshotSchedulePolicyId); + VolumeName volume = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]"); + long sizeGib = 847296130; + client.resizeVolumeAsync(volume, sizeGib).get(); Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - public void updateSnapshotSchedulePolicyTest() throws Exception { - SnapshotSchedulePolicy expectedResponse = - SnapshotSchedulePolicy.newBuilder() - .setName( - SnapshotSchedulePolicyName.of( - "[PROJECT]", "[LOCATION]", "[SNAPSHOT_SCHEDULE_POLICY]") - .toString()) - .setDescription("description-1724546052") - .addAllSchedules(new ArrayList()) + public void resizeVolumeTest2() throws Exception { + Volume expectedResponse = + Volume.newBuilder() + .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .setId("id3355") + .setRequestedSizeGib(525454387) + .setCurrentSizeGib(72696456) + .setEmergencySizeGib(1936971120) + .setAutoGrownSizeGib(1245638678) + .setRemainingSpaceGib(1423108606) + .setSnapshotReservationDetail(Volume.SnapshotReservationDetail.newBuilder().build()) + .putAllLabels(new HashMap()) + .setSnapshotEnabled(true) + .setPod("pod111173") .build(); - mockBareMetalSolution.addResponse(expectedResponse); + Operation resultOperation = + Operation.newBuilder() + .setName("resizeVolumeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBareMetalSolution.addResponse(resultOperation); - SnapshotSchedulePolicy snapshotSchedulePolicy = SnapshotSchedulePolicy.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); + String volume = "volume-810883302"; + long sizeGib = 847296130; - SnapshotSchedulePolicy actualResponse = - client.updateSnapshotSchedulePolicy(snapshotSchedulePolicy, updateMask); + Volume actualResponse = client.resizeVolumeAsync(volume, sizeGib).get(); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockBareMetalSolution.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UpdateSnapshotSchedulePolicyRequest actualRequest = - ((UpdateSnapshotSchedulePolicyRequest) actualRequests.get(0)); + ResizeVolumeRequest actualRequest = ((ResizeVolumeRequest) actualRequests.get(0)); - Assert.assertEquals(snapshotSchedulePolicy, actualRequest.getSnapshotSchedulePolicy()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertEquals(volume, actualRequest.getVolume()); + Assert.assertEquals(sizeGib, actualRequest.getSizeGib()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1096,72 +1193,46 @@ public void updateSnapshotSchedulePolicyTest() throws Exception { } @Test - public void updateSnapshotSchedulePolicyExceptionTest() throws Exception { + public void resizeVolumeExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockBareMetalSolution.addException(exception); try { - SnapshotSchedulePolicy snapshotSchedulePolicy = SnapshotSchedulePolicy.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateSnapshotSchedulePolicy(snapshotSchedulePolicy, updateMask); + String volume = "volume-810883302"; + long sizeGib = 847296130; + client.resizeVolumeAsync(volume, sizeGib).get(); Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - public void deleteSnapshotSchedulePolicyTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void listNetworksTest() throws Exception { + Network responsesElement = Network.newBuilder().build(); + ListNetworksResponse expectedResponse = + ListNetworksResponse.newBuilder() + .setNextPageToken("") + .addAllNetworks(Arrays.asList(responsesElement)) + .build(); mockBareMetalSolution.addResponse(expectedResponse); - SnapshotSchedulePolicyName name = - SnapshotSchedulePolicyName.of("[PROJECT]", "[LOCATION]", "[SNAPSHOT_SCHEDULE_POLICY]"); - - client.deleteSnapshotSchedulePolicy(name); - - List actualRequests = mockBareMetalSolution.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteSnapshotSchedulePolicyRequest actualRequest = - ((DeleteSnapshotSchedulePolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteSnapshotSchedulePolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockBareMetalSolution.addException(exception); - - try { - SnapshotSchedulePolicyName name = - SnapshotSchedulePolicyName.of("[PROJECT]", "[LOCATION]", "[SNAPSHOT_SCHEDULE_POLICY]"); - client.deleteSnapshotSchedulePolicy(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - @Test - public void deleteSnapshotSchedulePolicyTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockBareMetalSolution.addResponse(expectedResponse); + ListNetworksPagedResponse pagedListResponse = client.listNetworks(parent); - String name = "name3373707"; + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - client.deleteSnapshotSchedulePolicy(name); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNetworksList().get(0), resources.get(0)); List actualRequests = mockBareMetalSolution.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteSnapshotSchedulePolicyRequest actualRequest = - ((DeleteSnapshotSchedulePolicyRequest) actualRequests.get(0)); + ListNetworksRequest actualRequest = ((ListNetworksRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1169,13 +1240,13 @@ public void deleteSnapshotSchedulePolicyTest2() throws Exception { } @Test - public void deleteSnapshotSchedulePolicyExceptionTest2() throws Exception { + public void listNetworksExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockBareMetalSolution.addException(exception); try { - String name = "name3373707"; - client.deleteSnapshotSchedulePolicy(name); + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listNetworks(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1183,32 +1254,29 @@ public void deleteSnapshotSchedulePolicyExceptionTest2() throws Exception { } @Test - public void createVolumeSnapshotTest() throws Exception { - VolumeSnapshot expectedResponse = - VolumeSnapshot.newBuilder() - .setName( - VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]") - .toString()) - .setDescription("description-1724546052") - .setSizeBytes(-1796325715) - .setCreateTime(Timestamp.newBuilder().build()) - .setStorageVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + public void listNetworksTest2() throws Exception { + Network responsesElement = Network.newBuilder().build(); + ListNetworksResponse expectedResponse = + ListNetworksResponse.newBuilder() + .setNextPageToken("") + .addAllNetworks(Arrays.asList(responsesElement)) .build(); mockBareMetalSolution.addResponse(expectedResponse); - VolumeName parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]"); - VolumeSnapshot volumeSnapshot = VolumeSnapshot.newBuilder().build(); + String parent = "parent-995424086"; - VolumeSnapshot actualResponse = client.createVolumeSnapshot(parent, volumeSnapshot); - Assert.assertEquals(expectedResponse, actualResponse); + ListNetworksPagedResponse pagedListResponse = client.listNetworks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNetworksList().get(0), resources.get(0)); List actualRequests = mockBareMetalSolution.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateVolumeSnapshotRequest actualRequest = - ((CreateVolumeSnapshotRequest) actualRequests.get(0)); + ListNetworksRequest actualRequest = ((ListNetworksRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(volumeSnapshot, actualRequest.getVolumeSnapshot()); + Assert.assertEquals(parent, actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1216,14 +1284,13 @@ public void createVolumeSnapshotTest() throws Exception { } @Test - public void createVolumeSnapshotExceptionTest() throws Exception { + public void listNetworksExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockBareMetalSolution.addException(exception); try { - VolumeName parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]"); - VolumeSnapshot volumeSnapshot = VolumeSnapshot.newBuilder().build(); - client.createVolumeSnapshot(parent, volumeSnapshot); + String parent = "parent-995424086"; + client.listNetworks(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1231,32 +1298,21 @@ public void createVolumeSnapshotExceptionTest() throws Exception { } @Test - public void createVolumeSnapshotTest2() throws Exception { - VolumeSnapshot expectedResponse = - VolumeSnapshot.newBuilder() - .setName( - VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]") - .toString()) - .setDescription("description-1724546052") - .setSizeBytes(-1796325715) - .setCreateTime(Timestamp.newBuilder().build()) - .setStorageVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) - .build(); + public void listNetworkUsageTest() throws Exception { + ListNetworkUsageResponse expectedResponse = + ListNetworkUsageResponse.newBuilder().addAllNetworks(new ArrayList()).build(); mockBareMetalSolution.addResponse(expectedResponse); - String parent = "parent-995424086"; - VolumeSnapshot volumeSnapshot = VolumeSnapshot.newBuilder().build(); + LocationName location = LocationName.of("[PROJECT]", "[LOCATION]"); - VolumeSnapshot actualResponse = client.createVolumeSnapshot(parent, volumeSnapshot); + ListNetworkUsageResponse actualResponse = client.listNetworkUsage(location); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockBareMetalSolution.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateVolumeSnapshotRequest actualRequest = - ((CreateVolumeSnapshotRequest) actualRequests.get(0)); + ListNetworkUsageRequest actualRequest = ((ListNetworkUsageRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(volumeSnapshot, actualRequest.getVolumeSnapshot()); + Assert.assertEquals(location.toString(), actualRequest.getLocation()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1264,14 +1320,13 @@ public void createVolumeSnapshotTest2() throws Exception { } @Test - public void createVolumeSnapshotExceptionTest2() throws Exception { + public void listNetworkUsageExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockBareMetalSolution.addException(exception); try { - String parent = "parent-995424086"; - VolumeSnapshot volumeSnapshot = VolumeSnapshot.newBuilder().build(); - client.createVolumeSnapshot(parent, volumeSnapshot); + LocationName location = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listNetworkUsage(location); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1279,37 +1334,21 @@ public void createVolumeSnapshotExceptionTest2() throws Exception { } @Test - public void restoreVolumeSnapshotTest() throws Exception { - VolumeSnapshot expectedResponse = - VolumeSnapshot.newBuilder() - .setName( - VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]") - .toString()) - .setDescription("description-1724546052") - .setSizeBytes(-1796325715) - .setCreateTime(Timestamp.newBuilder().build()) - .setStorageVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("restoreVolumeSnapshotTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockBareMetalSolution.addResponse(resultOperation); + public void listNetworkUsageTest2() throws Exception { + ListNetworkUsageResponse expectedResponse = + ListNetworkUsageResponse.newBuilder().addAllNetworks(new ArrayList()).build(); + mockBareMetalSolution.addResponse(expectedResponse); - VolumeSnapshotName volumeSnapshot = - VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]"); + String location = "location1901043637"; - VolumeSnapshot actualResponse = client.restoreVolumeSnapshotAsync(volumeSnapshot).get(); + ListNetworkUsageResponse actualResponse = client.listNetworkUsage(location); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockBareMetalSolution.getRequests(); Assert.assertEquals(1, actualRequests.size()); - RestoreVolumeSnapshotRequest actualRequest = - ((RestoreVolumeSnapshotRequest) actualRequests.get(0)); + ListNetworkUsageRequest actualRequest = ((ListNetworkUsageRequest) actualRequests.get(0)); - Assert.assertEquals(volumeSnapshot.toString(), actualRequest.getVolumeSnapshot()); + Assert.assertEquals(location, actualRequest.getLocation()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1317,53 +1356,46 @@ public void restoreVolumeSnapshotTest() throws Exception { } @Test - public void restoreVolumeSnapshotExceptionTest() throws Exception { + public void listNetworkUsageExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockBareMetalSolution.addException(exception); try { - VolumeSnapshotName volumeSnapshot = - VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]"); - client.restoreVolumeSnapshotAsync(volumeSnapshot).get(); + String location = "location1901043637"; + client.listNetworkUsage(location); Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } catch (InvalidArgumentException e) { + // Expected exception. } } @Test - public void restoreVolumeSnapshotTest2() throws Exception { - VolumeSnapshot expectedResponse = - VolumeSnapshot.newBuilder() - .setName( - VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]") - .toString()) - .setDescription("description-1724546052") - .setSizeBytes(-1796325715) - .setCreateTime(Timestamp.newBuilder().build()) - .setStorageVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("restoreVolumeSnapshotTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) + public void getNetworkTest() throws Exception { + Network expectedResponse = + Network.newBuilder() + .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[NETWORK]").toString()) + .setId("id3355") + .setIpAddress("ipAddress1634032845") + .addAllMacAddress(new ArrayList()) + .setVlanId("vlanId-813989410") + .setCidr("cidr3053428") + .setVrf(VRF.newBuilder().build()) + .putAllLabels(new HashMap()) + .setServicesCidr("servicesCidr377076978") + .addAllReservations(new ArrayList()) .build(); - mockBareMetalSolution.addResponse(resultOperation); + mockBareMetalSolution.addResponse(expectedResponse); - String volumeSnapshot = "volumeSnapshot1771857662"; + NetworkName name = NetworkName.of("[PROJECT]", "[LOCATION]", "[NETWORK]"); - VolumeSnapshot actualResponse = client.restoreVolumeSnapshotAsync(volumeSnapshot).get(); + Network actualResponse = client.getNetwork(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockBareMetalSolution.getRequests(); Assert.assertEquals(1, actualRequests.size()); - RestoreVolumeSnapshotRequest actualRequest = - ((RestoreVolumeSnapshotRequest) actualRequests.get(0)); + GetNetworkRequest actualRequest = ((GetNetworkRequest) actualRequests.get(0)); - Assert.assertEquals(volumeSnapshot, actualRequest.getVolumeSnapshot()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1371,37 +1403,46 @@ public void restoreVolumeSnapshotTest2() throws Exception { } @Test - public void restoreVolumeSnapshotExceptionTest2() throws Exception { + public void getNetworkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockBareMetalSolution.addException(exception); try { - String volumeSnapshot = "volumeSnapshot1771857662"; - client.restoreVolumeSnapshotAsync(volumeSnapshot).get(); + NetworkName name = NetworkName.of("[PROJECT]", "[LOCATION]", "[NETWORK]"); + client.getNetwork(name); Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } catch (InvalidArgumentException e) { + // Expected exception. } } @Test - public void deleteVolumeSnapshotTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void getNetworkTest2() throws Exception { + Network expectedResponse = + Network.newBuilder() + .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[NETWORK]").toString()) + .setId("id3355") + .setIpAddress("ipAddress1634032845") + .addAllMacAddress(new ArrayList()) + .setVlanId("vlanId-813989410") + .setCidr("cidr3053428") + .setVrf(VRF.newBuilder().build()) + .putAllLabels(new HashMap()) + .setServicesCidr("servicesCidr377076978") + .addAllReservations(new ArrayList()) + .build(); mockBareMetalSolution.addResponse(expectedResponse); - VolumeSnapshotName name = - VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]"); + String name = "name3373707"; - client.deleteVolumeSnapshot(name); + Network actualResponse = client.getNetwork(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockBareMetalSolution.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteVolumeSnapshotRequest actualRequest = - ((DeleteVolumeSnapshotRequest) actualRequests.get(0)); + GetNetworkRequest actualRequest = ((GetNetworkRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1409,14 +1450,13 @@ public void deleteVolumeSnapshotTest() throws Exception { } @Test - public void deleteVolumeSnapshotExceptionTest() throws Exception { + public void getNetworkExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockBareMetalSolution.addException(exception); try { - VolumeSnapshotName name = - VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]"); - client.deleteVolumeSnapshot(name); + String name = "name3373707"; + client.getNetwork(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1424,20 +1464,40 @@ public void deleteVolumeSnapshotExceptionTest() throws Exception { } @Test - public void deleteVolumeSnapshotTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockBareMetalSolution.addResponse(expectedResponse); + public void updateNetworkTest() throws Exception { + Network expectedResponse = + Network.newBuilder() + .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[NETWORK]").toString()) + .setId("id3355") + .setIpAddress("ipAddress1634032845") + .addAllMacAddress(new ArrayList()) + .setVlanId("vlanId-813989410") + .setCidr("cidr3053428") + .setVrf(VRF.newBuilder().build()) + .putAllLabels(new HashMap()) + .setServicesCidr("servicesCidr377076978") + .addAllReservations(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateNetworkTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBareMetalSolution.addResponse(resultOperation); - String name = "name3373707"; + Network network = Network.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - client.deleteVolumeSnapshot(name); + Network actualResponse = client.updateNetworkAsync(network, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockBareMetalSolution.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteVolumeSnapshotRequest actualRequest = - ((DeleteVolumeSnapshotRequest) actualRequests.get(0)); + UpdateNetworkRequest actualRequest = ((UpdateNetworkRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(network, actualRequest.getNetwork()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1445,42 +1505,44 @@ public void deleteVolumeSnapshotTest2() throws Exception { } @Test - public void deleteVolumeSnapshotExceptionTest2() throws Exception { + public void updateNetworkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockBareMetalSolution.addException(exception); try { - String name = "name3373707"; - client.deleteVolumeSnapshot(name); + Network network = Network.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateNetworkAsync(network, updateMask).get(); Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } @Test - public void getVolumeSnapshotTest() throws Exception { - VolumeSnapshot expectedResponse = - VolumeSnapshot.newBuilder() - .setName( - VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]") - .toString()) - .setDescription("description-1724546052") - .setSizeBytes(-1796325715) - .setCreateTime(Timestamp.newBuilder().build()) + public void getLunTest() throws Exception { + Lun expectedResponse = + Lun.newBuilder() + .setName(LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString()) + .setId("id3355") + .setSizeGb(2105542105) .setStorageVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .setShareable(true) + .setBootLun(true) + .setWwid("wwid3662843") .build(); mockBareMetalSolution.addResponse(expectedResponse); - VolumeSnapshotName name = - VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]"); + LunName name = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]"); - VolumeSnapshot actualResponse = client.getVolumeSnapshot(name); + Lun actualResponse = client.getLun(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockBareMetalSolution.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetVolumeSnapshotRequest actualRequest = ((GetVolumeSnapshotRequest) actualRequests.get(0)); + GetLunRequest actualRequest = ((GetLunRequest) actualRequests.get(0)); Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( @@ -1490,14 +1552,13 @@ public void getVolumeSnapshotTest() throws Exception { } @Test - public void getVolumeSnapshotExceptionTest() throws Exception { + public void getLunExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockBareMetalSolution.addException(exception); try { - VolumeSnapshotName name = - VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]"); - client.getVolumeSnapshot(name); + LunName name = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]"); + client.getLun(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1505,27 +1566,27 @@ public void getVolumeSnapshotExceptionTest() throws Exception { } @Test - public void getVolumeSnapshotTest2() throws Exception { - VolumeSnapshot expectedResponse = - VolumeSnapshot.newBuilder() - .setName( - VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]") - .toString()) - .setDescription("description-1724546052") - .setSizeBytes(-1796325715) - .setCreateTime(Timestamp.newBuilder().build()) + public void getLunTest2() throws Exception { + Lun expectedResponse = + Lun.newBuilder() + .setName(LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString()) + .setId("id3355") + .setSizeGb(2105542105) .setStorageVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .setShareable(true) + .setBootLun(true) + .setWwid("wwid3662843") .build(); mockBareMetalSolution.addResponse(expectedResponse); String name = "name3373707"; - VolumeSnapshot actualResponse = client.getVolumeSnapshot(name); + Lun actualResponse = client.getLun(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockBareMetalSolution.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetVolumeSnapshotRequest actualRequest = ((GetVolumeSnapshotRequest) actualRequests.get(0)); + GetLunRequest actualRequest = ((GetLunRequest) actualRequests.get(0)); Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( @@ -1535,13 +1596,13 @@ public void getVolumeSnapshotTest2() throws Exception { } @Test - public void getVolumeSnapshotExceptionTest2() throws Exception { + public void getLunExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockBareMetalSolution.addException(exception); try { String name = "name3373707"; - client.getVolumeSnapshot(name); + client.getLun(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1549,27 +1610,27 @@ public void getVolumeSnapshotExceptionTest2() throws Exception { } @Test - public void listVolumeSnapshotsTest() throws Exception { - VolumeSnapshot responsesElement = VolumeSnapshot.newBuilder().build(); - ListVolumeSnapshotsResponse expectedResponse = - ListVolumeSnapshotsResponse.newBuilder() + public void listLunsTest() throws Exception { + Lun responsesElement = Lun.newBuilder().build(); + ListLunsResponse expectedResponse = + ListLunsResponse.newBuilder() .setNextPageToken("") - .addAllVolumeSnapshots(Arrays.asList(responsesElement)) + .addAllLuns(Arrays.asList(responsesElement)) .build(); mockBareMetalSolution.addResponse(expectedResponse); VolumeName parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]"); - ListVolumeSnapshotsPagedResponse pagedListResponse = client.listVolumeSnapshots(parent); + ListLunsPagedResponse pagedListResponse = client.listLuns(parent); - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getVolumeSnapshotsList().get(0), resources.get(0)); + Assert.assertEquals(expectedResponse.getLunsList().get(0), resources.get(0)); List actualRequests = mockBareMetalSolution.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListVolumeSnapshotsRequest actualRequest = ((ListVolumeSnapshotsRequest) actualRequests.get(0)); + ListLunsRequest actualRequest = ((ListLunsRequest) actualRequests.get(0)); Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( @@ -1579,13 +1640,13 @@ public void listVolumeSnapshotsTest() throws Exception { } @Test - public void listVolumeSnapshotsExceptionTest() throws Exception { + public void listLunsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockBareMetalSolution.addException(exception); try { VolumeName parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]"); - client.listVolumeSnapshots(parent); + client.listLuns(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1593,27 +1654,27 @@ public void listVolumeSnapshotsExceptionTest() throws Exception { } @Test - public void listVolumeSnapshotsTest2() throws Exception { - VolumeSnapshot responsesElement = VolumeSnapshot.newBuilder().build(); - ListVolumeSnapshotsResponse expectedResponse = - ListVolumeSnapshotsResponse.newBuilder() + public void listLunsTest2() throws Exception { + Lun responsesElement = Lun.newBuilder().build(); + ListLunsResponse expectedResponse = + ListLunsResponse.newBuilder() .setNextPageToken("") - .addAllVolumeSnapshots(Arrays.asList(responsesElement)) + .addAllLuns(Arrays.asList(responsesElement)) .build(); mockBareMetalSolution.addResponse(expectedResponse); String parent = "parent-995424086"; - ListVolumeSnapshotsPagedResponse pagedListResponse = client.listVolumeSnapshots(parent); + ListLunsPagedResponse pagedListResponse = client.listLuns(parent); - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getVolumeSnapshotsList().get(0), resources.get(0)); + Assert.assertEquals(expectedResponse.getLunsList().get(0), resources.get(0)); List actualRequests = mockBareMetalSolution.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListVolumeSnapshotsRequest actualRequest = ((ListVolumeSnapshotsRequest) actualRequests.get(0)); + ListLunsRequest actualRequest = ((ListLunsRequest) actualRequests.get(0)); Assert.assertEquals(parent, actualRequest.getParent()); Assert.assertTrue( @@ -1623,13 +1684,13 @@ public void listVolumeSnapshotsTest2() throws Exception { } @Test - public void listVolumeSnapshotsExceptionTest2() throws Exception { + public void listLunsExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockBareMetalSolution.addException(exception); try { String parent = "parent-995424086"; - client.listVolumeSnapshots(parent); + client.listLuns(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1637,26 +1698,25 @@ public void listVolumeSnapshotsExceptionTest2() throws Exception { } @Test - public void getLunTest() throws Exception { - Lun expectedResponse = - Lun.newBuilder() - .setName(LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString()) - .setSizeGb(2105542105) - .setStorageVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) - .setShareable(true) - .setBootLun(true) - .setWwid("wwid3662843") + public void getNfsShareTest() throws Exception { + NfsShare expectedResponse = + NfsShare.newBuilder() + .setName(NFSShareName.of("[PROJECT]", "[LOCATION]", "[NFS_SHARE]").toString()) + .setNfsShareId("nfsShareId-1834781921") + .setVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .addAllAllowedClients(new ArrayList()) + .putAllLabels(new HashMap()) .build(); mockBareMetalSolution.addResponse(expectedResponse); - LunName name = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]"); + NFSShareName name = NFSShareName.of("[PROJECT]", "[LOCATION]", "[NFS_SHARE]"); - Lun actualResponse = client.getLun(name); + NfsShare actualResponse = client.getNfsShare(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockBareMetalSolution.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetLunRequest actualRequest = ((GetLunRequest) actualRequests.get(0)); + GetNfsShareRequest actualRequest = ((GetNfsShareRequest) actualRequests.get(0)); Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( @@ -1666,13 +1726,13 @@ public void getLunTest() throws Exception { } @Test - public void getLunExceptionTest() throws Exception { + public void getNfsShareExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockBareMetalSolution.addException(exception); try { - LunName name = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]"); - client.getLun(name); + NFSShareName name = NFSShareName.of("[PROJECT]", "[LOCATION]", "[NFS_SHARE]"); + client.getNfsShare(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1680,26 +1740,25 @@ public void getLunExceptionTest() throws Exception { } @Test - public void getLunTest2() throws Exception { - Lun expectedResponse = - Lun.newBuilder() - .setName(LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString()) - .setSizeGb(2105542105) - .setStorageVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) - .setShareable(true) - .setBootLun(true) - .setWwid("wwid3662843") + public void getNfsShareTest2() throws Exception { + NfsShare expectedResponse = + NfsShare.newBuilder() + .setName(NFSShareName.of("[PROJECT]", "[LOCATION]", "[NFS_SHARE]").toString()) + .setNfsShareId("nfsShareId-1834781921") + .setVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .addAllAllowedClients(new ArrayList()) + .putAllLabels(new HashMap()) .build(); mockBareMetalSolution.addResponse(expectedResponse); String name = "name3373707"; - Lun actualResponse = client.getLun(name); + NfsShare actualResponse = client.getNfsShare(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockBareMetalSolution.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetLunRequest actualRequest = ((GetLunRequest) actualRequests.get(0)); + GetNfsShareRequest actualRequest = ((GetNfsShareRequest) actualRequests.get(0)); Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( @@ -1709,13 +1768,13 @@ public void getLunTest2() throws Exception { } @Test - public void getLunExceptionTest2() throws Exception { + public void getNfsShareExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockBareMetalSolution.addException(exception); try { String name = "name3373707"; - client.getLun(name); + client.getNfsShare(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1723,27 +1782,27 @@ public void getLunExceptionTest2() throws Exception { } @Test - public void listLunsTest() throws Exception { - Lun responsesElement = Lun.newBuilder().build(); - ListLunsResponse expectedResponse = - ListLunsResponse.newBuilder() + public void listNfsSharesTest() throws Exception { + NfsShare responsesElement = NfsShare.newBuilder().build(); + ListNfsSharesResponse expectedResponse = + ListNfsSharesResponse.newBuilder() .setNextPageToken("") - .addAllLuns(Arrays.asList(responsesElement)) + .addAllNfsShares(Arrays.asList(responsesElement)) .build(); mockBareMetalSolution.addResponse(expectedResponse); - VolumeName parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]"); + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ListLunsPagedResponse pagedListResponse = client.listLuns(parent); + ListNfsSharesPagedResponse pagedListResponse = client.listNfsShares(parent); - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getLunsList().get(0), resources.get(0)); + Assert.assertEquals(expectedResponse.getNfsSharesList().get(0), resources.get(0)); List actualRequests = mockBareMetalSolution.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListLunsRequest actualRequest = ((ListLunsRequest) actualRequests.get(0)); + ListNfsSharesRequest actualRequest = ((ListNfsSharesRequest) actualRequests.get(0)); Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( @@ -1753,13 +1812,13 @@ public void listLunsTest() throws Exception { } @Test - public void listLunsExceptionTest() throws Exception { + public void listNfsSharesExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockBareMetalSolution.addException(exception); try { - VolumeName parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]"); - client.listLuns(parent); + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listNfsShares(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1767,27 +1826,27 @@ public void listLunsExceptionTest() throws Exception { } @Test - public void listLunsTest2() throws Exception { - Lun responsesElement = Lun.newBuilder().build(); - ListLunsResponse expectedResponse = - ListLunsResponse.newBuilder() + public void listNfsSharesTest2() throws Exception { + NfsShare responsesElement = NfsShare.newBuilder().build(); + ListNfsSharesResponse expectedResponse = + ListNfsSharesResponse.newBuilder() .setNextPageToken("") - .addAllLuns(Arrays.asList(responsesElement)) + .addAllNfsShares(Arrays.asList(responsesElement)) .build(); mockBareMetalSolution.addResponse(expectedResponse); String parent = "parent-995424086"; - ListLunsPagedResponse pagedListResponse = client.listLuns(parent); + ListNfsSharesPagedResponse pagedListResponse = client.listNfsShares(parent); - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getLunsList().get(0), resources.get(0)); + Assert.assertEquals(expectedResponse.getNfsSharesList().get(0), resources.get(0)); List actualRequests = mockBareMetalSolution.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListLunsRequest actualRequest = ((ListLunsRequest) actualRequests.get(0)); + ListNfsSharesRequest actualRequest = ((ListNfsSharesRequest) actualRequests.get(0)); Assert.assertEquals(parent, actualRequest.getParent()); Assert.assertTrue( @@ -1797,16 +1856,69 @@ public void listLunsTest2() throws Exception { } @Test - public void listLunsExceptionTest2() throws Exception { + public void listNfsSharesExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockBareMetalSolution.addException(exception); try { String parent = "parent-995424086"; - client.listLuns(parent); + client.listNfsShares(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } + + @Test + public void updateNfsShareTest() throws Exception { + NfsShare expectedResponse = + NfsShare.newBuilder() + .setName(NFSShareName.of("[PROJECT]", "[LOCATION]", "[NFS_SHARE]").toString()) + .setNfsShareId("nfsShareId-1834781921") + .setVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .addAllAllowedClients(new ArrayList()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateNfsShareTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBareMetalSolution.addResponse(resultOperation); + + NfsShare nfsShare = NfsShare.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + NfsShare actualResponse = client.updateNfsShareAsync(nfsShare, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBareMetalSolution.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateNfsShareRequest actualRequest = ((UpdateNfsShareRequest) actualRequests.get(0)); + + Assert.assertEquals(nfsShare, actualRequest.getNfsShare()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateNfsShareExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBareMetalSolution.addException(exception); + + try { + NfsShare nfsShare = NfsShare.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateNfsShareAsync(nfsShare, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } } diff --git a/java-bare-metal-solution/google-cloud-bare-metal-solution/src/test/java/com/google/cloud/baremetalsolution/v2/MockBareMetalSolutionImpl.java b/java-bare-metal-solution/google-cloud-bare-metal-solution/src/test/java/com/google/cloud/baremetalsolution/v2/MockBareMetalSolutionImpl.java index 4698daac4546..0137faa168ee 100644 --- a/java-bare-metal-solution/google-cloud-bare-metal-solution/src/test/java/com/google/cloud/baremetalsolution/v2/MockBareMetalSolutionImpl.java +++ b/java-bare-metal-solution/google-cloud-bare-metal-solution/src/test/java/com/google/cloud/baremetalsolution/v2/MockBareMetalSolutionImpl.java @@ -20,7 +20,6 @@ import com.google.cloud.baremetalsolution.v2.BareMetalSolutionGrpc.BareMetalSolutionImplBase; import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Empty; import io.grpc.stub.StreamObserver; import java.util.ArrayList; import java.util.LinkedList; @@ -102,8 +101,8 @@ public void getInstance(GetInstanceRequest request, StreamObserver res } @Override - public void resetInstance( - ResetInstanceRequest request, StreamObserver responseObserver) { + public void updateInstance( + UpdateInstanceRequest request, StreamObserver responseObserver) { Object response = responses.poll(); if (response instanceof Operation) { requests.add(request); @@ -115,7 +114,7 @@ public void resetInstance( responseObserver.onError( new IllegalArgumentException( String.format( - "Unrecognized response type %s for method ResetInstance, expected %s or %s", + "Unrecognized response type %s for method UpdateInstance, expected %s or %s", response == null ? "null" : response.getClass().getName(), Operation.class.getName(), Exception.class.getName()))); @@ -123,12 +122,12 @@ public void resetInstance( } @Override - public void listVolumes( - ListVolumesRequest request, StreamObserver responseObserver) { + public void resetInstance( + ResetInstanceRequest request, StreamObserver responseObserver) { Object response = responses.poll(); - if (response instanceof ListVolumesResponse) { + if (response instanceof Operation) { requests.add(request); - responseObserver.onNext(((ListVolumesResponse) response)); + responseObserver.onNext(((Operation) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); @@ -136,19 +135,20 @@ public void listVolumes( responseObserver.onError( new IllegalArgumentException( String.format( - "Unrecognized response type %s for method ListVolumes, expected %s or %s", + "Unrecognized response type %s for method ResetInstance, expected %s or %s", response == null ? "null" : response.getClass().getName(), - ListVolumesResponse.class.getName(), + Operation.class.getName(), Exception.class.getName()))); } } @Override - public void getVolume(GetVolumeRequest request, StreamObserver responseObserver) { + public void startInstance( + StartInstanceRequest request, StreamObserver responseObserver) { Object response = responses.poll(); - if (response instanceof Volume) { + if (response instanceof Operation) { requests.add(request); - responseObserver.onNext(((Volume) response)); + responseObserver.onNext(((Operation) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); @@ -156,16 +156,16 @@ public void getVolume(GetVolumeRequest request, StreamObserver responseO responseObserver.onError( new IllegalArgumentException( String.format( - "Unrecognized response type %s for method GetVolume, expected %s or %s", + "Unrecognized response type %s for method StartInstance, expected %s or %s", response == null ? "null" : response.getClass().getName(), - Volume.class.getName(), + Operation.class.getName(), Exception.class.getName()))); } } @Override - public void updateVolume( - UpdateVolumeRequest request, StreamObserver responseObserver) { + public void stopInstance( + StopInstanceRequest request, StreamObserver responseObserver) { Object response = responses.poll(); if (response instanceof Operation) { requests.add(request); @@ -177,7 +177,7 @@ public void updateVolume( responseObserver.onError( new IllegalArgumentException( String.format( - "Unrecognized response type %s for method UpdateVolume, expected %s or %s", + "Unrecognized response type %s for method StopInstance, expected %s or %s", response == null ? "null" : response.getClass().getName(), Operation.class.getName(), Exception.class.getName()))); @@ -185,12 +185,11 @@ public void updateVolume( } @Override - public void listNetworks( - ListNetworksRequest request, StreamObserver responseObserver) { + public void detachLun(DetachLunRequest request, StreamObserver responseObserver) { Object response = responses.poll(); - if (response instanceof ListNetworksResponse) { + if (response instanceof Operation) { requests.add(request); - responseObserver.onNext(((ListNetworksResponse) response)); + responseObserver.onNext(((Operation) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); @@ -198,19 +197,20 @@ public void listNetworks( responseObserver.onError( new IllegalArgumentException( String.format( - "Unrecognized response type %s for method ListNetworks, expected %s or %s", + "Unrecognized response type %s for method DetachLun, expected %s or %s", response == null ? "null" : response.getClass().getName(), - ListNetworksResponse.class.getName(), + Operation.class.getName(), Exception.class.getName()))); } } @Override - public void getNetwork(GetNetworkRequest request, StreamObserver responseObserver) { + public void listVolumes( + ListVolumesRequest request, StreamObserver responseObserver) { Object response = responses.poll(); - if (response instanceof Network) { + if (response instanceof ListVolumesResponse) { requests.add(request); - responseObserver.onNext(((Network) response)); + responseObserver.onNext(((ListVolumesResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); @@ -218,21 +218,19 @@ public void getNetwork(GetNetworkRequest request, StreamObserver respon responseObserver.onError( new IllegalArgumentException( String.format( - "Unrecognized response type %s for method GetNetwork, expected %s or %s", + "Unrecognized response type %s for method ListVolumes, expected %s or %s", response == null ? "null" : response.getClass().getName(), - Network.class.getName(), + ListVolumesResponse.class.getName(), Exception.class.getName()))); } } @Override - public void listSnapshotSchedulePolicies( - ListSnapshotSchedulePoliciesRequest request, - StreamObserver responseObserver) { + public void getVolume(GetVolumeRequest request, StreamObserver responseObserver) { Object response = responses.poll(); - if (response instanceof ListSnapshotSchedulePoliciesResponse) { + if (response instanceof Volume) { requests.add(request); - responseObserver.onNext(((ListSnapshotSchedulePoliciesResponse) response)); + responseObserver.onNext(((Volume) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); @@ -240,21 +238,20 @@ public void listSnapshotSchedulePolicies( responseObserver.onError( new IllegalArgumentException( String.format( - "Unrecognized response type %s for method ListSnapshotSchedulePolicies, expected %s or %s", + "Unrecognized response type %s for method GetVolume, expected %s or %s", response == null ? "null" : response.getClass().getName(), - ListSnapshotSchedulePoliciesResponse.class.getName(), + Volume.class.getName(), Exception.class.getName()))); } } @Override - public void getSnapshotSchedulePolicy( - GetSnapshotSchedulePolicyRequest request, - StreamObserver responseObserver) { + public void updateVolume( + UpdateVolumeRequest request, StreamObserver responseObserver) { Object response = responses.poll(); - if (response instanceof SnapshotSchedulePolicy) { + if (response instanceof Operation) { requests.add(request); - responseObserver.onNext(((SnapshotSchedulePolicy) response)); + responseObserver.onNext(((Operation) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); @@ -262,21 +259,20 @@ public void getSnapshotSchedulePolicy( responseObserver.onError( new IllegalArgumentException( String.format( - "Unrecognized response type %s for method GetSnapshotSchedulePolicy, expected %s or %s", + "Unrecognized response type %s for method UpdateVolume, expected %s or %s", response == null ? "null" : response.getClass().getName(), - SnapshotSchedulePolicy.class.getName(), + Operation.class.getName(), Exception.class.getName()))); } } @Override - public void createSnapshotSchedulePolicy( - CreateSnapshotSchedulePolicyRequest request, - StreamObserver responseObserver) { + public void resizeVolume( + ResizeVolumeRequest request, StreamObserver responseObserver) { Object response = responses.poll(); - if (response instanceof SnapshotSchedulePolicy) { + if (response instanceof Operation) { requests.add(request); - responseObserver.onNext(((SnapshotSchedulePolicy) response)); + responseObserver.onNext(((Operation) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); @@ -284,21 +280,20 @@ public void createSnapshotSchedulePolicy( responseObserver.onError( new IllegalArgumentException( String.format( - "Unrecognized response type %s for method CreateSnapshotSchedulePolicy, expected %s or %s", + "Unrecognized response type %s for method ResizeVolume, expected %s or %s", response == null ? "null" : response.getClass().getName(), - SnapshotSchedulePolicy.class.getName(), + Operation.class.getName(), Exception.class.getName()))); } } @Override - public void updateSnapshotSchedulePolicy( - UpdateSnapshotSchedulePolicyRequest request, - StreamObserver responseObserver) { + public void listNetworks( + ListNetworksRequest request, StreamObserver responseObserver) { Object response = responses.poll(); - if (response instanceof SnapshotSchedulePolicy) { + if (response instanceof ListNetworksResponse) { requests.add(request); - responseObserver.onNext(((SnapshotSchedulePolicy) response)); + responseObserver.onNext(((ListNetworksResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); @@ -306,20 +301,20 @@ public void updateSnapshotSchedulePolicy( responseObserver.onError( new IllegalArgumentException( String.format( - "Unrecognized response type %s for method UpdateSnapshotSchedulePolicy, expected %s or %s", + "Unrecognized response type %s for method ListNetworks, expected %s or %s", response == null ? "null" : response.getClass().getName(), - SnapshotSchedulePolicy.class.getName(), + ListNetworksResponse.class.getName(), Exception.class.getName()))); } } @Override - public void deleteSnapshotSchedulePolicy( - DeleteSnapshotSchedulePolicyRequest request, StreamObserver responseObserver) { + public void listNetworkUsage( + ListNetworkUsageRequest request, StreamObserver responseObserver) { Object response = responses.poll(); - if (response instanceof Empty) { + if (response instanceof ListNetworkUsageResponse) { requests.add(request); - responseObserver.onNext(((Empty) response)); + responseObserver.onNext(((ListNetworkUsageResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); @@ -327,20 +322,19 @@ public void deleteSnapshotSchedulePolicy( responseObserver.onError( new IllegalArgumentException( String.format( - "Unrecognized response type %s for method DeleteSnapshotSchedulePolicy, expected %s or %s", + "Unrecognized response type %s for method ListNetworkUsage, expected %s or %s", response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), + ListNetworkUsageResponse.class.getName(), Exception.class.getName()))); } } @Override - public void createVolumeSnapshot( - CreateVolumeSnapshotRequest request, StreamObserver responseObserver) { + public void getNetwork(GetNetworkRequest request, StreamObserver responseObserver) { Object response = responses.poll(); - if (response instanceof VolumeSnapshot) { + if (response instanceof Network) { requests.add(request); - responseObserver.onNext(((VolumeSnapshot) response)); + responseObserver.onNext(((Network) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); @@ -348,16 +342,16 @@ public void createVolumeSnapshot( responseObserver.onError( new IllegalArgumentException( String.format( - "Unrecognized response type %s for method CreateVolumeSnapshot, expected %s or %s", + "Unrecognized response type %s for method GetNetwork, expected %s or %s", response == null ? "null" : response.getClass().getName(), - VolumeSnapshot.class.getName(), + Network.class.getName(), Exception.class.getName()))); } } @Override - public void restoreVolumeSnapshot( - RestoreVolumeSnapshotRequest request, StreamObserver responseObserver) { + public void updateNetwork( + UpdateNetworkRequest request, StreamObserver responseObserver) { Object response = responses.poll(); if (response instanceof Operation) { requests.add(request); @@ -369,7 +363,7 @@ public void restoreVolumeSnapshot( responseObserver.onError( new IllegalArgumentException( String.format( - "Unrecognized response type %s for method RestoreVolumeSnapshot, expected %s or %s", + "Unrecognized response type %s for method UpdateNetwork, expected %s or %s", response == null ? "null" : response.getClass().getName(), Operation.class.getName(), Exception.class.getName()))); @@ -377,12 +371,11 @@ public void restoreVolumeSnapshot( } @Override - public void deleteVolumeSnapshot( - DeleteVolumeSnapshotRequest request, StreamObserver responseObserver) { + public void getLun(GetLunRequest request, StreamObserver responseObserver) { Object response = responses.poll(); - if (response instanceof Empty) { + if (response instanceof Lun) { requests.add(request); - responseObserver.onNext(((Empty) response)); + responseObserver.onNext(((Lun) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); @@ -390,20 +383,19 @@ public void deleteVolumeSnapshot( responseObserver.onError( new IllegalArgumentException( String.format( - "Unrecognized response type %s for method DeleteVolumeSnapshot, expected %s or %s", + "Unrecognized response type %s for method GetLun, expected %s or %s", response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), + Lun.class.getName(), Exception.class.getName()))); } } @Override - public void getVolumeSnapshot( - GetVolumeSnapshotRequest request, StreamObserver responseObserver) { + public void listLuns(ListLunsRequest request, StreamObserver responseObserver) { Object response = responses.poll(); - if (response instanceof VolumeSnapshot) { + if (response instanceof ListLunsResponse) { requests.add(request); - responseObserver.onNext(((VolumeSnapshot) response)); + responseObserver.onNext(((ListLunsResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); @@ -411,21 +403,19 @@ public void getVolumeSnapshot( responseObserver.onError( new IllegalArgumentException( String.format( - "Unrecognized response type %s for method GetVolumeSnapshot, expected %s or %s", + "Unrecognized response type %s for method ListLuns, expected %s or %s", response == null ? "null" : response.getClass().getName(), - VolumeSnapshot.class.getName(), + ListLunsResponse.class.getName(), Exception.class.getName()))); } } @Override - public void listVolumeSnapshots( - ListVolumeSnapshotsRequest request, - StreamObserver responseObserver) { + public void getNfsShare(GetNfsShareRequest request, StreamObserver responseObserver) { Object response = responses.poll(); - if (response instanceof ListVolumeSnapshotsResponse) { + if (response instanceof NfsShare) { requests.add(request); - responseObserver.onNext(((ListVolumeSnapshotsResponse) response)); + responseObserver.onNext(((NfsShare) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); @@ -433,19 +423,20 @@ public void listVolumeSnapshots( responseObserver.onError( new IllegalArgumentException( String.format( - "Unrecognized response type %s for method ListVolumeSnapshots, expected %s or %s", + "Unrecognized response type %s for method GetNfsShare, expected %s or %s", response == null ? "null" : response.getClass().getName(), - ListVolumeSnapshotsResponse.class.getName(), + NfsShare.class.getName(), Exception.class.getName()))); } } @Override - public void getLun(GetLunRequest request, StreamObserver responseObserver) { + public void listNfsShares( + ListNfsSharesRequest request, StreamObserver responseObserver) { Object response = responses.poll(); - if (response instanceof Lun) { + if (response instanceof ListNfsSharesResponse) { requests.add(request); - responseObserver.onNext(((Lun) response)); + responseObserver.onNext(((ListNfsSharesResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); @@ -453,19 +444,20 @@ public void getLun(GetLunRequest request, StreamObserver responseObserver) responseObserver.onError( new IllegalArgumentException( String.format( - "Unrecognized response type %s for method GetLun, expected %s or %s", + "Unrecognized response type %s for method ListNfsShares, expected %s or %s", response == null ? "null" : response.getClass().getName(), - Lun.class.getName(), + ListNfsSharesResponse.class.getName(), Exception.class.getName()))); } } @Override - public void listLuns(ListLunsRequest request, StreamObserver responseObserver) { + public void updateNfsShare( + UpdateNfsShareRequest request, StreamObserver responseObserver) { Object response = responses.poll(); - if (response instanceof ListLunsResponse) { + if (response instanceof Operation) { requests.add(request); - responseObserver.onNext(((ListLunsResponse) response)); + responseObserver.onNext(((Operation) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); @@ -473,9 +465,9 @@ public void listLuns(ListLunsRequest request, StreamObserver r responseObserver.onError( new IllegalArgumentException( String.format( - "Unrecognized response type %s for method ListLuns, expected %s or %s", + "Unrecognized response type %s for method UpdateNfsShare, expected %s or %s", response == null ? "null" : response.getClass().getName(), - ListLunsResponse.class.getName(), + Operation.class.getName(), Exception.class.getName()))); } } diff --git a/java-bare-metal-solution/grpc-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/BareMetalSolutionGrpc.java b/java-bare-metal-solution/grpc-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/BareMetalSolutionGrpc.java index 5873ee5c153b..cf4ba732ce2a 100644 --- a/java-bare-metal-solution/grpc-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/BareMetalSolutionGrpc.java +++ b/java-bare-metal-solution/grpc-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/BareMetalSolutionGrpc.java @@ -135,885 +135,833 @@ private BareMetalSolutionGrpc() {} } private static volatile io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.ResetInstanceRequest, + com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest, com.google.longrunning.Operation> - getResetInstanceMethod; + getUpdateInstanceMethod; @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ResetInstance", - requestType = com.google.cloud.baremetalsolution.v2.ResetInstanceRequest.class, + fullMethodName = SERVICE_NAME + '/' + "UpdateInstance", + requestType = com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest.class, responseType = com.google.longrunning.Operation.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.ResetInstanceRequest, + com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest, com.google.longrunning.Operation> - getResetInstanceMethod() { + getUpdateInstanceMethod() { io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.ResetInstanceRequest, + com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest, com.google.longrunning.Operation> - getResetInstanceMethod; - if ((getResetInstanceMethod = BareMetalSolutionGrpc.getResetInstanceMethod) == null) { + getUpdateInstanceMethod; + if ((getUpdateInstanceMethod = BareMetalSolutionGrpc.getUpdateInstanceMethod) == null) { synchronized (BareMetalSolutionGrpc.class) { - if ((getResetInstanceMethod = BareMetalSolutionGrpc.getResetInstanceMethod) == null) { - BareMetalSolutionGrpc.getResetInstanceMethod = - getResetInstanceMethod = + if ((getUpdateInstanceMethod = BareMetalSolutionGrpc.getUpdateInstanceMethod) == null) { + BareMetalSolutionGrpc.getUpdateInstanceMethod = + getUpdateInstanceMethod = io.grpc.MethodDescriptor - . newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ResetInstance")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateInstance")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.baremetalsolution.v2.ResetInstanceRequest + com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest .getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( com.google.longrunning.Operation.getDefaultInstance())) .setSchemaDescriptor( - new BareMetalSolutionMethodDescriptorSupplier("ResetInstance")) + new BareMetalSolutionMethodDescriptorSupplier("UpdateInstance")) .build(); } } } - return getResetInstanceMethod; + return getUpdateInstanceMethod; } private static volatile io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.ListVolumesRequest, - com.google.cloud.baremetalsolution.v2.ListVolumesResponse> - getListVolumesMethod; + com.google.cloud.baremetalsolution.v2.ResetInstanceRequest, + com.google.longrunning.Operation> + getResetInstanceMethod; @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListVolumes", - requestType = com.google.cloud.baremetalsolution.v2.ListVolumesRequest.class, - responseType = com.google.cloud.baremetalsolution.v2.ListVolumesResponse.class, + fullMethodName = SERVICE_NAME + '/' + "ResetInstance", + requestType = com.google.cloud.baremetalsolution.v2.ResetInstanceRequest.class, + responseType = com.google.longrunning.Operation.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.ListVolumesRequest, - com.google.cloud.baremetalsolution.v2.ListVolumesResponse> - getListVolumesMethod() { + com.google.cloud.baremetalsolution.v2.ResetInstanceRequest, + com.google.longrunning.Operation> + getResetInstanceMethod() { io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.ListVolumesRequest, - com.google.cloud.baremetalsolution.v2.ListVolumesResponse> - getListVolumesMethod; - if ((getListVolumesMethod = BareMetalSolutionGrpc.getListVolumesMethod) == null) { + com.google.cloud.baremetalsolution.v2.ResetInstanceRequest, + com.google.longrunning.Operation> + getResetInstanceMethod; + if ((getResetInstanceMethod = BareMetalSolutionGrpc.getResetInstanceMethod) == null) { synchronized (BareMetalSolutionGrpc.class) { - if ((getListVolumesMethod = BareMetalSolutionGrpc.getListVolumesMethod) == null) { - BareMetalSolutionGrpc.getListVolumesMethod = - getListVolumesMethod = + if ((getResetInstanceMethod = BareMetalSolutionGrpc.getResetInstanceMethod) == null) { + BareMetalSolutionGrpc.getResetInstanceMethod = + getResetInstanceMethod = io.grpc.MethodDescriptor - . + . newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListVolumes")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ResetInstance")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.baremetalsolution.v2.ListVolumesRequest + com.google.cloud.baremetalsolution.v2.ResetInstanceRequest .getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.baremetalsolution.v2.ListVolumesResponse - .getDefaultInstance())) + com.google.longrunning.Operation.getDefaultInstance())) .setSchemaDescriptor( - new BareMetalSolutionMethodDescriptorSupplier("ListVolumes")) + new BareMetalSolutionMethodDescriptorSupplier("ResetInstance")) .build(); } } } - return getListVolumesMethod; + return getResetInstanceMethod; } private static volatile io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.GetVolumeRequest, - com.google.cloud.baremetalsolution.v2.Volume> - getGetVolumeMethod; + com.google.cloud.baremetalsolution.v2.StartInstanceRequest, + com.google.longrunning.Operation> + getStartInstanceMethod; @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetVolume", - requestType = com.google.cloud.baremetalsolution.v2.GetVolumeRequest.class, - responseType = com.google.cloud.baremetalsolution.v2.Volume.class, + fullMethodName = SERVICE_NAME + '/' + "StartInstance", + requestType = com.google.cloud.baremetalsolution.v2.StartInstanceRequest.class, + responseType = com.google.longrunning.Operation.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.GetVolumeRequest, - com.google.cloud.baremetalsolution.v2.Volume> - getGetVolumeMethod() { + com.google.cloud.baremetalsolution.v2.StartInstanceRequest, + com.google.longrunning.Operation> + getStartInstanceMethod() { io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.GetVolumeRequest, - com.google.cloud.baremetalsolution.v2.Volume> - getGetVolumeMethod; - if ((getGetVolumeMethod = BareMetalSolutionGrpc.getGetVolumeMethod) == null) { + com.google.cloud.baremetalsolution.v2.StartInstanceRequest, + com.google.longrunning.Operation> + getStartInstanceMethod; + if ((getStartInstanceMethod = BareMetalSolutionGrpc.getStartInstanceMethod) == null) { synchronized (BareMetalSolutionGrpc.class) { - if ((getGetVolumeMethod = BareMetalSolutionGrpc.getGetVolumeMethod) == null) { - BareMetalSolutionGrpc.getGetVolumeMethod = - getGetVolumeMethod = + if ((getStartInstanceMethod = BareMetalSolutionGrpc.getStartInstanceMethod) == null) { + BareMetalSolutionGrpc.getStartInstanceMethod = + getStartInstanceMethod = io.grpc.MethodDescriptor - . + . newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetVolume")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StartInstance")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.baremetalsolution.v2.GetVolumeRequest + com.google.cloud.baremetalsolution.v2.StartInstanceRequest .getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.baremetalsolution.v2.Volume.getDefaultInstance())) + com.google.longrunning.Operation.getDefaultInstance())) .setSchemaDescriptor( - new BareMetalSolutionMethodDescriptorSupplier("GetVolume")) + new BareMetalSolutionMethodDescriptorSupplier("StartInstance")) .build(); } } } - return getGetVolumeMethod; + return getStartInstanceMethod; } private static volatile io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.UpdateVolumeRequest, + com.google.cloud.baremetalsolution.v2.StopInstanceRequest, com.google.longrunning.Operation> - getUpdateVolumeMethod; + getStopInstanceMethod; @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateVolume", - requestType = com.google.cloud.baremetalsolution.v2.UpdateVolumeRequest.class, + fullMethodName = SERVICE_NAME + '/' + "StopInstance", + requestType = com.google.cloud.baremetalsolution.v2.StopInstanceRequest.class, responseType = com.google.longrunning.Operation.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.UpdateVolumeRequest, + com.google.cloud.baremetalsolution.v2.StopInstanceRequest, com.google.longrunning.Operation> - getUpdateVolumeMethod() { + getStopInstanceMethod() { io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.UpdateVolumeRequest, + com.google.cloud.baremetalsolution.v2.StopInstanceRequest, com.google.longrunning.Operation> - getUpdateVolumeMethod; - if ((getUpdateVolumeMethod = BareMetalSolutionGrpc.getUpdateVolumeMethod) == null) { + getStopInstanceMethod; + if ((getStopInstanceMethod = BareMetalSolutionGrpc.getStopInstanceMethod) == null) { synchronized (BareMetalSolutionGrpc.class) { - if ((getUpdateVolumeMethod = BareMetalSolutionGrpc.getUpdateVolumeMethod) == null) { - BareMetalSolutionGrpc.getUpdateVolumeMethod = - getUpdateVolumeMethod = + if ((getStopInstanceMethod = BareMetalSolutionGrpc.getStopInstanceMethod) == null) { + BareMetalSolutionGrpc.getStopInstanceMethod = + getStopInstanceMethod = io.grpc.MethodDescriptor - . newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateVolume")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StopInstance")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.baremetalsolution.v2.UpdateVolumeRequest + com.google.cloud.baremetalsolution.v2.StopInstanceRequest .getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( com.google.longrunning.Operation.getDefaultInstance())) .setSchemaDescriptor( - new BareMetalSolutionMethodDescriptorSupplier("UpdateVolume")) + new BareMetalSolutionMethodDescriptorSupplier("StopInstance")) .build(); } } } - return getUpdateVolumeMethod; + return getStopInstanceMethod; } private static volatile io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.ListNetworksRequest, - com.google.cloud.baremetalsolution.v2.ListNetworksResponse> - getListNetworksMethod; + com.google.cloud.baremetalsolution.v2.DetachLunRequest, com.google.longrunning.Operation> + getDetachLunMethod; @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListNetworks", - requestType = com.google.cloud.baremetalsolution.v2.ListNetworksRequest.class, - responseType = com.google.cloud.baremetalsolution.v2.ListNetworksResponse.class, + fullMethodName = SERVICE_NAME + '/' + "DetachLun", + requestType = com.google.cloud.baremetalsolution.v2.DetachLunRequest.class, + responseType = com.google.longrunning.Operation.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.ListNetworksRequest, - com.google.cloud.baremetalsolution.v2.ListNetworksResponse> - getListNetworksMethod() { + com.google.cloud.baremetalsolution.v2.DetachLunRequest, com.google.longrunning.Operation> + getDetachLunMethod() { io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.ListNetworksRequest, - com.google.cloud.baremetalsolution.v2.ListNetworksResponse> - getListNetworksMethod; - if ((getListNetworksMethod = BareMetalSolutionGrpc.getListNetworksMethod) == null) { + com.google.cloud.baremetalsolution.v2.DetachLunRequest, + com.google.longrunning.Operation> + getDetachLunMethod; + if ((getDetachLunMethod = BareMetalSolutionGrpc.getDetachLunMethod) == null) { synchronized (BareMetalSolutionGrpc.class) { - if ((getListNetworksMethod = BareMetalSolutionGrpc.getListNetworksMethod) == null) { - BareMetalSolutionGrpc.getListNetworksMethod = - getListNetworksMethod = + if ((getDetachLunMethod = BareMetalSolutionGrpc.getDetachLunMethod) == null) { + BareMetalSolutionGrpc.getDetachLunMethod = + getDetachLunMethod = io.grpc.MethodDescriptor - . + . newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListNetworks")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DetachLun")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.baremetalsolution.v2.ListNetworksRequest + com.google.cloud.baremetalsolution.v2.DetachLunRequest .getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.baremetalsolution.v2.ListNetworksResponse - .getDefaultInstance())) + com.google.longrunning.Operation.getDefaultInstance())) .setSchemaDescriptor( - new BareMetalSolutionMethodDescriptorSupplier("ListNetworks")) + new BareMetalSolutionMethodDescriptorSupplier("DetachLun")) .build(); } } } - return getListNetworksMethod; + return getDetachLunMethod; } private static volatile io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.GetNetworkRequest, - com.google.cloud.baremetalsolution.v2.Network> - getGetNetworkMethod; + com.google.cloud.baremetalsolution.v2.ListVolumesRequest, + com.google.cloud.baremetalsolution.v2.ListVolumesResponse> + getListVolumesMethod; @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetNetwork", - requestType = com.google.cloud.baremetalsolution.v2.GetNetworkRequest.class, - responseType = com.google.cloud.baremetalsolution.v2.Network.class, + fullMethodName = SERVICE_NAME + '/' + "ListVolumes", + requestType = com.google.cloud.baremetalsolution.v2.ListVolumesRequest.class, + responseType = com.google.cloud.baremetalsolution.v2.ListVolumesResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.GetNetworkRequest, - com.google.cloud.baremetalsolution.v2.Network> - getGetNetworkMethod() { + com.google.cloud.baremetalsolution.v2.ListVolumesRequest, + com.google.cloud.baremetalsolution.v2.ListVolumesResponse> + getListVolumesMethod() { io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.GetNetworkRequest, - com.google.cloud.baremetalsolution.v2.Network> - getGetNetworkMethod; - if ((getGetNetworkMethod = BareMetalSolutionGrpc.getGetNetworkMethod) == null) { + com.google.cloud.baremetalsolution.v2.ListVolumesRequest, + com.google.cloud.baremetalsolution.v2.ListVolumesResponse> + getListVolumesMethod; + if ((getListVolumesMethod = BareMetalSolutionGrpc.getListVolumesMethod) == null) { synchronized (BareMetalSolutionGrpc.class) { - if ((getGetNetworkMethod = BareMetalSolutionGrpc.getGetNetworkMethod) == null) { - BareMetalSolutionGrpc.getGetNetworkMethod = - getGetNetworkMethod = + if ((getListVolumesMethod = BareMetalSolutionGrpc.getListVolumesMethod) == null) { + BareMetalSolutionGrpc.getListVolumesMethod = + getListVolumesMethod = io.grpc.MethodDescriptor - . + . newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNetwork")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListVolumes")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.baremetalsolution.v2.GetNetworkRequest + com.google.cloud.baremetalsolution.v2.ListVolumesRequest .getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.baremetalsolution.v2.Network.getDefaultInstance())) + com.google.cloud.baremetalsolution.v2.ListVolumesResponse + .getDefaultInstance())) .setSchemaDescriptor( - new BareMetalSolutionMethodDescriptorSupplier("GetNetwork")) + new BareMetalSolutionMethodDescriptorSupplier("ListVolumes")) .build(); } } } - return getGetNetworkMethod; + return getListVolumesMethod; } private static volatile io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest, - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse> - getListSnapshotSchedulePoliciesMethod; + com.google.cloud.baremetalsolution.v2.GetVolumeRequest, + com.google.cloud.baremetalsolution.v2.Volume> + getGetVolumeMethod; @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListSnapshotSchedulePolicies", - requestType = com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest.class, - responseType = - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse.class, + fullMethodName = SERVICE_NAME + '/' + "GetVolume", + requestType = com.google.cloud.baremetalsolution.v2.GetVolumeRequest.class, + responseType = com.google.cloud.baremetalsolution.v2.Volume.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest, - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse> - getListSnapshotSchedulePoliciesMethod() { + com.google.cloud.baremetalsolution.v2.GetVolumeRequest, + com.google.cloud.baremetalsolution.v2.Volume> + getGetVolumeMethod() { io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest, - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse> - getListSnapshotSchedulePoliciesMethod; - if ((getListSnapshotSchedulePoliciesMethod = - BareMetalSolutionGrpc.getListSnapshotSchedulePoliciesMethod) - == null) { + com.google.cloud.baremetalsolution.v2.GetVolumeRequest, + com.google.cloud.baremetalsolution.v2.Volume> + getGetVolumeMethod; + if ((getGetVolumeMethod = BareMetalSolutionGrpc.getGetVolumeMethod) == null) { synchronized (BareMetalSolutionGrpc.class) { - if ((getListSnapshotSchedulePoliciesMethod = - BareMetalSolutionGrpc.getListSnapshotSchedulePoliciesMethod) - == null) { - BareMetalSolutionGrpc.getListSnapshotSchedulePoliciesMethod = - getListSnapshotSchedulePoliciesMethod = + if ((getGetVolumeMethod = BareMetalSolutionGrpc.getGetVolumeMethod) == null) { + BareMetalSolutionGrpc.getGetVolumeMethod = + getGetVolumeMethod = io.grpc.MethodDescriptor - . + . newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "ListSnapshotSchedulePolicies")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetVolume")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.baremetalsolution.v2 - .ListSnapshotSchedulePoliciesRequest.getDefaultInstance())) + com.google.cloud.baremetalsolution.v2.GetVolumeRequest + .getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.baremetalsolution.v2 - .ListSnapshotSchedulePoliciesResponse.getDefaultInstance())) + com.google.cloud.baremetalsolution.v2.Volume.getDefaultInstance())) .setSchemaDescriptor( - new BareMetalSolutionMethodDescriptorSupplier( - "ListSnapshotSchedulePolicies")) + new BareMetalSolutionMethodDescriptorSupplier("GetVolume")) .build(); } } } - return getListSnapshotSchedulePoliciesMethod; + return getGetVolumeMethod; } private static volatile io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy> - getGetSnapshotSchedulePolicyMethod; + com.google.cloud.baremetalsolution.v2.UpdateVolumeRequest, + com.google.longrunning.Operation> + getUpdateVolumeMethod; @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetSnapshotSchedulePolicy", - requestType = com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest.class, - responseType = com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.class, + fullMethodName = SERVICE_NAME + '/' + "UpdateVolume", + requestType = com.google.cloud.baremetalsolution.v2.UpdateVolumeRequest.class, + responseType = com.google.longrunning.Operation.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy> - getGetSnapshotSchedulePolicyMethod() { + com.google.cloud.baremetalsolution.v2.UpdateVolumeRequest, + com.google.longrunning.Operation> + getUpdateVolumeMethod() { io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy> - getGetSnapshotSchedulePolicyMethod; - if ((getGetSnapshotSchedulePolicyMethod = - BareMetalSolutionGrpc.getGetSnapshotSchedulePolicyMethod) - == null) { + com.google.cloud.baremetalsolution.v2.UpdateVolumeRequest, + com.google.longrunning.Operation> + getUpdateVolumeMethod; + if ((getUpdateVolumeMethod = BareMetalSolutionGrpc.getUpdateVolumeMethod) == null) { synchronized (BareMetalSolutionGrpc.class) { - if ((getGetSnapshotSchedulePolicyMethod = - BareMetalSolutionGrpc.getGetSnapshotSchedulePolicyMethod) - == null) { - BareMetalSolutionGrpc.getGetSnapshotSchedulePolicyMethod = - getGetSnapshotSchedulePolicyMethod = + if ((getUpdateVolumeMethod = BareMetalSolutionGrpc.getUpdateVolumeMethod) == null) { + BareMetalSolutionGrpc.getUpdateVolumeMethod = + getUpdateVolumeMethod = io.grpc.MethodDescriptor - . + . newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "GetSnapshotSchedulePolicy")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateVolume")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest + com.google.cloud.baremetalsolution.v2.UpdateVolumeRequest .getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy - .getDefaultInstance())) + com.google.longrunning.Operation.getDefaultInstance())) .setSchemaDescriptor( - new BareMetalSolutionMethodDescriptorSupplier( - "GetSnapshotSchedulePolicy")) + new BareMetalSolutionMethodDescriptorSupplier("UpdateVolume")) .build(); } } } - return getGetSnapshotSchedulePolicyMethod; + return getUpdateVolumeMethod; } private static volatile io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy> - getCreateSnapshotSchedulePolicyMethod; + com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest, + com.google.longrunning.Operation> + getResizeVolumeMethod; @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateSnapshotSchedulePolicy", - requestType = com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest.class, - responseType = com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.class, + fullMethodName = SERVICE_NAME + '/' + "ResizeVolume", + requestType = com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest.class, + responseType = com.google.longrunning.Operation.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy> - getCreateSnapshotSchedulePolicyMethod() { + com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest, + com.google.longrunning.Operation> + getResizeVolumeMethod() { io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy> - getCreateSnapshotSchedulePolicyMethod; - if ((getCreateSnapshotSchedulePolicyMethod = - BareMetalSolutionGrpc.getCreateSnapshotSchedulePolicyMethod) - == null) { + com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest, + com.google.longrunning.Operation> + getResizeVolumeMethod; + if ((getResizeVolumeMethod = BareMetalSolutionGrpc.getResizeVolumeMethod) == null) { synchronized (BareMetalSolutionGrpc.class) { - if ((getCreateSnapshotSchedulePolicyMethod = - BareMetalSolutionGrpc.getCreateSnapshotSchedulePolicyMethod) - == null) { - BareMetalSolutionGrpc.getCreateSnapshotSchedulePolicyMethod = - getCreateSnapshotSchedulePolicyMethod = + if ((getResizeVolumeMethod = BareMetalSolutionGrpc.getResizeVolumeMethod) == null) { + BareMetalSolutionGrpc.getResizeVolumeMethod = + getResizeVolumeMethod = io.grpc.MethodDescriptor - . + . newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "CreateSnapshotSchedulePolicy")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ResizeVolume")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.baremetalsolution.v2 - .CreateSnapshotSchedulePolicyRequest.getDefaultInstance())) + com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest + .getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy - .getDefaultInstance())) + com.google.longrunning.Operation.getDefaultInstance())) .setSchemaDescriptor( - new BareMetalSolutionMethodDescriptorSupplier( - "CreateSnapshotSchedulePolicy")) + new BareMetalSolutionMethodDescriptorSupplier("ResizeVolume")) .build(); } } } - return getCreateSnapshotSchedulePolicyMethod; + return getResizeVolumeMethod; } private static volatile io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy> - getUpdateSnapshotSchedulePolicyMethod; + com.google.cloud.baremetalsolution.v2.ListNetworksRequest, + com.google.cloud.baremetalsolution.v2.ListNetworksResponse> + getListNetworksMethod; @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateSnapshotSchedulePolicy", - requestType = com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest.class, - responseType = com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.class, + fullMethodName = SERVICE_NAME + '/' + "ListNetworks", + requestType = com.google.cloud.baremetalsolution.v2.ListNetworksRequest.class, + responseType = com.google.cloud.baremetalsolution.v2.ListNetworksResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy> - getUpdateSnapshotSchedulePolicyMethod() { + com.google.cloud.baremetalsolution.v2.ListNetworksRequest, + com.google.cloud.baremetalsolution.v2.ListNetworksResponse> + getListNetworksMethod() { io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy> - getUpdateSnapshotSchedulePolicyMethod; - if ((getUpdateSnapshotSchedulePolicyMethod = - BareMetalSolutionGrpc.getUpdateSnapshotSchedulePolicyMethod) - == null) { + com.google.cloud.baremetalsolution.v2.ListNetworksRequest, + com.google.cloud.baremetalsolution.v2.ListNetworksResponse> + getListNetworksMethod; + if ((getListNetworksMethod = BareMetalSolutionGrpc.getListNetworksMethod) == null) { synchronized (BareMetalSolutionGrpc.class) { - if ((getUpdateSnapshotSchedulePolicyMethod = - BareMetalSolutionGrpc.getUpdateSnapshotSchedulePolicyMethod) - == null) { - BareMetalSolutionGrpc.getUpdateSnapshotSchedulePolicyMethod = - getUpdateSnapshotSchedulePolicyMethod = + if ((getListNetworksMethod = BareMetalSolutionGrpc.getListNetworksMethod) == null) { + BareMetalSolutionGrpc.getListNetworksMethod = + getListNetworksMethod = io.grpc.MethodDescriptor - . + . newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "UpdateSnapshotSchedulePolicy")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListNetworks")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.baremetalsolution.v2 - .UpdateSnapshotSchedulePolicyRequest.getDefaultInstance())) + com.google.cloud.baremetalsolution.v2.ListNetworksRequest + .getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy + com.google.cloud.baremetalsolution.v2.ListNetworksResponse .getDefaultInstance())) .setSchemaDescriptor( - new BareMetalSolutionMethodDescriptorSupplier( - "UpdateSnapshotSchedulePolicy")) + new BareMetalSolutionMethodDescriptorSupplier("ListNetworks")) .build(); } } } - return getUpdateSnapshotSchedulePolicyMethod; + return getListNetworksMethod; } private static volatile io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest, - com.google.protobuf.Empty> - getDeleteSnapshotSchedulePolicyMethod; + com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest, + com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse> + getListNetworkUsageMethod; @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteSnapshotSchedulePolicy", - requestType = com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest.class, - responseType = com.google.protobuf.Empty.class, + fullMethodName = SERVICE_NAME + '/' + "ListNetworkUsage", + requestType = com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest.class, + responseType = com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest, - com.google.protobuf.Empty> - getDeleteSnapshotSchedulePolicyMethod() { + com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest, + com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse> + getListNetworkUsageMethod() { io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest, - com.google.protobuf.Empty> - getDeleteSnapshotSchedulePolicyMethod; - if ((getDeleteSnapshotSchedulePolicyMethod = - BareMetalSolutionGrpc.getDeleteSnapshotSchedulePolicyMethod) - == null) { + com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest, + com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse> + getListNetworkUsageMethod; + if ((getListNetworkUsageMethod = BareMetalSolutionGrpc.getListNetworkUsageMethod) == null) { synchronized (BareMetalSolutionGrpc.class) { - if ((getDeleteSnapshotSchedulePolicyMethod = - BareMetalSolutionGrpc.getDeleteSnapshotSchedulePolicyMethod) - == null) { - BareMetalSolutionGrpc.getDeleteSnapshotSchedulePolicyMethod = - getDeleteSnapshotSchedulePolicyMethod = + if ((getListNetworkUsageMethod = BareMetalSolutionGrpc.getListNetworkUsageMethod) == null) { + BareMetalSolutionGrpc.getListNetworkUsageMethod = + getListNetworkUsageMethod = io.grpc.MethodDescriptor - . + . newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "DeleteSnapshotSchedulePolicy")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListNetworkUsage")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.baremetalsolution.v2 - .DeleteSnapshotSchedulePolicyRequest.getDefaultInstance())) + com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest + .getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) + com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse + .getDefaultInstance())) .setSchemaDescriptor( - new BareMetalSolutionMethodDescriptorSupplier( - "DeleteSnapshotSchedulePolicy")) + new BareMetalSolutionMethodDescriptorSupplier("ListNetworkUsage")) .build(); } } } - return getDeleteSnapshotSchedulePolicyMethod; + return getListNetworkUsageMethod; } private static volatile io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest, - com.google.cloud.baremetalsolution.v2.VolumeSnapshot> - getCreateVolumeSnapshotMethod; + com.google.cloud.baremetalsolution.v2.GetNetworkRequest, + com.google.cloud.baremetalsolution.v2.Network> + getGetNetworkMethod; @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateVolumeSnapshot", - requestType = com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest.class, - responseType = com.google.cloud.baremetalsolution.v2.VolumeSnapshot.class, + fullMethodName = SERVICE_NAME + '/' + "GetNetwork", + requestType = com.google.cloud.baremetalsolution.v2.GetNetworkRequest.class, + responseType = com.google.cloud.baremetalsolution.v2.Network.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest, - com.google.cloud.baremetalsolution.v2.VolumeSnapshot> - getCreateVolumeSnapshotMethod() { + com.google.cloud.baremetalsolution.v2.GetNetworkRequest, + com.google.cloud.baremetalsolution.v2.Network> + getGetNetworkMethod() { io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest, - com.google.cloud.baremetalsolution.v2.VolumeSnapshot> - getCreateVolumeSnapshotMethod; - if ((getCreateVolumeSnapshotMethod = BareMetalSolutionGrpc.getCreateVolumeSnapshotMethod) - == null) { + com.google.cloud.baremetalsolution.v2.GetNetworkRequest, + com.google.cloud.baremetalsolution.v2.Network> + getGetNetworkMethod; + if ((getGetNetworkMethod = BareMetalSolutionGrpc.getGetNetworkMethod) == null) { synchronized (BareMetalSolutionGrpc.class) { - if ((getCreateVolumeSnapshotMethod = BareMetalSolutionGrpc.getCreateVolumeSnapshotMethod) - == null) { - BareMetalSolutionGrpc.getCreateVolumeSnapshotMethod = - getCreateVolumeSnapshotMethod = + if ((getGetNetworkMethod = BareMetalSolutionGrpc.getGetNetworkMethod) == null) { + BareMetalSolutionGrpc.getGetNetworkMethod = + getGetNetworkMethod = io.grpc.MethodDescriptor - . + . newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "CreateVolumeSnapshot")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNetwork")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest + com.google.cloud.baremetalsolution.v2.GetNetworkRequest .getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.baremetalsolution.v2.VolumeSnapshot - .getDefaultInstance())) + com.google.cloud.baremetalsolution.v2.Network.getDefaultInstance())) .setSchemaDescriptor( - new BareMetalSolutionMethodDescriptorSupplier("CreateVolumeSnapshot")) + new BareMetalSolutionMethodDescriptorSupplier("GetNetwork")) .build(); } } } - return getCreateVolumeSnapshotMethod; + return getGetNetworkMethod; } private static volatile io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest, + com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest, com.google.longrunning.Operation> - getRestoreVolumeSnapshotMethod; + getUpdateNetworkMethod; @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RestoreVolumeSnapshot", - requestType = com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest.class, + fullMethodName = SERVICE_NAME + '/' + "UpdateNetwork", + requestType = com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest.class, responseType = com.google.longrunning.Operation.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest, + com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest, com.google.longrunning.Operation> - getRestoreVolumeSnapshotMethod() { + getUpdateNetworkMethod() { io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest, + com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest, com.google.longrunning.Operation> - getRestoreVolumeSnapshotMethod; - if ((getRestoreVolumeSnapshotMethod = BareMetalSolutionGrpc.getRestoreVolumeSnapshotMethod) - == null) { + getUpdateNetworkMethod; + if ((getUpdateNetworkMethod = BareMetalSolutionGrpc.getUpdateNetworkMethod) == null) { synchronized (BareMetalSolutionGrpc.class) { - if ((getRestoreVolumeSnapshotMethod = BareMetalSolutionGrpc.getRestoreVolumeSnapshotMethod) - == null) { - BareMetalSolutionGrpc.getRestoreVolumeSnapshotMethod = - getRestoreVolumeSnapshotMethod = + if ((getUpdateNetworkMethod = BareMetalSolutionGrpc.getUpdateNetworkMethod) == null) { + BareMetalSolutionGrpc.getUpdateNetworkMethod = + getUpdateNetworkMethod = io.grpc.MethodDescriptor - . newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "RestoreVolumeSnapshot")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateNetwork")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest + com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest .getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( com.google.longrunning.Operation.getDefaultInstance())) .setSchemaDescriptor( - new BareMetalSolutionMethodDescriptorSupplier("RestoreVolumeSnapshot")) + new BareMetalSolutionMethodDescriptorSupplier("UpdateNetwork")) .build(); } } } - return getRestoreVolumeSnapshotMethod; + return getUpdateNetworkMethod; } private static volatile io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest, - com.google.protobuf.Empty> - getDeleteVolumeSnapshotMethod; + com.google.cloud.baremetalsolution.v2.GetLunRequest, + com.google.cloud.baremetalsolution.v2.Lun> + getGetLunMethod; @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteVolumeSnapshot", - requestType = com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest.class, - responseType = com.google.protobuf.Empty.class, + fullMethodName = SERVICE_NAME + '/' + "GetLun", + requestType = com.google.cloud.baremetalsolution.v2.GetLunRequest.class, + responseType = com.google.cloud.baremetalsolution.v2.Lun.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest, - com.google.protobuf.Empty> - getDeleteVolumeSnapshotMethod() { + com.google.cloud.baremetalsolution.v2.GetLunRequest, + com.google.cloud.baremetalsolution.v2.Lun> + getGetLunMethod() { io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest, - com.google.protobuf.Empty> - getDeleteVolumeSnapshotMethod; - if ((getDeleteVolumeSnapshotMethod = BareMetalSolutionGrpc.getDeleteVolumeSnapshotMethod) - == null) { + com.google.cloud.baremetalsolution.v2.GetLunRequest, + com.google.cloud.baremetalsolution.v2.Lun> + getGetLunMethod; + if ((getGetLunMethod = BareMetalSolutionGrpc.getGetLunMethod) == null) { synchronized (BareMetalSolutionGrpc.class) { - if ((getDeleteVolumeSnapshotMethod = BareMetalSolutionGrpc.getDeleteVolumeSnapshotMethod) - == null) { - BareMetalSolutionGrpc.getDeleteVolumeSnapshotMethod = - getDeleteVolumeSnapshotMethod = + if ((getGetLunMethod = BareMetalSolutionGrpc.getGetLunMethod) == null) { + BareMetalSolutionGrpc.getGetLunMethod = + getGetLunMethod = io.grpc.MethodDescriptor - . + . newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "DeleteVolumeSnapshot")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetLun")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest + com.google.cloud.baremetalsolution.v2.GetLunRequest .getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor( - new BareMetalSolutionMethodDescriptorSupplier("DeleteVolumeSnapshot")) + com.google.cloud.baremetalsolution.v2.Lun.getDefaultInstance())) + .setSchemaDescriptor(new BareMetalSolutionMethodDescriptorSupplier("GetLun")) .build(); } } } - return getDeleteVolumeSnapshotMethod; + return getGetLunMethod; } private static volatile io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest, - com.google.cloud.baremetalsolution.v2.VolumeSnapshot> - getGetVolumeSnapshotMethod; + com.google.cloud.baremetalsolution.v2.ListLunsRequest, + com.google.cloud.baremetalsolution.v2.ListLunsResponse> + getListLunsMethod; @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetVolumeSnapshot", - requestType = com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest.class, - responseType = com.google.cloud.baremetalsolution.v2.VolumeSnapshot.class, + fullMethodName = SERVICE_NAME + '/' + "ListLuns", + requestType = com.google.cloud.baremetalsolution.v2.ListLunsRequest.class, + responseType = com.google.cloud.baremetalsolution.v2.ListLunsResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest, - com.google.cloud.baremetalsolution.v2.VolumeSnapshot> - getGetVolumeSnapshotMethod() { + com.google.cloud.baremetalsolution.v2.ListLunsRequest, + com.google.cloud.baremetalsolution.v2.ListLunsResponse> + getListLunsMethod() { io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest, - com.google.cloud.baremetalsolution.v2.VolumeSnapshot> - getGetVolumeSnapshotMethod; - if ((getGetVolumeSnapshotMethod = BareMetalSolutionGrpc.getGetVolumeSnapshotMethod) == null) { + com.google.cloud.baremetalsolution.v2.ListLunsRequest, + com.google.cloud.baremetalsolution.v2.ListLunsResponse> + getListLunsMethod; + if ((getListLunsMethod = BareMetalSolutionGrpc.getListLunsMethod) == null) { synchronized (BareMetalSolutionGrpc.class) { - if ((getGetVolumeSnapshotMethod = BareMetalSolutionGrpc.getGetVolumeSnapshotMethod) - == null) { - BareMetalSolutionGrpc.getGetVolumeSnapshotMethod = - getGetVolumeSnapshotMethod = + if ((getListLunsMethod = BareMetalSolutionGrpc.getListLunsMethod) == null) { + BareMetalSolutionGrpc.getListLunsMethod = + getListLunsMethod = io.grpc.MethodDescriptor - . + . newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetVolumeSnapshot")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListLuns")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest + com.google.cloud.baremetalsolution.v2.ListLunsRequest .getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.baremetalsolution.v2.VolumeSnapshot + com.google.cloud.baremetalsolution.v2.ListLunsResponse .getDefaultInstance())) .setSchemaDescriptor( - new BareMetalSolutionMethodDescriptorSupplier("GetVolumeSnapshot")) + new BareMetalSolutionMethodDescriptorSupplier("ListLuns")) .build(); } } } - return getGetVolumeSnapshotMethod; + return getListLunsMethod; } private static volatile io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest, - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse> - getListVolumeSnapshotsMethod; + com.google.cloud.baremetalsolution.v2.GetNfsShareRequest, + com.google.cloud.baremetalsolution.v2.NfsShare> + getGetNfsShareMethod; @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListVolumeSnapshots", - requestType = com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest.class, - responseType = com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse.class, + fullMethodName = SERVICE_NAME + '/' + "GetNfsShare", + requestType = com.google.cloud.baremetalsolution.v2.GetNfsShareRequest.class, + responseType = com.google.cloud.baremetalsolution.v2.NfsShare.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest, - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse> - getListVolumeSnapshotsMethod() { + com.google.cloud.baremetalsolution.v2.GetNfsShareRequest, + com.google.cloud.baremetalsolution.v2.NfsShare> + getGetNfsShareMethod() { io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest, - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse> - getListVolumeSnapshotsMethod; - if ((getListVolumeSnapshotsMethod = BareMetalSolutionGrpc.getListVolumeSnapshotsMethod) - == null) { + com.google.cloud.baremetalsolution.v2.GetNfsShareRequest, + com.google.cloud.baremetalsolution.v2.NfsShare> + getGetNfsShareMethod; + if ((getGetNfsShareMethod = BareMetalSolutionGrpc.getGetNfsShareMethod) == null) { synchronized (BareMetalSolutionGrpc.class) { - if ((getListVolumeSnapshotsMethod = BareMetalSolutionGrpc.getListVolumeSnapshotsMethod) - == null) { - BareMetalSolutionGrpc.getListVolumeSnapshotsMethod = - getListVolumeSnapshotsMethod = + if ((getGetNfsShareMethod = BareMetalSolutionGrpc.getGetNfsShareMethod) == null) { + BareMetalSolutionGrpc.getGetNfsShareMethod = + getGetNfsShareMethod = io.grpc.MethodDescriptor - . + . newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "ListVolumeSnapshots")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNfsShare")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest + com.google.cloud.baremetalsolution.v2.GetNfsShareRequest .getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse - .getDefaultInstance())) + com.google.cloud.baremetalsolution.v2.NfsShare.getDefaultInstance())) .setSchemaDescriptor( - new BareMetalSolutionMethodDescriptorSupplier("ListVolumeSnapshots")) + new BareMetalSolutionMethodDescriptorSupplier("GetNfsShare")) .build(); } } } - return getListVolumeSnapshotsMethod; + return getGetNfsShareMethod; } private static volatile io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.GetLunRequest, - com.google.cloud.baremetalsolution.v2.Lun> - getGetLunMethod; + com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest, + com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse> + getListNfsSharesMethod; @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetLun", - requestType = com.google.cloud.baremetalsolution.v2.GetLunRequest.class, - responseType = com.google.cloud.baremetalsolution.v2.Lun.class, + fullMethodName = SERVICE_NAME + '/' + "ListNfsShares", + requestType = com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest.class, + responseType = com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.GetLunRequest, - com.google.cloud.baremetalsolution.v2.Lun> - getGetLunMethod() { + com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest, + com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse> + getListNfsSharesMethod() { io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.GetLunRequest, - com.google.cloud.baremetalsolution.v2.Lun> - getGetLunMethod; - if ((getGetLunMethod = BareMetalSolutionGrpc.getGetLunMethod) == null) { + com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest, + com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse> + getListNfsSharesMethod; + if ((getListNfsSharesMethod = BareMetalSolutionGrpc.getListNfsSharesMethod) == null) { synchronized (BareMetalSolutionGrpc.class) { - if ((getGetLunMethod = BareMetalSolutionGrpc.getGetLunMethod) == null) { - BareMetalSolutionGrpc.getGetLunMethod = - getGetLunMethod = + if ((getListNfsSharesMethod = BareMetalSolutionGrpc.getListNfsSharesMethod) == null) { + BareMetalSolutionGrpc.getListNfsSharesMethod = + getListNfsSharesMethod = io.grpc.MethodDescriptor - . + . newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetLun")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListNfsShares")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.baremetalsolution.v2.GetLunRequest + com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest .getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.baremetalsolution.v2.Lun.getDefaultInstance())) - .setSchemaDescriptor(new BareMetalSolutionMethodDescriptorSupplier("GetLun")) + com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new BareMetalSolutionMethodDescriptorSupplier("ListNfsShares")) .build(); } } } - return getGetLunMethod; + return getListNfsSharesMethod; } private static volatile io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.ListLunsRequest, - com.google.cloud.baremetalsolution.v2.ListLunsResponse> - getListLunsMethod; + com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest, + com.google.longrunning.Operation> + getUpdateNfsShareMethod; @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListLuns", - requestType = com.google.cloud.baremetalsolution.v2.ListLunsRequest.class, - responseType = com.google.cloud.baremetalsolution.v2.ListLunsResponse.class, + fullMethodName = SERVICE_NAME + '/' + "UpdateNfsShare", + requestType = com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest.class, + responseType = com.google.longrunning.Operation.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.ListLunsRequest, - com.google.cloud.baremetalsolution.v2.ListLunsResponse> - getListLunsMethod() { + com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest, + com.google.longrunning.Operation> + getUpdateNfsShareMethod() { io.grpc.MethodDescriptor< - com.google.cloud.baremetalsolution.v2.ListLunsRequest, - com.google.cloud.baremetalsolution.v2.ListLunsResponse> - getListLunsMethod; - if ((getListLunsMethod = BareMetalSolutionGrpc.getListLunsMethod) == null) { + com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest, + com.google.longrunning.Operation> + getUpdateNfsShareMethod; + if ((getUpdateNfsShareMethod = BareMetalSolutionGrpc.getUpdateNfsShareMethod) == null) { synchronized (BareMetalSolutionGrpc.class) { - if ((getListLunsMethod = BareMetalSolutionGrpc.getListLunsMethod) == null) { - BareMetalSolutionGrpc.getListLunsMethod = - getListLunsMethod = + if ((getUpdateNfsShareMethod = BareMetalSolutionGrpc.getUpdateNfsShareMethod) == null) { + BareMetalSolutionGrpc.getUpdateNfsShareMethod = + getUpdateNfsShareMethod = io.grpc.MethodDescriptor - . + . newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListLuns")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateNfsShare")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.baremetalsolution.v2.ListLunsRequest + com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest .getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.baremetalsolution.v2.ListLunsResponse - .getDefaultInstance())) + com.google.longrunning.Operation.getDefaultInstance())) .setSchemaDescriptor( - new BareMetalSolutionMethodDescriptorSupplier("ListLuns")) + new BareMetalSolutionMethodDescriptorSupplier("UpdateNfsShare")) .build(); } } } - return getListLunsMethod; + return getUpdateNfsShareMethod; } /** Creates a new async stub that supports all call types for the service */ @@ -1106,263 +1054,257 @@ public void getInstance( * * *

-     * Perform an ungraceful, hard reset on a server. Equivalent to shutting the
-     * power off and then turning it back on.
+     * Update details of a single server.
      * 
*/ - public void resetInstance( - com.google.cloud.baremetalsolution.v2.ResetInstanceRequest request, + public void updateInstance( + com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getResetInstanceMethod(), responseObserver); + getUpdateInstanceMethod(), responseObserver); } /** * * *
-     * List storage volumes in a given project and location.
+     * Perform an ungraceful, hard reset on a server. Equivalent to shutting the
+     * power off and then turning it back on.
      * 
*/ - public void listVolumes( - com.google.cloud.baremetalsolution.v2.ListVolumesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { + public void resetInstance( + com.google.cloud.baremetalsolution.v2.ResetInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListVolumesMethod(), responseObserver); + getResetInstanceMethod(), responseObserver); } /** * * *
-     * Get details of a single storage volume.
+     * Starts a server that was shutdown.
      * 
*/ - public void getVolume( - com.google.cloud.baremetalsolution.v2.GetVolumeRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetVolumeMethod(), responseObserver); + public void startInstance( + com.google.cloud.baremetalsolution.v2.StartInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getStartInstanceMethod(), responseObserver); } /** * * *
-     * Update details of a single storage volume.
+     * Stop a running server.
      * 
*/ - public void updateVolume( - com.google.cloud.baremetalsolution.v2.UpdateVolumeRequest request, + public void stopInstance( + com.google.cloud.baremetalsolution.v2.StopInstanceRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdateVolumeMethod(), responseObserver); + getStopInstanceMethod(), responseObserver); } /** * * *
-     * List network in a given project and location.
+     * Detach LUN from Instance.
      * 
*/ - public void listNetworks( - com.google.cloud.baremetalsolution.v2.ListNetworksRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListNetworksMethod(), responseObserver); + public void detachLun( + com.google.cloud.baremetalsolution.v2.DetachLunRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDetachLunMethod(), responseObserver); } /** * * *
-     * Get details of a single network.
+     * List storage volumes in a given project and location.
      * 
*/ - public void getNetwork( - com.google.cloud.baremetalsolution.v2.GetNetworkRequest request, - io.grpc.stub.StreamObserver + public void listVolumes( + com.google.cloud.baremetalsolution.v2.ListVolumesRequest request, + io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNetworkMethod(), responseObserver); + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListVolumesMethod(), responseObserver); } /** * * *
-     * List snapshot schedule policies in a given project and location.
+     * Get details of a single storage volume.
      * 
*/ - public void listSnapshotSchedulePolicies( - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest request, - io.grpc.stub.StreamObserver< - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse> + public void getVolume( + com.google.cloud.baremetalsolution.v2.GetVolumeRequest request, + io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListSnapshotSchedulePoliciesMethod(), responseObserver); + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetVolumeMethod(), responseObserver); } /** * * *
-     * Get details of a single snapshot schedule policy.
+     * Update details of a single storage volume.
      * 
*/ - public void getSnapshotSchedulePolicy( - com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest request, - io.grpc.stub.StreamObserver - responseObserver) { + public void updateVolume( + com.google.cloud.baremetalsolution.v2.UpdateVolumeRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetSnapshotSchedulePolicyMethod(), responseObserver); + getUpdateVolumeMethod(), responseObserver); } /** * * *
-     * Create a snapshot schedule policy in the specified project.
+     * Emergency Volume resize.
      * 
*/ - public void createSnapshotSchedulePolicy( - com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest request, - io.grpc.stub.StreamObserver - responseObserver) { + public void resizeVolume( + com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateSnapshotSchedulePolicyMethod(), responseObserver); + getResizeVolumeMethod(), responseObserver); } /** * * *
-     * Update a snapshot schedule policy in the specified project.
+     * List network in a given project and location.
      * 
*/ - public void updateSnapshotSchedulePolicy( - com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest request, - io.grpc.stub.StreamObserver + public void listNetworks( + com.google.cloud.baremetalsolution.v2.ListNetworksRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdateSnapshotSchedulePolicyMethod(), responseObserver); + getListNetworksMethod(), responseObserver); } /** * * *
-     * Delete a named snapshot schedule policy.
+     * List all Networks (and used IPs for each Network) in the vendor account
+     * associated with the specified project.
      * 
*/ - public void deleteSnapshotSchedulePolicy( - com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { + public void listNetworkUsage( + com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest request, + io.grpc.stub.StreamObserver + responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteSnapshotSchedulePolicyMethod(), responseObserver); + getListNetworkUsageMethod(), responseObserver); } /** * * *
-     * Create a storage volume snapshot in a containing volume.
+     * Get details of a single network.
      * 
*/ - public void createVolumeSnapshot( - com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest request, - io.grpc.stub.StreamObserver + public void getNetwork( + com.google.cloud.baremetalsolution.v2.GetNetworkRequest request, + io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateVolumeSnapshotMethod(), responseObserver); + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNetworkMethod(), responseObserver); } /** * * *
-     * Restore a storage volume snapshot to its containing volume.
+     * Update details of a single network.
      * 
*/ - public void restoreVolumeSnapshot( - com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest request, + public void updateNetwork( + com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getRestoreVolumeSnapshotMethod(), responseObserver); + getUpdateNetworkMethod(), responseObserver); } /** * * *
-     * Deletes a storage volume snapshot for a given volume.
+     * Get details of a single storage logical unit number(LUN).
      * 
*/ - public void deleteVolumeSnapshot( - com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteVolumeSnapshotMethod(), responseObserver); + public void getLun( + com.google.cloud.baremetalsolution.v2.GetLunRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetLunMethod(), responseObserver); } /** * * *
-     * Get details of a single storage volume snapshot.
+     * List storage volume luns for given storage volume.
      * 
*/ - public void getVolumeSnapshot( - com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest request, - io.grpc.stub.StreamObserver + public void listLuns( + com.google.cloud.baremetalsolution.v2.ListLunsRequest request, + io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetVolumeSnapshotMethod(), responseObserver); + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListLunsMethod(), responseObserver); } /** * * *
-     * List storage volume snapshots for given storage volume.
+     * Get details of a single NFS share.
      * 
*/ - public void listVolumeSnapshots( - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest request, - io.grpc.stub.StreamObserver< - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse> + public void getNfsShare( + com.google.cloud.baremetalsolution.v2.GetNfsShareRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListVolumeSnapshotsMethod(), responseObserver); + getGetNfsShareMethod(), responseObserver); } /** * * *
-     * Get details of a single storage logical unit number(LUN).
+     * List NFS shares.
      * 
*/ - public void getLun( - com.google.cloud.baremetalsolution.v2.GetLunRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetLunMethod(), responseObserver); + public void listNfsShares( + com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListNfsSharesMethod(), responseObserver); } /** * * *
-     * List storage volume luns for given storage volume.
+     * Update details of a single NFS share.
      * 
*/ - public void listLuns( - com.google.cloud.baremetalsolution.v2.ListLunsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListLunsMethod(), responseObserver); + public void updateNfsShare( + com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateNfsShareMethod(), responseObserver); } @java.lang.Override @@ -1381,12 +1323,36 @@ public final io.grpc.ServerServiceDefinition bindService() { new MethodHandlers< com.google.cloud.baremetalsolution.v2.GetInstanceRequest, com.google.cloud.baremetalsolution.v2.Instance>(this, METHODID_GET_INSTANCE))) + .addMethod( + getUpdateInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest, + com.google.longrunning.Operation>(this, METHODID_UPDATE_INSTANCE))) .addMethod( getResetInstanceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.google.cloud.baremetalsolution.v2.ResetInstanceRequest, com.google.longrunning.Operation>(this, METHODID_RESET_INSTANCE))) + .addMethod( + getStartInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.baremetalsolution.v2.StartInstanceRequest, + com.google.longrunning.Operation>(this, METHODID_START_INSTANCE))) + .addMethod( + getStopInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.baremetalsolution.v2.StopInstanceRequest, + com.google.longrunning.Operation>(this, METHODID_STOP_INSTANCE))) + .addMethod( + getDetachLunMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.baremetalsolution.v2.DetachLunRequest, + com.google.longrunning.Operation>(this, METHODID_DETACH_LUN))) .addMethod( getListVolumesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1406,6 +1372,12 @@ public final io.grpc.ServerServiceDefinition bindService() { new MethodHandlers< com.google.cloud.baremetalsolution.v2.UpdateVolumeRequest, com.google.longrunning.Operation>(this, METHODID_UPDATE_VOLUME))) + .addMethod( + getResizeVolumeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest, + com.google.longrunning.Operation>(this, METHODID_RESIZE_VOLUME))) .addMethod( getListNetworksMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1414,91 +1386,57 @@ public final io.grpc.ServerServiceDefinition bindService() { com.google.cloud.baremetalsolution.v2.ListNetworksResponse>( this, METHODID_LIST_NETWORKS))) .addMethod( - getGetNetworkMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.baremetalsolution.v2.GetNetworkRequest, - com.google.cloud.baremetalsolution.v2.Network>(this, METHODID_GET_NETWORK))) - .addMethod( - getListSnapshotSchedulePoliciesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest, - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse>( - this, METHODID_LIST_SNAPSHOT_SCHEDULE_POLICIES))) - .addMethod( - getGetSnapshotSchedulePolicyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy>( - this, METHODID_GET_SNAPSHOT_SCHEDULE_POLICY))) - .addMethod( - getCreateSnapshotSchedulePolicyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy>( - this, METHODID_CREATE_SNAPSHOT_SCHEDULE_POLICY))) - .addMethod( - getUpdateSnapshotSchedulePolicyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy>( - this, METHODID_UPDATE_SNAPSHOT_SCHEDULE_POLICY))) - .addMethod( - getDeleteSnapshotSchedulePolicyMethod(), + getListNetworkUsageMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< - com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest, - com.google.protobuf.Empty>(this, METHODID_DELETE_SNAPSHOT_SCHEDULE_POLICY))) + com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest, + com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse>( + this, METHODID_LIST_NETWORK_USAGE))) .addMethod( - getCreateVolumeSnapshotMethod(), + getGetNetworkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< - com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest, - com.google.cloud.baremetalsolution.v2.VolumeSnapshot>( - this, METHODID_CREATE_VOLUME_SNAPSHOT))) + com.google.cloud.baremetalsolution.v2.GetNetworkRequest, + com.google.cloud.baremetalsolution.v2.Network>(this, METHODID_GET_NETWORK))) .addMethod( - getRestoreVolumeSnapshotMethod(), + getUpdateNetworkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< - com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest, - com.google.longrunning.Operation>(this, METHODID_RESTORE_VOLUME_SNAPSHOT))) + com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest, + com.google.longrunning.Operation>(this, METHODID_UPDATE_NETWORK))) .addMethod( - getDeleteVolumeSnapshotMethod(), + getGetLunMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< - com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest, - com.google.protobuf.Empty>(this, METHODID_DELETE_VOLUME_SNAPSHOT))) + com.google.cloud.baremetalsolution.v2.GetLunRequest, + com.google.cloud.baremetalsolution.v2.Lun>(this, METHODID_GET_LUN))) .addMethod( - getGetVolumeSnapshotMethod(), + getListLunsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< - com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest, - com.google.cloud.baremetalsolution.v2.VolumeSnapshot>( - this, METHODID_GET_VOLUME_SNAPSHOT))) + com.google.cloud.baremetalsolution.v2.ListLunsRequest, + com.google.cloud.baremetalsolution.v2.ListLunsResponse>( + this, METHODID_LIST_LUNS))) .addMethod( - getListVolumeSnapshotsMethod(), + getGetNfsShareMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest, - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse>( - this, METHODID_LIST_VOLUME_SNAPSHOTS))) + com.google.cloud.baremetalsolution.v2.GetNfsShareRequest, + com.google.cloud.baremetalsolution.v2.NfsShare>( + this, METHODID_GET_NFS_SHARE))) .addMethod( - getGetLunMethod(), + getListNfsSharesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< - com.google.cloud.baremetalsolution.v2.GetLunRequest, - com.google.cloud.baremetalsolution.v2.Lun>(this, METHODID_GET_LUN))) + com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest, + com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse>( + this, METHODID_LIST_NFS_SHARES))) .addMethod( - getListLunsMethod(), + getUpdateNfsShareMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< - com.google.cloud.baremetalsolution.v2.ListLunsRequest, - com.google.cloud.baremetalsolution.v2.ListLunsResponse>( - this, METHODID_LIST_LUNS))) + com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest, + com.google.longrunning.Operation>(this, METHODID_UPDATE_NFS_SHARE))) .build(); } } @@ -1566,15 +1504,14 @@ public void getInstance( * * *
-     * Perform an ungraceful, hard reset on a server. Equivalent to shutting the
-     * power off and then turning it back on.
+     * Update details of a single server.
      * 
*/ - public void resetInstance( - com.google.cloud.baremetalsolution.v2.ResetInstanceRequest request, + public void updateInstance( + com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getResetInstanceMethod(), getCallOptions()), + getChannel().newCall(getUpdateInstanceMethod(), getCallOptions()), request, responseObserver); } @@ -1583,15 +1520,15 @@ public void resetInstance( * * *
-     * List storage volumes in a given project and location.
+     * Perform an ungraceful, hard reset on a server. Equivalent to shutting the
+     * power off and then turning it back on.
      * 
*/ - public void listVolumes( - com.google.cloud.baremetalsolution.v2.ListVolumesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { + public void resetInstance( + com.google.cloud.baremetalsolution.v2.ResetInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListVolumesMethod(), getCallOptions()), + getChannel().newCall(getResetInstanceMethod(), getCallOptions()), request, responseObserver); } @@ -1600,29 +1537,30 @@ public void listVolumes( * * *
-     * Get details of a single storage volume.
+     * Starts a server that was shutdown.
      * 
*/ - public void getVolume( - com.google.cloud.baremetalsolution.v2.GetVolumeRequest request, - io.grpc.stub.StreamObserver - responseObserver) { + public void startInstance( + com.google.cloud.baremetalsolution.v2.StartInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetVolumeMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getStartInstanceMethod(), getCallOptions()), + request, + responseObserver); } /** * * *
-     * Update details of a single storage volume.
+     * Stop a running server.
      * 
*/ - public void updateVolume( - com.google.cloud.baremetalsolution.v2.UpdateVolumeRequest request, + public void stopInstance( + com.google.cloud.baremetalsolution.v2.StopInstanceRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateVolumeMethod(), getCallOptions()), + getChannel().newCall(getStopInstanceMethod(), getCallOptions()), request, responseObserver); } @@ -1631,65 +1569,60 @@ public void updateVolume( * * *
-     * List network in a given project and location.
+     * Detach LUN from Instance.
      * 
*/ - public void listNetworks( - com.google.cloud.baremetalsolution.v2.ListNetworksRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListNetworksMethod(), getCallOptions()), - request, - responseObserver); + public void detachLun( + com.google.cloud.baremetalsolution.v2.DetachLunRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDetachLunMethod(), getCallOptions()), request, responseObserver); } /** * * *
-     * Get details of a single network.
+     * List storage volumes in a given project and location.
      * 
*/ - public void getNetwork( - com.google.cloud.baremetalsolution.v2.GetNetworkRequest request, - io.grpc.stub.StreamObserver + public void listVolumes( + com.google.cloud.baremetalsolution.v2.ListVolumesRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetNetworkMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getListVolumesMethod(), getCallOptions()), + request, + responseObserver); } /** * * *
-     * List snapshot schedule policies in a given project and location.
+     * Get details of a single storage volume.
      * 
*/ - public void listSnapshotSchedulePolicies( - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest request, - io.grpc.stub.StreamObserver< - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse> + public void getVolume( + com.google.cloud.baremetalsolution.v2.GetVolumeRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListSnapshotSchedulePoliciesMethod(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getGetVolumeMethod(), getCallOptions()), request, responseObserver); } /** * * *
-     * Get details of a single snapshot schedule policy.
+     * Update details of a single storage volume.
      * 
*/ - public void getSnapshotSchedulePolicy( - com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest request, - io.grpc.stub.StreamObserver - responseObserver) { + public void updateVolume( + com.google.cloud.baremetalsolution.v2.UpdateVolumeRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetSnapshotSchedulePolicyMethod(), getCallOptions()), + getChannel().newCall(getUpdateVolumeMethod(), getCallOptions()), request, responseObserver); } @@ -1698,15 +1631,14 @@ public void getSnapshotSchedulePolicy( * * *
-     * Create a snapshot schedule policy in the specified project.
+     * Emergency Volume resize.
      * 
*/ - public void createSnapshotSchedulePolicy( - com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest request, - io.grpc.stub.StreamObserver - responseObserver) { + public void resizeVolume( + com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateSnapshotSchedulePolicyMethod(), getCallOptions()), + getChannel().newCall(getResizeVolumeMethod(), getCallOptions()), request, responseObserver); } @@ -1715,15 +1647,15 @@ public void createSnapshotSchedulePolicy( * * *
-     * Update a snapshot schedule policy in the specified project.
+     * List network in a given project and location.
      * 
*/ - public void updateSnapshotSchedulePolicy( - com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest request, - io.grpc.stub.StreamObserver + public void listNetworks( + com.google.cloud.baremetalsolution.v2.ListNetworksRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateSnapshotSchedulePolicyMethod(), getCallOptions()), + getChannel().newCall(getListNetworksMethod(), getCallOptions()), request, responseObserver); } @@ -1732,14 +1664,16 @@ public void updateSnapshotSchedulePolicy( * * *
-     * Delete a named snapshot schedule policy.
+     * List all Networks (and used IPs for each Network) in the vendor account
+     * associated with the specified project.
      * 
*/ - public void deleteSnapshotSchedulePolicy( - com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { + public void listNetworkUsage( + com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest request, + io.grpc.stub.StreamObserver + responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteSnapshotSchedulePolicyMethod(), getCallOptions()), + getChannel().newCall(getListNetworkUsageMethod(), getCallOptions()), request, responseObserver); } @@ -1748,31 +1682,29 @@ public void deleteSnapshotSchedulePolicy( * * *
-     * Create a storage volume snapshot in a containing volume.
+     * Get details of a single network.
      * 
*/ - public void createVolumeSnapshot( - com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest request, - io.grpc.stub.StreamObserver + public void getNetwork( + com.google.cloud.baremetalsolution.v2.GetNetworkRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateVolumeSnapshotMethod(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getGetNetworkMethod(), getCallOptions()), request, responseObserver); } /** * * *
-     * Restore a storage volume snapshot to its containing volume.
+     * Update details of a single network.
      * 
*/ - public void restoreVolumeSnapshot( - com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest request, + public void updateNetwork( + com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRestoreVolumeSnapshotMethod(), getCallOptions()), + getChannel().newCall(getUpdateNetworkMethod(), getCallOptions()), request, responseObserver); } @@ -1781,49 +1713,44 @@ public void restoreVolumeSnapshot( * * *
-     * Deletes a storage volume snapshot for a given volume.
+     * Get details of a single storage logical unit number(LUN).
      * 
*/ - public void deleteVolumeSnapshot( - com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest request, - io.grpc.stub.StreamObserver responseObserver) { + public void getLun( + com.google.cloud.baremetalsolution.v2.GetLunRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteVolumeSnapshotMethod(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getGetLunMethod(), getCallOptions()), request, responseObserver); } /** * * *
-     * Get details of a single storage volume snapshot.
+     * List storage volume luns for given storage volume.
      * 
*/ - public void getVolumeSnapshot( - com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest request, - io.grpc.stub.StreamObserver + public void listLuns( + com.google.cloud.baremetalsolution.v2.ListLunsRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetVolumeSnapshotMethod(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getListLunsMethod(), getCallOptions()), request, responseObserver); } /** * * *
-     * List storage volume snapshots for given storage volume.
+     * Get details of a single NFS share.
      * 
*/ - public void listVolumeSnapshots( - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest request, - io.grpc.stub.StreamObserver< - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse> + public void getNfsShare( + com.google.cloud.baremetalsolution.v2.GetNfsShareRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListVolumeSnapshotsMethod(), getCallOptions()), + getChannel().newCall(getGetNfsShareMethod(), getCallOptions()), request, responseObserver); } @@ -1832,29 +1759,33 @@ public void listVolumeSnapshots( * * *
-     * Get details of a single storage logical unit number(LUN).
+     * List NFS shares.
      * 
*/ - public void getLun( - com.google.cloud.baremetalsolution.v2.GetLunRequest request, - io.grpc.stub.StreamObserver responseObserver) { + public void listNfsShares( + com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetLunMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getListNfsSharesMethod(), getCallOptions()), + request, + responseObserver); } /** * * *
-     * List storage volume luns for given storage volume.
+     * Update details of a single NFS share.
      * 
*/ - public void listLuns( - com.google.cloud.baremetalsolution.v2.ListLunsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { + public void updateNfsShare( + com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListLunsMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getUpdateNfsShareMethod(), getCallOptions()), + request, + responseObserver); } } @@ -1914,238 +1845,236 @@ public com.google.cloud.baremetalsolution.v2.Instance getInstance( * * *
-     * Perform an ungraceful, hard reset on a server. Equivalent to shutting the
-     * power off and then turning it back on.
+     * Update details of a single server.
      * 
*/ - public com.google.longrunning.Operation resetInstance( - com.google.cloud.baremetalsolution.v2.ResetInstanceRequest request) { + public com.google.longrunning.Operation updateInstance( + com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getResetInstanceMethod(), getCallOptions(), request); + getChannel(), getUpdateInstanceMethod(), getCallOptions(), request); } /** * * *
-     * List storage volumes in a given project and location.
+     * Perform an ungraceful, hard reset on a server. Equivalent to shutting the
+     * power off and then turning it back on.
      * 
*/ - public com.google.cloud.baremetalsolution.v2.ListVolumesResponse listVolumes( - com.google.cloud.baremetalsolution.v2.ListVolumesRequest request) { + public com.google.longrunning.Operation resetInstance( + com.google.cloud.baremetalsolution.v2.ResetInstanceRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListVolumesMethod(), getCallOptions(), request); + getChannel(), getResetInstanceMethod(), getCallOptions(), request); } /** * * *
-     * Get details of a single storage volume.
+     * Starts a server that was shutdown.
      * 
*/ - public com.google.cloud.baremetalsolution.v2.Volume getVolume( - com.google.cloud.baremetalsolution.v2.GetVolumeRequest request) { + public com.google.longrunning.Operation startInstance( + com.google.cloud.baremetalsolution.v2.StartInstanceRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetVolumeMethod(), getCallOptions(), request); + getChannel(), getStartInstanceMethod(), getCallOptions(), request); } /** * * *
-     * Update details of a single storage volume.
+     * Stop a running server.
      * 
*/ - public com.google.longrunning.Operation updateVolume( - com.google.cloud.baremetalsolution.v2.UpdateVolumeRequest request) { + public com.google.longrunning.Operation stopInstance( + com.google.cloud.baremetalsolution.v2.StopInstanceRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateVolumeMethod(), getCallOptions(), request); + getChannel(), getStopInstanceMethod(), getCallOptions(), request); } /** * * *
-     * List network in a given project and location.
+     * Detach LUN from Instance.
      * 
*/ - public com.google.cloud.baremetalsolution.v2.ListNetworksResponse listNetworks( - com.google.cloud.baremetalsolution.v2.ListNetworksRequest request) { + public com.google.longrunning.Operation detachLun( + com.google.cloud.baremetalsolution.v2.DetachLunRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListNetworksMethod(), getCallOptions(), request); + getChannel(), getDetachLunMethod(), getCallOptions(), request); } /** * * *
-     * Get details of a single network.
+     * List storage volumes in a given project and location.
      * 
*/ - public com.google.cloud.baremetalsolution.v2.Network getNetwork( - com.google.cloud.baremetalsolution.v2.GetNetworkRequest request) { + public com.google.cloud.baremetalsolution.v2.ListVolumesResponse listVolumes( + com.google.cloud.baremetalsolution.v2.ListVolumesRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetNetworkMethod(), getCallOptions(), request); + getChannel(), getListVolumesMethod(), getCallOptions(), request); } /** * * *
-     * List snapshot schedule policies in a given project and location.
+     * Get details of a single storage volume.
      * 
*/ - public com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse - listSnapshotSchedulePolicies( - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest request) { + public com.google.cloud.baremetalsolution.v2.Volume getVolume( + com.google.cloud.baremetalsolution.v2.GetVolumeRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListSnapshotSchedulePoliciesMethod(), getCallOptions(), request); + getChannel(), getGetVolumeMethod(), getCallOptions(), request); } /** * * *
-     * Get details of a single snapshot schedule policy.
+     * Update details of a single storage volume.
      * 
*/ - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy getSnapshotSchedulePolicy( - com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest request) { + public com.google.longrunning.Operation updateVolume( + com.google.cloud.baremetalsolution.v2.UpdateVolumeRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetSnapshotSchedulePolicyMethod(), getCallOptions(), request); + getChannel(), getUpdateVolumeMethod(), getCallOptions(), request); } /** * * *
-     * Create a snapshot schedule policy in the specified project.
+     * Emergency Volume resize.
      * 
*/ - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy - createSnapshotSchedulePolicy( - com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest request) { + public com.google.longrunning.Operation resizeVolume( + com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateSnapshotSchedulePolicyMethod(), getCallOptions(), request); + getChannel(), getResizeVolumeMethod(), getCallOptions(), request); } /** * * *
-     * Update a snapshot schedule policy in the specified project.
+     * List network in a given project and location.
      * 
*/ - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy - updateSnapshotSchedulePolicy( - com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest request) { + public com.google.cloud.baremetalsolution.v2.ListNetworksResponse listNetworks( + com.google.cloud.baremetalsolution.v2.ListNetworksRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateSnapshotSchedulePolicyMethod(), getCallOptions(), request); + getChannel(), getListNetworksMethod(), getCallOptions(), request); } /** * * *
-     * Delete a named snapshot schedule policy.
+     * List all Networks (and used IPs for each Network) in the vendor account
+     * associated with the specified project.
      * 
*/ - public com.google.protobuf.Empty deleteSnapshotSchedulePolicy( - com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest request) { + public com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse listNetworkUsage( + com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteSnapshotSchedulePolicyMethod(), getCallOptions(), request); + getChannel(), getListNetworkUsageMethod(), getCallOptions(), request); } /** * * *
-     * Create a storage volume snapshot in a containing volume.
+     * Get details of a single network.
      * 
*/ - public com.google.cloud.baremetalsolution.v2.VolumeSnapshot createVolumeSnapshot( - com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest request) { + public com.google.cloud.baremetalsolution.v2.Network getNetwork( + com.google.cloud.baremetalsolution.v2.GetNetworkRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateVolumeSnapshotMethod(), getCallOptions(), request); + getChannel(), getGetNetworkMethod(), getCallOptions(), request); } /** * * *
-     * Restore a storage volume snapshot to its containing volume.
+     * Update details of a single network.
      * 
*/ - public com.google.longrunning.Operation restoreVolumeSnapshot( - com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest request) { + public com.google.longrunning.Operation updateNetwork( + com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRestoreVolumeSnapshotMethod(), getCallOptions(), request); + getChannel(), getUpdateNetworkMethod(), getCallOptions(), request); } /** * * *
-     * Deletes a storage volume snapshot for a given volume.
+     * Get details of a single storage logical unit number(LUN).
      * 
*/ - public com.google.protobuf.Empty deleteVolumeSnapshot( - com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest request) { + public com.google.cloud.baremetalsolution.v2.Lun getLun( + com.google.cloud.baremetalsolution.v2.GetLunRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteVolumeSnapshotMethod(), getCallOptions(), request); + getChannel(), getGetLunMethod(), getCallOptions(), request); } /** * * *
-     * Get details of a single storage volume snapshot.
+     * List storage volume luns for given storage volume.
      * 
*/ - public com.google.cloud.baremetalsolution.v2.VolumeSnapshot getVolumeSnapshot( - com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest request) { + public com.google.cloud.baremetalsolution.v2.ListLunsResponse listLuns( + com.google.cloud.baremetalsolution.v2.ListLunsRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetVolumeSnapshotMethod(), getCallOptions(), request); + getChannel(), getListLunsMethod(), getCallOptions(), request); } /** * * *
-     * List storage volume snapshots for given storage volume.
+     * Get details of a single NFS share.
      * 
*/ - public com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse listVolumeSnapshots( - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest request) { + public com.google.cloud.baremetalsolution.v2.NfsShare getNfsShare( + com.google.cloud.baremetalsolution.v2.GetNfsShareRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListVolumeSnapshotsMethod(), getCallOptions(), request); + getChannel(), getGetNfsShareMethod(), getCallOptions(), request); } /** * * *
-     * Get details of a single storage logical unit number(LUN).
+     * List NFS shares.
      * 
*/ - public com.google.cloud.baremetalsolution.v2.Lun getLun( - com.google.cloud.baremetalsolution.v2.GetLunRequest request) { + public com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse listNfsShares( + com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetLunMethod(), getCallOptions(), request); + getChannel(), getListNfsSharesMethod(), getCallOptions(), request); } /** * * *
-     * List storage volume luns for given storage volume.
+     * Update details of a single NFS share.
      * 
*/ - public com.google.cloud.baremetalsolution.v2.ListLunsResponse listLuns( - com.google.cloud.baremetalsolution.v2.ListLunsRequest request) { + public com.google.longrunning.Operation updateNfsShare( + com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListLunsMethod(), getCallOptions(), request); + getChannel(), getUpdateNfsShareMethod(), getCallOptions(), request); } } @@ -2206,280 +2135,268 @@ protected BareMetalSolutionFutureStub build( * * *
-     * Perform an ungraceful, hard reset on a server. Equivalent to shutting the
-     * power off and then turning it back on.
+     * Update details of a single server.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture - resetInstance(com.google.cloud.baremetalsolution.v2.ResetInstanceRequest request) { + updateInstance(com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getResetInstanceMethod(), getCallOptions()), request); + getChannel().newCall(getUpdateInstanceMethod(), getCallOptions()), request); } /** * * *
-     * List storage volumes in a given project and location.
+     * Perform an ungraceful, hard reset on a server. Equivalent to shutting the
+     * power off and then turning it back on.
      * 
*/ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.baremetalsolution.v2.ListVolumesResponse> - listVolumes(com.google.cloud.baremetalsolution.v2.ListVolumesRequest request) { + public com.google.common.util.concurrent.ListenableFuture + resetInstance(com.google.cloud.baremetalsolution.v2.ResetInstanceRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListVolumesMethod(), getCallOptions()), request); + getChannel().newCall(getResetInstanceMethod(), getCallOptions()), request); } /** * * *
-     * Get details of a single storage volume.
+     * Starts a server that was shutdown.
      * 
*/ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.baremetalsolution.v2.Volume> - getVolume(com.google.cloud.baremetalsolution.v2.GetVolumeRequest request) { + public com.google.common.util.concurrent.ListenableFuture + startInstance(com.google.cloud.baremetalsolution.v2.StartInstanceRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetVolumeMethod(), getCallOptions()), request); + getChannel().newCall(getStartInstanceMethod(), getCallOptions()), request); } /** * * *
-     * Update details of a single storage volume.
+     * Stop a running server.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture - updateVolume(com.google.cloud.baremetalsolution.v2.UpdateVolumeRequest request) { + stopInstance(com.google.cloud.baremetalsolution.v2.StopInstanceRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateVolumeMethod(), getCallOptions()), request); + getChannel().newCall(getStopInstanceMethod(), getCallOptions()), request); } /** * * *
-     * List network in a given project and location.
+     * Detach LUN from Instance.
      * 
*/ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.baremetalsolution.v2.ListNetworksResponse> - listNetworks(com.google.cloud.baremetalsolution.v2.ListNetworksRequest request) { + public com.google.common.util.concurrent.ListenableFuture + detachLun(com.google.cloud.baremetalsolution.v2.DetachLunRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListNetworksMethod(), getCallOptions()), request); + getChannel().newCall(getDetachLunMethod(), getCallOptions()), request); } /** * * *
-     * Get details of a single network.
+     * List storage volumes in a given project and location.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.baremetalsolution.v2.Network> - getNetwork(com.google.cloud.baremetalsolution.v2.GetNetworkRequest request) { + com.google.cloud.baremetalsolution.v2.ListVolumesResponse> + listVolumes(com.google.cloud.baremetalsolution.v2.ListVolumesRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetNetworkMethod(), getCallOptions()), request); + getChannel().newCall(getListVolumesMethod(), getCallOptions()), request); } /** * * *
-     * List snapshot schedule policies in a given project and location.
+     * Get details of a single storage volume.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse> - listSnapshotSchedulePolicies( - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest request) { + com.google.cloud.baremetalsolution.v2.Volume> + getVolume(com.google.cloud.baremetalsolution.v2.GetVolumeRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListSnapshotSchedulePoliciesMethod(), getCallOptions()), request); + getChannel().newCall(getGetVolumeMethod(), getCallOptions()), request); } /** * * *
-     * Get details of a single snapshot schedule policy.
+     * Update details of a single storage volume.
      * 
*/ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy> - getSnapshotSchedulePolicy( - com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest request) { + public com.google.common.util.concurrent.ListenableFuture + updateVolume(com.google.cloud.baremetalsolution.v2.UpdateVolumeRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetSnapshotSchedulePolicyMethod(), getCallOptions()), request); + getChannel().newCall(getUpdateVolumeMethod(), getCallOptions()), request); } /** * * *
-     * Create a snapshot schedule policy in the specified project.
+     * Emergency Volume resize.
      * 
*/ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy> - createSnapshotSchedulePolicy( - com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest request) { + public com.google.common.util.concurrent.ListenableFuture + resizeVolume(com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateSnapshotSchedulePolicyMethod(), getCallOptions()), request); + getChannel().newCall(getResizeVolumeMethod(), getCallOptions()), request); } /** * * *
-     * Update a snapshot schedule policy in the specified project.
+     * List network in a given project and location.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy> - updateSnapshotSchedulePolicy( - com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest request) { + com.google.cloud.baremetalsolution.v2.ListNetworksResponse> + listNetworks(com.google.cloud.baremetalsolution.v2.ListNetworksRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateSnapshotSchedulePolicyMethod(), getCallOptions()), request); + getChannel().newCall(getListNetworksMethod(), getCallOptions()), request); } /** * * *
-     * Delete a named snapshot schedule policy.
+     * List all Networks (and used IPs for each Network) in the vendor account
+     * associated with the specified project.
      * 
*/ - public com.google.common.util.concurrent.ListenableFuture - deleteSnapshotSchedulePolicy( - com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest request) { + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse> + listNetworkUsage(com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteSnapshotSchedulePolicyMethod(), getCallOptions()), request); + getChannel().newCall(getListNetworkUsageMethod(), getCallOptions()), request); } /** * * *
-     * Create a storage volume snapshot in a containing volume.
+     * Get details of a single network.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.baremetalsolution.v2.VolumeSnapshot> - createVolumeSnapshot( - com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest request) { + com.google.cloud.baremetalsolution.v2.Network> + getNetwork(com.google.cloud.baremetalsolution.v2.GetNetworkRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateVolumeSnapshotMethod(), getCallOptions()), request); + getChannel().newCall(getGetNetworkMethod(), getCallOptions()), request); } /** * * *
-     * Restore a storage volume snapshot to its containing volume.
+     * Update details of a single network.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture - restoreVolumeSnapshot( - com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest request) { + updateNetwork(com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRestoreVolumeSnapshotMethod(), getCallOptions()), request); + getChannel().newCall(getUpdateNetworkMethod(), getCallOptions()), request); } /** * * *
-     * Deletes a storage volume snapshot for a given volume.
+     * Get details of a single storage logical unit number(LUN).
      * 
*/ - public com.google.common.util.concurrent.ListenableFuture - deleteVolumeSnapshot( - com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest request) { + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.baremetalsolution.v2.Lun> + getLun(com.google.cloud.baremetalsolution.v2.GetLunRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteVolumeSnapshotMethod(), getCallOptions()), request); + getChannel().newCall(getGetLunMethod(), getCallOptions()), request); } /** * * *
-     * Get details of a single storage volume snapshot.
+     * List storage volume luns for given storage volume.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.baremetalsolution.v2.VolumeSnapshot> - getVolumeSnapshot(com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest request) { + com.google.cloud.baremetalsolution.v2.ListLunsResponse> + listLuns(com.google.cloud.baremetalsolution.v2.ListLunsRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetVolumeSnapshotMethod(), getCallOptions()), request); + getChannel().newCall(getListLunsMethod(), getCallOptions()), request); } /** * * *
-     * List storage volume snapshots for given storage volume.
+     * Get details of a single NFS share.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse> - listVolumeSnapshots( - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest request) { + com.google.cloud.baremetalsolution.v2.NfsShare> + getNfsShare(com.google.cloud.baremetalsolution.v2.GetNfsShareRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListVolumeSnapshotsMethod(), getCallOptions()), request); + getChannel().newCall(getGetNfsShareMethod(), getCallOptions()), request); } /** * * *
-     * Get details of a single storage logical unit number(LUN).
+     * List NFS shares.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.baremetalsolution.v2.Lun> - getLun(com.google.cloud.baremetalsolution.v2.GetLunRequest request) { + com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse> + listNfsShares(com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetLunMethod(), getCallOptions()), request); + getChannel().newCall(getListNfsSharesMethod(), getCallOptions()), request); } /** * * *
-     * List storage volume luns for given storage volume.
+     * Update details of a single NFS share.
      * 
*/ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.baremetalsolution.v2.ListLunsResponse> - listLuns(com.google.cloud.baremetalsolution.v2.ListLunsRequest request) { + public com.google.common.util.concurrent.ListenableFuture + updateNfsShare(com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListLunsMethod(), getCallOptions()), request); + getChannel().newCall(getUpdateNfsShareMethod(), getCallOptions()), request); } } private static final int METHODID_LIST_INSTANCES = 0; private static final int METHODID_GET_INSTANCE = 1; - private static final int METHODID_RESET_INSTANCE = 2; - private static final int METHODID_LIST_VOLUMES = 3; - private static final int METHODID_GET_VOLUME = 4; - private static final int METHODID_UPDATE_VOLUME = 5; - private static final int METHODID_LIST_NETWORKS = 6; - private static final int METHODID_GET_NETWORK = 7; - private static final int METHODID_LIST_SNAPSHOT_SCHEDULE_POLICIES = 8; - private static final int METHODID_GET_SNAPSHOT_SCHEDULE_POLICY = 9; - private static final int METHODID_CREATE_SNAPSHOT_SCHEDULE_POLICY = 10; - private static final int METHODID_UPDATE_SNAPSHOT_SCHEDULE_POLICY = 11; - private static final int METHODID_DELETE_SNAPSHOT_SCHEDULE_POLICY = 12; - private static final int METHODID_CREATE_VOLUME_SNAPSHOT = 13; - private static final int METHODID_RESTORE_VOLUME_SNAPSHOT = 14; - private static final int METHODID_DELETE_VOLUME_SNAPSHOT = 15; - private static final int METHODID_GET_VOLUME_SNAPSHOT = 16; - private static final int METHODID_LIST_VOLUME_SNAPSHOTS = 17; - private static final int METHODID_GET_LUN = 18; - private static final int METHODID_LIST_LUNS = 19; + private static final int METHODID_UPDATE_INSTANCE = 2; + private static final int METHODID_RESET_INSTANCE = 3; + private static final int METHODID_START_INSTANCE = 4; + private static final int METHODID_STOP_INSTANCE = 5; + private static final int METHODID_DETACH_LUN = 6; + private static final int METHODID_LIST_VOLUMES = 7; + private static final int METHODID_GET_VOLUME = 8; + private static final int METHODID_UPDATE_VOLUME = 9; + private static final int METHODID_RESIZE_VOLUME = 10; + private static final int METHODID_LIST_NETWORKS = 11; + private static final int METHODID_LIST_NETWORK_USAGE = 12; + private static final int METHODID_GET_NETWORK = 13; + private static final int METHODID_UPDATE_NETWORK = 14; + private static final int METHODID_GET_LUN = 15; + private static final int METHODID_LIST_LUNS = 16; + private static final int METHODID_GET_NFS_SHARE = 17; + private static final int METHODID_LIST_NFS_SHARES = 18; + private static final int METHODID_UPDATE_NFS_SHARE = 19; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -2511,11 +2428,31 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_UPDATE_INSTANCE: + serviceImpl.updateInstance( + (com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_RESET_INSTANCE: serviceImpl.resetInstance( (com.google.cloud.baremetalsolution.v2.ResetInstanceRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_START_INSTANCE: + serviceImpl.startInstance( + (com.google.cloud.baremetalsolution.v2.StartInstanceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_STOP_INSTANCE: + serviceImpl.stopInstance( + (com.google.cloud.baremetalsolution.v2.StopInstanceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DETACH_LUN: + serviceImpl.detachLun( + (com.google.cloud.baremetalsolution.v2.DetachLunRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_LIST_VOLUMES: serviceImpl.listVolumes( (com.google.cloud.baremetalsolution.v2.ListVolumesRequest) request, @@ -2534,6 +2471,11 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.baremetalsolution.v2.UpdateVolumeRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_RESIZE_VOLUME: + serviceImpl.resizeVolume( + (com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_LIST_NETWORKS: serviceImpl.listNetworks( (com.google.cloud.baremetalsolution.v2.ListNetworksRequest) request, @@ -2541,74 +2483,24 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv com.google.cloud.baremetalsolution.v2.ListNetworksResponse>) responseObserver); break; + case METHODID_LIST_NETWORK_USAGE: + serviceImpl.listNetworkUsage( + (com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse>) + responseObserver); + break; case METHODID_GET_NETWORK: serviceImpl.getNetwork( (com.google.cloud.baremetalsolution.v2.GetNetworkRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; - case METHODID_LIST_SNAPSHOT_SCHEDULE_POLICIES: - serviceImpl.listSnapshotSchedulePolicies( - (com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse>) - responseObserver); - break; - case METHODID_GET_SNAPSHOT_SCHEDULE_POLICY: - serviceImpl.getSnapshotSchedulePolicy( - (com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy>) - responseObserver); - break; - case METHODID_CREATE_SNAPSHOT_SCHEDULE_POLICY: - serviceImpl.createSnapshotSchedulePolicy( - (com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy>) - responseObserver); - break; - case METHODID_UPDATE_SNAPSHOT_SCHEDULE_POLICY: - serviceImpl.updateSnapshotSchedulePolicy( - (com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy>) - responseObserver); - break; - case METHODID_DELETE_SNAPSHOT_SCHEDULE_POLICY: - serviceImpl.deleteSnapshotSchedulePolicy( - (com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_VOLUME_SNAPSHOT: - serviceImpl.createVolumeSnapshot( - (com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_RESTORE_VOLUME_SNAPSHOT: - serviceImpl.restoreVolumeSnapshot( - (com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest) request, + case METHODID_UPDATE_NETWORK: + serviceImpl.updateNetwork( + (com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; - case METHODID_DELETE_VOLUME_SNAPSHOT: - serviceImpl.deleteVolumeSnapshot( - (com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_VOLUME_SNAPSHOT: - serviceImpl.getVolumeSnapshot( - (com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_LIST_VOLUME_SNAPSHOTS: - serviceImpl.listVolumeSnapshots( - (com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse>) - responseObserver); - break; case METHODID_GET_LUN: serviceImpl.getLun( (com.google.cloud.baremetalsolution.v2.GetLunRequest) request, @@ -2621,6 +2513,24 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_GET_NFS_SHARE: + serviceImpl.getNfsShare( + (com.google.cloud.baremetalsolution.v2.GetNfsShareRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_NFS_SHARES: + serviceImpl.listNfsShares( + (com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse>) + responseObserver); + break; + case METHODID_UPDATE_NFS_SHARE: + serviceImpl.updateNfsShare( + (com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; default: throw new AssertionError(); } @@ -2644,7 +2554,7 @@ private abstract static class BareMetalSolutionBaseDescriptorSupplier @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto.getDescriptor(); + return com.google.cloud.baremetalsolution.v2.BareMetalSolutionProto.getDescriptor(); } @java.lang.Override @@ -2687,24 +2597,24 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .setSchemaDescriptor(new BareMetalSolutionFileDescriptorSupplier()) .addMethod(getListInstancesMethod()) .addMethod(getGetInstanceMethod()) + .addMethod(getUpdateInstanceMethod()) .addMethod(getResetInstanceMethod()) + .addMethod(getStartInstanceMethod()) + .addMethod(getStopInstanceMethod()) + .addMethod(getDetachLunMethod()) .addMethod(getListVolumesMethod()) .addMethod(getGetVolumeMethod()) .addMethod(getUpdateVolumeMethod()) + .addMethod(getResizeVolumeMethod()) .addMethod(getListNetworksMethod()) + .addMethod(getListNetworkUsageMethod()) .addMethod(getGetNetworkMethod()) - .addMethod(getListSnapshotSchedulePoliciesMethod()) - .addMethod(getGetSnapshotSchedulePolicyMethod()) - .addMethod(getCreateSnapshotSchedulePolicyMethod()) - .addMethod(getUpdateSnapshotSchedulePolicyMethod()) - .addMethod(getDeleteSnapshotSchedulePolicyMethod()) - .addMethod(getCreateVolumeSnapshotMethod()) - .addMethod(getRestoreVolumeSnapshotMethod()) - .addMethod(getDeleteVolumeSnapshotMethod()) - .addMethod(getGetVolumeSnapshotMethod()) - .addMethod(getListVolumeSnapshotsMethod()) + .addMethod(getUpdateNetworkMethod()) .addMethod(getGetLunMethod()) .addMethod(getListLunsMethod()) + .addMethod(getGetNfsShareMethod()) + .addMethod(getListNfsSharesMethod()) + .addMethod(getUpdateNfsShareMethod()) .build(); } } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/BareMetalSolutionProto.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/BareMetalSolutionProto.java new file mode 100644 index 000000000000..679c48241ef3 --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/BareMetalSolutionProto.java @@ -0,0 +1,238 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto + +package com.google.cloud.baremetalsolution.v2; + +public final class BareMetalSolutionProto { + private BareMetalSolutionProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_OperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_ResetInstanceResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_ResetInstanceResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n9google/cloud/baremetalsolution/v2/bare" + + "metalsolution.proto\022!google.cloud.bareme" + + "talsolution.v2\032\034google/api/annotations.p" + + "roto\032\027google/api/client.proto\032\037google/ap" + + "i/field_behavior.proto\0320google/cloud/bar" + + "emetalsolution/v2/instance.proto\032+google" + + "/cloud/baremetalsolution/v2/lun.proto\032/g" + + "oogle/cloud/baremetalsolution/v2/network" + + ".proto\0321google/cloud/baremetalsolution/v" + + "2/nfs_share.proto\032.google/cloud/baremeta" + + "lsolution/v2/volume.proto\032#google/longru" + + "nning/operations.proto\032\037google/protobuf/" + + "timestamp.proto\"\200\002\n\021OperationMetadata\0224\n" + + "\013create_time\030\001 \001(\0132\032.google.protobuf.Tim" + + "estampB\003\340A\003\0221\n\010end_time\030\002 \001(\0132\032.google.p" + + "rotobuf.TimestampB\003\340A\003\022\023\n\006target\030\003 \001(\tB\003" + + "\340A\003\022\021\n\004verb\030\004 \001(\tB\003\340A\003\022\033\n\016status_message" + + "\030\005 \001(\tB\003\340A\003\022#\n\026requested_cancellation\030\006 " + + "\001(\010B\003\340A\003\022\030\n\013api_version\030\007 \001(\tB\003\340A\003\"\027\n\025Re" + + "setInstanceResponse2\335 \n\021BareMetalSolutio" + + "n\022\302\001\n\rListInstances\0227.google.cloud.barem" + + "etalsolution.v2.ListInstancesRequest\0328.g" + + "oogle.cloud.baremetalsolution.v2.ListIns" + + "tancesResponse\">\202\323\344\223\002/\022-/v2/{parent=proj" + + "ects/*/locations/*}/instances\332A\006parent\022\257" + + "\001\n\013GetInstance\0225.google.cloud.baremetals" + + "olution.v2.GetInstanceRequest\032+.google.c" + + "loud.baremetalsolution.v2.Instance\"<\202\323\344\223" + + "\002/\022-/v2/{name=projects/*/locations/*/ins" + + "tances/*}\332A\004name\022\352\001\n\016UpdateInstance\0228.go" + + "ogle.cloud.baremetalsolution.v2.UpdateIn" + + "stanceRequest\032\035.google.longrunning.Opera" + + "tion\"\177\202\323\344\223\002B26/v2/{instance.name=project" + + "s/*/locations/*/instances/*}:\010instance\332A" + + "\024instance,update_mask\312A\035\n\010Instance\022\021Oper" + + "ationMetadata\022\333\001\n\rResetInstance\0227.google" + + ".cloud.baremetalsolution.v2.ResetInstanc" + + "eRequest\032\035.google.longrunning.Operation\"" + + "r\202\323\344\223\0028\"3/v2/{name=projects/*/locations/" + + "*/instances/*}:reset:\001*\332A\004name\312A*\n\025Reset" + + "InstanceResponse\022\021OperationMetadata\022\333\001\n\r" + + "StartInstance\0227.google.cloud.baremetalso" + + "lution.v2.StartInstanceRequest\032\035.google." + + "longrunning.Operation\"r\202\323\344\223\0028\"3/v2/{name" + + "=projects/*/locations/*/instances/*}:sta" + + "rt:\001*\332A\004name\312A*\n\025StartInstanceResponse\022\021" + + "OperationMetadata\022\327\001\n\014StopInstance\0226.goo" + + "gle.cloud.baremetalsolution.v2.StopInsta" + + "nceRequest\032\035.google.longrunning.Operatio" + + "n\"p\202\323\344\223\0027\"2/v2/{name=projects/*/location" + + "s/*/instances/*}:stop:\001*\332A\004name\312A)\n\024Stop" + + "InstanceResponse\022\021OperationMetadata\022\326\001\n\t" + + "DetachLun\0223.google.cloud.baremetalsoluti" + + "on.v2.DetachLunRequest\032\035.google.longrunn" + + "ing.Operation\"u\202\323\344\223\002@\";/v2/{instance=pro" + + "jects/*/locations/*/instances/*}:detachL" + + "un:\001*\332A\014instance,lun\312A\035\n\010Instance\022\021Opera" + + "tionMetadata\022\272\001\n\013ListVolumes\0225.google.cl" + + "oud.baremetalsolution.v2.ListVolumesRequ" + + "est\0326.google.cloud.baremetalsolution.v2." + + "ListVolumesResponse\"<\202\323\344\223\002-\022+/v2/{parent" + + "=projects/*/locations/*}/volumes\332A\006paren" + + "t\022\247\001\n\tGetVolume\0223.google.cloud.baremetal" + + "solution.v2.GetVolumeRequest\032).google.cl" + + "oud.baremetalsolution.v2.Volume\":\202\323\344\223\002-\022" + + "+/v2/{name=projects/*/locations/*/volume" + + "s/*}\332A\004name\022\334\001\n\014UpdateVolume\0226.google.cl" + + "oud.baremetalsolution.v2.UpdateVolumeReq" + + "uest\032\035.google.longrunning.Operation\"u\202\323\344" + + "\223\002<22/v2/{volume.name=projects/*/locatio" + + "ns/*/volumes/*}:\006volume\332A\022volume,update_" + + "mask\312A\033\n\006Volume\022\021OperationMetadata\022\326\001\n\014R" + + "esizeVolume\0226.google.cloud.baremetalsolu" + + "tion.v2.ResizeVolumeRequest\032\035.google.lon" + + "grunning.Operation\"o\202\323\344\223\0029\"4/v2/{volume=" + + "projects/*/locations/*/volumes/*}:resize" + + ":\001*\332A\017volume,size_gib\312A\033\n\006Volume\022\021Operat" + + "ionMetadata\022\276\001\n\014ListNetworks\0226.google.cl" + + "oud.baremetalsolution.v2.ListNetworksReq" + + "uest\0327.google.cloud.baremetalsolution.v2" + + ".ListNetworksResponse\"=\202\323\344\223\002.\022,/v2/{pare" + + "nt=projects/*/locations/*}/networks\332A\006pa" + + "rent\022\337\001\n\020ListNetworkUsage\022:.google.cloud" + + ".baremetalsolution.v2.ListNetworkUsageRe" + + "quest\032;.google.cloud.baremetalsolution.v" + + "2.ListNetworkUsageResponse\"R\202\323\344\223\002A\022?/v2/" + + "{location=projects/*/locations/*}/networ" + + "ks:listNetworkUsage\332A\010location\022\253\001\n\nGetNe" + + "twork\0224.google.cloud.baremetalsolution.v" + + "2.GetNetworkRequest\032*.google.cloud.barem" + + "etalsolution.v2.Network\";\202\323\344\223\002.\022,/v2/{na" + + "me=projects/*/locations/*/networks/*}\332A\004" + + "name\022\343\001\n\rUpdateNetwork\0227.google.cloud.ba" + + "remetalsolution.v2.UpdateNetworkRequest\032" + + "\035.google.longrunning.Operation\"z\202\323\344\223\002?24" + + "/v2/{network.name=projects/*/locations/*" + + "/networks/*}:\007network\332A\023network,update_m" + + "ask\312A\034\n\007Network\022\021OperationMetadata\022\245\001\n\006G" + + "etLun\0220.google.cloud.baremetalsolution.v" + + "2.GetLunRequest\032&.google.cloud.baremetal" + + "solution.v2.Lun\"A\202\323\344\223\0024\0222/v2/{name=proje" + + "cts/*/locations/*/volumes/*/luns/*}\332A\004na" + + "me\022\270\001\n\010ListLuns\0222.google.cloud.baremetal" + + "solution.v2.ListLunsRequest\0323.google.clo" + + "ud.baremetalsolution.v2.ListLunsResponse" + + "\"C\202\323\344\223\0024\0222/v2/{parent=projects/*/locatio" + + "ns/*/volumes/*}/luns\332A\006parent\022\257\001\n\013GetNfs" + + "Share\0225.google.cloud.baremetalsolution.v" + + "2.GetNfsShareRequest\032+.google.cloud.bare" + + "metalsolution.v2.NfsShare\"<\202\323\344\223\002/\022-/v2/{" + + "name=projects/*/locations/*/nfsShares/*}" + + "\332A\004name\022\302\001\n\rListNfsShares\0227.google.cloud" + + ".baremetalsolution.v2.ListNfsSharesReque" + + "st\0328.google.cloud.baremetalsolution.v2.L" + + "istNfsSharesResponse\">\202\323\344\223\002/\022-/v2/{paren" + + "t=projects/*/locations/*}/nfsShares\332A\006pa" + + "rent\022\356\001\n\016UpdateNfsShare\0228.google.cloud.b" + + "aremetalsolution.v2.UpdateNfsShareReques" + + "t\032\035.google.longrunning.Operation\"\202\001\202\323\344\223\002" + + "D27/v2/{nfs_share.name=projects/*/locati" + + "ons/*/nfsShares/*}:\tnfs_share\332A\025nfs_shar" + + "e,update_mask\312A\035\n\010NfsShare\022\021OperationMet" + + "adata\032T\312A baremetalsolution.googleapis.c" + + "om\322A.https://www.googleapis.com/auth/clo" + + "ud-platformB\204\002\n%com.google.cloud.baremet" + + "alsolution.v2B\026BareMetalSolutionProtoP\001Z" + + "Rgoogle.golang.org/genproto/googleapis/c" + + "loud/baremetalsolution/v2;baremetalsolut" + + "ion\252\002!Google.Cloud.BareMetalSolution.V2\312" + + "\002!Google\\Cloud\\BareMetalSolution\\V2\352\002$Go" + + "ogle::Cloud::BareMetalSolution::V2b\006prot" + + "o3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.cloud.baremetalsolution.v2.InstanceProto.getDescriptor(), + com.google.cloud.baremetalsolution.v2.LunProto.getDescriptor(), + com.google.cloud.baremetalsolution.v2.NetworkProto.getDescriptor(), + com.google.cloud.baremetalsolution.v2.NfsShareProto.getDescriptor(), + com.google.cloud.baremetalsolution.v2.VolumeProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_baremetalsolution_v2_OperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_baremetalsolution_v2_OperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_OperationMetadata_descriptor, + new java.lang.String[] { + "CreateTime", + "EndTime", + "Target", + "Verb", + "StatusMessage", + "RequestedCancellation", + "ApiVersion", + }); + internal_static_google_cloud_baremetalsolution_v2_ResetInstanceResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_baremetalsolution_v2_ResetInstanceResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_ResetInstanceResponse_descriptor, + new java.lang.String[] {}); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.cloud.baremetalsolution.v2.InstanceProto.getDescriptor(); + com.google.cloud.baremetalsolution.v2.LunProto.getDescriptor(); + com.google.cloud.baremetalsolution.v2.NetworkProto.getDescriptor(); + com.google.cloud.baremetalsolution.v2.NfsShareProto.getDescriptor(); + com.google.cloud.baremetalsolution.v2.VolumeProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/BaremetalsolutionProto.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/BaremetalsolutionProto.java deleted file mode 100644 index 0b7647224f85..000000000000 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/BaremetalsolutionProto.java +++ /dev/null @@ -1,921 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto - -package com.google.cloud.baremetalsolution.v2; - -public final class BaremetalsolutionProto { - private BaremetalsolutionProto() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_Volume_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_Volume_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_Volume_SnapshotReservationDetail_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_Volume_SnapshotReservationDetail_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_ListVolumesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_ListVolumesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_ListVolumesResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_ListVolumesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_GetVolumeRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_GetVolumeRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_Lun_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_Lun_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_Network_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_Network_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_VRF_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_VRF_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_VRF_QosPolicy_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_VRF_QosPolicy_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_VRF_VlanAttachment_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_VRF_VlanAttachment_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_ListNetworksRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_ListNetworksRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_ListNetworksResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_ListNetworksResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_GetNetworkRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_GetNetworkRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_GetSnapshotSchedulePolicyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_GetSnapshotSchedulePolicyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_Instance_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_Instance_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_Instance_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_Instance_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_ListInstancesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_ListInstancesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_ListInstancesResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_ListInstancesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_GetInstanceRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_GetInstanceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_ResetInstanceRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_ResetInstanceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_ResetInstanceResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_ResetInstanceResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_GetVolumeSnapshotRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_GetVolumeSnapshotRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_ListVolumeSnapshotsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_ListVolumeSnapshotsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_ListVolumeSnapshotsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_ListVolumeSnapshotsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_DeleteVolumeSnapshotRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_DeleteVolumeSnapshotRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_OperationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_OperationMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_VolumeSnapshot_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_VolumeSnapshot_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_SnapshotSchedulePolicy_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_SnapshotSchedulePolicy_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_SnapshotSchedulePolicy_Schedule_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_SnapshotSchedulePolicy_Schedule_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_ListSnapshotSchedulePoliciesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_ListSnapshotSchedulePoliciesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_ListSnapshotSchedulePoliciesResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_ListSnapshotSchedulePoliciesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_CreateSnapshotSchedulePolicyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_CreateSnapshotSchedulePolicyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_UpdateSnapshotSchedulePolicyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_UpdateSnapshotSchedulePolicyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_DeleteSnapshotSchedulePolicyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_DeleteSnapshotSchedulePolicyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_UpdateVolumeRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_UpdateVolumeRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_GetLunRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_GetLunRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_ListLunsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_ListLunsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_ListLunsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_ListLunsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_CreateVolumeSnapshotRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_CreateVolumeSnapshotRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_baremetalsolution_v2_RestoreVolumeSnapshotRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_baremetalsolution_v2_RestoreVolumeSnapshotRequest_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n9google/cloud/baremetalsolution/v2/bare" - + "metalsolution.proto\022!google.cloud.bareme" - + "talsolution.v2\032\034google/api/annotations.p" - + "roto\032\027google/api/client.proto\032\037google/ap" - + "i/field_behavior.proto\032\031google/api/resou" - + "rce.proto\032#google/longrunning/operations" - + ".proto\032\033google/protobuf/empty.proto\032 goo" - + "gle/protobuf/field_mask.proto\032\037google/pr" - + "otobuf/timestamp.proto\"\301\010\n\006Volume\022\021\n\004nam" - + "e\030\001 \001(\tB\003\340A\003\022K\n\014storage_type\030\002 \001(\01625.goo" - + "gle.cloud.baremetalsolution.v2.Volume.St" - + "orageType\022>\n\005state\030\003 \001(\0162/.google.cloud." - + "baremetalsolution.v2.Volume.State\022\032\n\022req" - + "uested_size_gib\030\004 \001(\003\022\030\n\020current_size_gi" - + "b\030\005 \001(\003\022\033\n\023auto_grown_size_gib\030\006 \001(\003\022\033\n\023" - + "remaining_space_gib\030\007 \001(\003\022h\n\033snapshot_re" - + "servation_detail\030\010 \001(\0132C.google.cloud.ba" - + "remetalsolution.v2.Volume.SnapshotReserv" - + "ationDetail\022k\n\035snapshot_auto_delete_beha" - + "vior\030\t \001(\0162D.google.cloud.baremetalsolut" - + "ion.v2.Volume.SnapshotAutoDeleteBehavior" - + "\022^\n\030snapshot_schedule_policy\030\n \001(\tB<\372A9\n" - + "7baremetalsolution.googleapis.com/Snapsh" - + "otSchedulePolicy\032\202\001\n\031SnapshotReservation" - + "Detail\022\032\n\022reserved_space_gib\030\001 \001(\003\022#\n\033re" - + "served_space_used_percent\030\002 \001(\005\022$\n\034reser" - + "ved_space_remaining_gib\030\003 \001(\003\"=\n\013Storage" - + "Type\022\034\n\030STORAGE_TYPE_UNSPECIFIED\020\000\022\007\n\003SS" - + "D\020\001\022\007\n\003HDD\020\002\"E\n\005State\022\025\n\021STATE_UNSPECIFI" - + "ED\020\000\022\014\n\010CREATING\020\001\022\t\n\005READY\020\002\022\014\n\010DELETIN" - + "G\020\003\"}\n\032SnapshotAutoDeleteBehavior\022-\n)SNA" - + "PSHOT_AUTO_DELETE_BEHAVIOR_UNSPECIFIED\020\000" - + "\022\014\n\010DISABLED\020\001\022\020\n\014OLDEST_FIRST\020\002\022\020\n\014NEWE" - + "ST_FIRST\020\003:f\352Ac\n\'baremetalsolution.googl" - + "eapis.com/Volume\0228projects/{project}/loc" - + "ations/{location}/volumes/{volume}\"v\n\022Li" - + "stVolumesRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#" - + "\n!locations.googleapis.com/Location\022\021\n\tp" - + "age_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\177\n\023Li" - + "stVolumesResponse\022:\n\007volumes\030\001 \003(\0132).goo" - + "gle.cloud.baremetalsolution.v2.Volume\022\027\n" - + "\017next_page_token\030\002 \001(\t\022\023\n\013unreachable\030\003 " - + "\003(\t\"Q\n\020GetVolumeRequest\022=\n\004name\030\001 \001(\tB/\340" - + "A\002\372A)\n\'baremetalsolution.googleapis.com/" - + "Volume\"\307\005\n\003Lun\022\021\n\004name\030\001 \001(\tB\003\340A\003\022;\n\005sta" - + "te\030\002 \001(\0162,.google.cloud.baremetalsolutio" - + "n.v2.Lun.State\022\017\n\007size_gb\030\003 \001(\003\022T\n\022multi" - + "protocol_type\030\004 \001(\01628.google.cloud.barem" - + "etalsolution.v2.Lun.MultiprotocolType\022D\n" - + "\016storage_volume\030\005 \001(\tB,\372A)\n\'baremetalsol" - + "ution.googleapis.com/Volume\022\021\n\tshareable" - + "\030\006 \001(\010\022\020\n\010boot_lun\030\007 \001(\010\022H\n\014storage_type" - + "\030\010 \001(\01622.google.cloud.baremetalsolution." - + "v2.Lun.StorageType\022\014\n\004wwid\030\t \001(\t\"S\n\005Stat" - + "e\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\014" - + "\n\010UPDATING\020\002\022\t\n\005READY\020\003\022\014\n\010DELETING\020\004\"B\n" - + "\021MultiprotocolType\022\"\n\036MULTIPROTOCOL_TYPE" - + "_UNSPECIFIED\020\000\022\t\n\005LINUX\020\001\"=\n\013StorageType" - + "\022\034\n\030STORAGE_TYPE_UNSPECIFIED\020\000\022\007\n\003SSD\020\001\022" - + "\007\n\003HDD\020\002:n\352Ak\n$baremetalsolution.googlea" - + "pis.com/Lun\022Cprojects/{project}/location" - + "s/{location}/volumes/{volume}/luns/{lun}" - + "\"\217\004\n\007Network\022\021\n\004name\030\005 \001(\tB\003\340A\003\022\017\n\007netwo" - + "rk\030\001 \001(\t\022=\n\004type\030\002 \001(\0162/.google.cloud.ba" - + "remetalsolution.v2.Network.Type\022\022\n\nip_ad" - + "dress\030\003 \001(\t\022\023\n\013mac_address\030\004 \003(\t\022?\n\005stat" - + "e\030\006 \001(\01620.google.cloud.baremetalsolution" - + ".v2.Network.State\022\017\n\007vlan_id\030\007 \001(\t\022\014\n\004ci" - + "dr\030\010 \001(\t\0223\n\003vrf\030\t \001(\0132&.google.cloud.bar" - + "emetalsolution.v2.VRF\"5\n\004Type\022\024\n\020TYPE_UN" - + "SPECIFIED\020\000\022\n\n\006CLIENT\020\001\022\013\n\007PRIVATE\020\002\"A\n\005" - + "State\022\025\n\021STATE_UNSPECIFIED\020\000\022\020\n\014PROVISIO" - + "NING\020\001\022\017\n\013PROVISIONED\020\002:i\352Af\n(baremetals" - + "olution.googleapis.com/Network\022:projects" - + "/{project}/locations/{location}/networks" - + "/{network}\"\233\003\n\003VRF\022\014\n\004name\030\001 \001(\t\022;\n\005stat" - + "e\030\005 \001(\0162,.google.cloud.baremetalsolution" - + ".v2.VRF.State\022D\n\nqos_policy\030\006 \001(\01320.goog" - + "le.cloud.baremetalsolution.v2.VRF.QosPol" - + "icy\022O\n\020vlan_attachments\030\007 \003(\01325.google.c" - + "loud.baremetalsolution.v2.VRF.VlanAttach" - + "ment\032#\n\tQosPolicy\022\026\n\016bandwidth_gbps\030\001 \001(" - + "\001\032J\n\016VlanAttachment\022\024\n\014peer_vlan_id\030\001 \001(" - + "\003\022\017\n\007peer_ip\030\002 \001(\t\022\021\n\trouter_ip\030\003 \001(\t\"A\n" - + "\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\020\n\014PROVISI" - + "ONING\020\001\022\017\n\013PROVISIONED\020\002\"w\n\023ListNetworks" - + "Request\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locatio" - + "ns.googleapis.com/Location\022\021\n\tpage_size\030" - + "\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\202\001\n\024ListNetwor" - + "ksResponse\022<\n\010networks\030\001 \003(\0132*.google.cl" - + "oud.baremetalsolution.v2.Network\022\027\n\017next" - + "_page_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"S" - + "\n\021GetNetworkRequest\022>\n\004name\030\001 \001(\tB0\340A\002\372A" - + "*\n(baremetalsolution.googleapis.com/Netw" - + "ork\"q\n GetSnapshotSchedulePolicyRequest\022" - + "M\n\004name\030\001 \001(\tB?\340A\002\372A9\n7baremetalsolution" - + ".googleapis.com/SnapshotSchedulePolicy\"\323" - + "\005\n\010Instance\022\021\n\004name\030\001 \001(\tB\003\340A\003\0224\n\013create" - + "_time\030\002 \001(\0132\032.google.protobuf.TimestampB" - + "\003\340A\003\0224\n\013update_time\030\003 \001(\0132\032.google.proto" - + "buf.TimestampB\003\340A\003\022\024\n\014machine_type\030\004 \001(\t" - + "\022@\n\005state\030\005 \001(\01621.google.cloud.baremetal" - + "solution.v2.Instance.State\022\036\n\026hyperthrea" - + "ding_enabled\030\006 \001(\010\022G\n\006labels\030\007 \003(\01327.goo" - + "gle.cloud.baremetalsolution.v2.Instance." - + "LabelsEntry\0224\n\004luns\030\010 \003(\0132&.google.cloud" - + ".baremetalsolution.v2.Lun\022<\n\010networks\030\t " - + "\003(\0132*.google.cloud.baremetalsolution.v2." - + "Network\022*\n\"interactive_serial_console_en" - + "abled\030\n \001(\010\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022" - + "\r\n\005value\030\002 \001(\t:\0028\001\"J\n\005State\022\025\n\021STATE_UNS" - + "PECIFIED\020\000\022\020\n\014PROVISIONING\020\001\022\013\n\007RUNNING\020" - + "\002\022\013\n\007DELETED\020\003:l\352Ai\n)baremetalsolution.g" - + "oogleapis.com/Instance\022\n\tinst" - + "ances\030\001 \003(\0132+.google.cloud.baremetalsolu" - + "tion.v2.Instance\022\027\n\017next_page_token\030\002 \001(" - + "\t\022\023\n\013unreachable\030\003 \003(\t\"U\n\022GetInstanceReq" - + "uest\022?\n\004name\030\001 \001(\tB1\340A\002\372A+\n)baremetalsol" - + "ution.googleapis.com/Instance\"W\n\024ResetIn" - + "stanceRequest\022?\n\004name\030\001 \001(\tB1\340A\002\372A+\n)bar" - + "emetalsolution.googleapis.com/Instance\"\027" - + "\n\025ResetInstanceResponse\"a\n\030GetVolumeSnap" - + "shotRequest\022E\n\004name\030\001 \001(\tB7\340A\002\372A1\n/barem" - + "etalsolution.googleapis.com/VolumeSnapsh" - + "ot\"\204\001\n\032ListVolumeSnapshotsRequest\022?\n\006par" - + "ent\030\001 \001(\tB/\340A\002\372A)\n\'baremetalsolution.goo" - + "gleapis.com/Volume\022\021\n\tpage_size\030\002 \001(\005\022\022\n" - + "\npage_token\030\003 \001(\t\"\230\001\n\033ListVolumeSnapshot" - + "sResponse\022K\n\020volume_snapshots\030\001 \003(\01321.go" - + "ogle.cloud.baremetalsolution.v2.VolumeSn" - + "apshot\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unrea" - + "chable\030\003 \003(\t\"d\n\033DeleteVolumeSnapshotRequ" - + "est\022E\n\004name\030\001 \001(\tB7\340A\002\372A1\n/baremetalsolu" - + "tion.googleapis.com/VolumeSnapshot\"\200\002\n\021O" - + "perationMetadata\0224\n\013create_time\030\001 \001(\0132\032." - + "google.protobuf.TimestampB\003\340A\003\0221\n\010end_ti" - + "me\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A" - + "\003\022\023\n\006target\030\003 \001(\tB\003\340A\003\022\021\n\004verb\030\004 \001(\tB\003\340A" - + "\003\022\033\n\016status_message\030\005 \001(\tB\003\340A\003\022#\n\026reques" - + "ted_cancellation\030\006 \001(\010B\003\340A\003\022\030\n\013api_versi" - + "on\030\007 \001(\tB\003\340A\003\"\317\002\n\016VolumeSnapshot\022\021\n\004name" - + "\030\001 \001(\tB\003\340A\003\022\023\n\013description\030\002 \001(\t\022\022\n\nsize" - + "_bytes\030\003 \001(\003\0224\n\013create_time\030\004 \001(\0132\032.goog" - + "le.protobuf.TimestampB\003\340A\001\022D\n\016storage_vo" - + "lume\030\005 \001(\tB,\372A)\n\'baremetalsolution.googl" - + "eapis.com/Volume:\204\001\352A\200\001\n/baremetalsoluti" - + "on.googleapis.com/VolumeSnapshot\022Mprojec" - + "ts/{project}/locations/{location}/volume" - + "s/{volume}/snapshots/{snapshot}\"\377\002\n\026Snap" - + "shotSchedulePolicy\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\023\n" - + "\013description\030\002 \001(\t\022U\n\tschedules\030\003 \003(\0132B." - + "google.cloud.baremetalsolution.v2.Snapsh" - + "otSchedulePolicy.Schedule\032I\n\010Schedule\022\024\n" - + "\014crontab_spec\030\001 \001(\t\022\027\n\017retention_count\030\002" - + " \001(\005\022\016\n\006prefix\030\003 \001(\t:\232\001\352A\226\001\n7baremetalso" - + "lution.googleapis.com/SnapshotSchedulePo" - + "licy\022[projects/{project}/locations/{loca" - + "tion}/snapshotSchedulePolicies/{snapshot" - + "_schedule_policy}\"\207\001\n#ListSnapshotSchedu" - + "lePoliciesRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A" - + "#\n!locations.googleapis.com/Location\022\021\n\t" - + "page_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\236\001\n$" - + "ListSnapshotSchedulePoliciesResponse\022]\n\032" - + "snapshot_schedule_policies\030\001 \003(\01329.googl" - + "e.cloud.baremetalsolution.v2.SnapshotSch" - + "edulePolicy\022\027\n\017next_page_token\030\002 \001(\t\"\354\001\n" - + "#CreateSnapshotSchedulePolicyRequest\0229\n\006" - + "parent\030\001 \001(\tB)\340A\002\372A#\n!locations.googleap" - + "is.com/Location\022`\n\030snapshot_schedule_pol" - + "icy\030\002 \001(\01329.google.cloud.baremetalsoluti" - + "on.v2.SnapshotSchedulePolicyB\003\340A\002\022(\n\033sna" - + "pshot_schedule_policy_id\030\003 \001(\tB\003\340A\002\"\275\001\n#" - + "UpdateSnapshotSchedulePolicyRequest\022`\n\030s" - + "napshot_schedule_policy\030\001 \001(\01329.google.c" - + "loud.baremetalsolution.v2.SnapshotSchedu" - + "lePolicyB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.goo" - + "gle.protobuf.FieldMaskB\003\340A\002\"t\n#DeleteSna" - + "pshotSchedulePolicyRequest\022M\n\004name\030\001 \001(\t" - + "B?\340A\002\372A9\n7baremetalsolution.googleapis.c" - + "om/SnapshotSchedulePolicy\"\206\001\n\023UpdateVolu" - + "meRequest\022>\n\006volume\030\001 \001(\0132).google.cloud" - + ".baremetalsolution.v2.VolumeB\003\340A\002\022/\n\013upd" - + "ate_mask\030\002 \001(\0132\032.google.protobuf.FieldMa" - + "sk\"K\n\rGetLunRequest\022:\n\004name\030\001 \001(\tB,\340A\002\372A" - + "&\n$baremetalsolution.googleapis.com/Lun\"" - + "y\n\017ListLunsRequest\022?\n\006parent\030\001 \001(\tB/\340A\002\372" - + "A)\n\'baremetalsolution.googleapis.com/Vol" - + "ume\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001" - + "(\t\"v\n\020ListLunsResponse\0224\n\004luns\030\001 \003(\0132&.g" - + "oogle.cloud.baremetalsolution.v2.Lun\022\027\n\017" - + "next_page_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003" - + "(\t\"\257\001\n\033CreateVolumeSnapshotRequest\022?\n\006pa" - + "rent\030\001 \001(\tB/\340A\002\372A)\n\'baremetalsolution.go" - + "ogleapis.com/Volume\022O\n\017volume_snapshot\030\002" - + " \001(\01321.google.cloud.baremetalsolution.v2" - + ".VolumeSnapshotB\003\340A\002\"p\n\034RestoreVolumeSna" - + "pshotRequest\022P\n\017volume_snapshot\030\001 \001(\tB7\340" - + "A\002\372A1\n/baremetalsolution.googleapis.com/" - + "VolumeSnapshot2\217#\n\021BareMetalSolution\022\302\001\n" - + "\rListInstances\0227.google.cloud.baremetals" - + "olution.v2.ListInstancesRequest\0328.google" - + ".cloud.baremetalsolution.v2.ListInstance" - + "sResponse\">\202\323\344\223\002/\022-/v2/{parent=projects/" - + "*/locations/*}/instances\332A\006parent\022\257\001\n\013Ge" - + "tInstance\0225.google.cloud.baremetalsoluti" - + "on.v2.GetInstanceRequest\032+.google.cloud." - + "baremetalsolution.v2.Instance\"<\202\323\344\223\002/\022-/" - + "v2/{name=projects/*/locations/*/instance" - + "s/*}\332A\004name\022\333\001\n\rResetInstance\0227.google.c" - + "loud.baremetalsolution.v2.ResetInstanceR" - + "equest\032\035.google.longrunning.Operation\"r\202" - + "\323\344\223\0028\"3/v2/{name=projects/*/locations/*/" - + "instances/*}:reset:\001*\332A\004name\312A*\n\025ResetIn" - + "stanceResponse\022\021OperationMetadata\022\272\001\n\013Li" - + "stVolumes\0225.google.cloud.baremetalsoluti" - + "on.v2.ListVolumesRequest\0326.google.cloud." - + "baremetalsolution.v2.ListVolumesResponse" - + "\"<\202\323\344\223\002-\022+/v2/{parent=projects/*/locatio" - + "ns/*}/volumes\332A\006parent\022\247\001\n\tGetVolume\0223.g" - + "oogle.cloud.baremetalsolution.v2.GetVolu" - + "meRequest\032).google.cloud.baremetalsoluti" - + "on.v2.Volume\":\202\323\344\223\002-\022+/v2/{name=projects" - + "/*/locations/*/volumes/*}\332A\004name\022\334\001\n\014Upd" - + "ateVolume\0226.google.cloud.baremetalsoluti" - + "on.v2.UpdateVolumeRequest\032\035.google.longr" - + "unning.Operation\"u\202\323\344\223\002<22/v2/{volume.na" - + "me=projects/*/locations/*/volumes/*}:\006vo" - + "lume\332A\022volume,update_mask\312A\033\n\006Volume\022\021Op" - + "erationMetadata\022\276\001\n\014ListNetworks\0226.googl" - + "e.cloud.baremetalsolution.v2.ListNetwork" - + "sRequest\0327.google.cloud.baremetalsolutio" - + "n.v2.ListNetworksResponse\"=\202\323\344\223\002.\022,/v2/{" - + "parent=projects/*/locations/*}/networks\332" - + "A\006parent\022\253\001\n\nGetNetwork\0224.google.cloud.b" - + "aremetalsolution.v2.GetNetworkRequest\032*." - + "google.cloud.baremetalsolution.v2.Networ" - + "k\";\202\323\344\223\002.\022,/v2/{name=projects/*/location" - + "s/*/networks/*}\332A\004name\022\376\001\n\034ListSnapshotS" - + "chedulePolicies\022F.google.cloud.baremetal" - + "solution.v2.ListSnapshotSchedulePolicies" - + "Request\032G.google.cloud.baremetalsolution" - + ".v2.ListSnapshotSchedulePoliciesResponse" - + "\"M\202\323\344\223\002>\022\022*.goog" - + "le.cloud.baremetalsolution.v2.CreateVolu" - + "meSnapshotRequest\0321.google.cloud.baremet" - + "alsolution.v2.VolumeSnapshot\"i\202\323\344\223\002J\"7/v" - + "2/{parent=projects/*/locations/*/volumes" - + "/*}/snapshots:\017volume_snapshot\332A\026parent," - + "volume_snapshot\022\225\002\n\025RestoreVolumeSnapsho" - + "t\022?.google.cloud.baremetalsolution.v2.Re" - + "storeVolumeSnapshotRequest\032\035.google.long" - + "running.Operation\"\233\001\202\323\344\223\002]\"X/v2/{volume_" - + "snapshot=projects/*/locations/*/volumes/" - + "*/snapshots/*}:restoreVolumeSnapshot:\001*\332" - + "A\017volume_snapshot\312A#\n\016VolumeSnapshot\022\021Op" - + "erationMetadata\022\266\001\n\024DeleteVolumeSnapshot" - + "\022>.google.cloud.baremetalsolution.v2.Del" - + "eteVolumeSnapshotRequest\032\026.google.protob" - + "uf.Empty\"F\202\323\344\223\0029*7/v2/{name=projects/*/l" - + "ocations/*/volumes/*/snapshots/*}\332A\004name" - + "\022\313\001\n\021GetVolumeSnapshot\022;.google.cloud.ba" - + "remetalsolution.v2.GetVolumeSnapshotRequ" - + "est\0321.google.cloud.baremetalsolution.v2." - + "VolumeSnapshot\"F\202\323\344\223\0029\0227/v2/{name=projec" - + "ts/*/locations/*/volumes/*/snapshots/*}\332" - + "A\004name\022\336\001\n\023ListVolumeSnapshots\022=.google." - + "cloud.baremetalsolution.v2.ListVolumeSna" - + "pshotsRequest\032>.google.cloud.baremetalso" - + "lution.v2.ListVolumeSnapshotsResponse\"H\202" - + "\323\344\223\0029\0227/v2/{parent=projects/*/locations/" - + "*/volumes/*}/snapshots\332A\006parent\022\245\001\n\006GetL" - + "un\0220.google.cloud.baremetalsolution.v2.G" - + "etLunRequest\032&.google.cloud.baremetalsol" - + "ution.v2.Lun\"A\202\323\344\223\0024\0222/v2/{name=projects" - + "/*/locations/*/volumes/*/luns/*}\332A\004name\022" - + "\270\001\n\010ListLuns\0222.google.cloud.baremetalsol" - + "ution.v2.ListLunsRequest\0323.google.cloud." - + "baremetalsolution.v2.ListLunsResponse\"C\202" - + "\323\344\223\0024\0222/v2/{parent=projects/*/locations/" - + "*/volumes/*}/luns\332A\006parent\032T\312A baremetal" - + "solution.googleapis.com\322A.https://www.go" - + "ogleapis.com/auth/cloud-platformB\204\002\n%com" - + ".google.cloud.baremetalsolution.v2B\026Bare" - + "metalsolutionProtoP\001ZRgoogle.golang.org/" - + "genproto/googleapis/cloud/baremetalsolut" - + "ion/v2;baremetalsolution\252\002!Google.Cloud." - + "BaremetalSolution.V2\312\002!Google\\Cloud\\Bare" - + "metalSolution\\V2\352\002$Google::Cloud::Bareme" - + "talSolution::V2b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.api.ClientProto.getDescriptor(), - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.api.ResourceProto.getDescriptor(), - com.google.longrunning.OperationsProto.getDescriptor(), - com.google.protobuf.EmptyProto.getDescriptor(), - com.google.protobuf.FieldMaskProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_baremetalsolution_v2_Volume_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_baremetalsolution_v2_Volume_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_Volume_descriptor, - new java.lang.String[] { - "Name", - "StorageType", - "State", - "RequestedSizeGib", - "CurrentSizeGib", - "AutoGrownSizeGib", - "RemainingSpaceGib", - "SnapshotReservationDetail", - "SnapshotAutoDeleteBehavior", - "SnapshotSchedulePolicy", - }); - internal_static_google_cloud_baremetalsolution_v2_Volume_SnapshotReservationDetail_descriptor = - internal_static_google_cloud_baremetalsolution_v2_Volume_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_baremetalsolution_v2_Volume_SnapshotReservationDetail_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_Volume_SnapshotReservationDetail_descriptor, - new java.lang.String[] { - "ReservedSpaceGib", "ReservedSpaceUsedPercent", "ReservedSpaceRemainingGib", - }); - internal_static_google_cloud_baremetalsolution_v2_ListVolumesRequest_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_baremetalsolution_v2_ListVolumesRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_ListVolumesRequest_descriptor, - new java.lang.String[] { - "Parent", "PageSize", "PageToken", - }); - internal_static_google_cloud_baremetalsolution_v2_ListVolumesResponse_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_baremetalsolution_v2_ListVolumesResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_ListVolumesResponse_descriptor, - new java.lang.String[] { - "Volumes", "NextPageToken", "Unreachable", - }); - internal_static_google_cloud_baremetalsolution_v2_GetVolumeRequest_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_baremetalsolution_v2_GetVolumeRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_GetVolumeRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_baremetalsolution_v2_Lun_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_baremetalsolution_v2_Lun_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_Lun_descriptor, - new java.lang.String[] { - "Name", - "State", - "SizeGb", - "MultiprotocolType", - "StorageVolume", - "Shareable", - "BootLun", - "StorageType", - "Wwid", - }); - internal_static_google_cloud_baremetalsolution_v2_Network_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_baremetalsolution_v2_Network_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_Network_descriptor, - new java.lang.String[] { - "Name", - "Network", - "Type", - "IpAddress", - "MacAddress", - "State", - "VlanId", - "Cidr", - "Vrf", - }); - internal_static_google_cloud_baremetalsolution_v2_VRF_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_baremetalsolution_v2_VRF_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_VRF_descriptor, - new java.lang.String[] { - "Name", "State", "QosPolicy", "VlanAttachments", - }); - internal_static_google_cloud_baremetalsolution_v2_VRF_QosPolicy_descriptor = - internal_static_google_cloud_baremetalsolution_v2_VRF_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_baremetalsolution_v2_VRF_QosPolicy_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_VRF_QosPolicy_descriptor, - new java.lang.String[] { - "BandwidthGbps", - }); - internal_static_google_cloud_baremetalsolution_v2_VRF_VlanAttachment_descriptor = - internal_static_google_cloud_baremetalsolution_v2_VRF_descriptor.getNestedTypes().get(1); - internal_static_google_cloud_baremetalsolution_v2_VRF_VlanAttachment_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_VRF_VlanAttachment_descriptor, - new java.lang.String[] { - "PeerVlanId", "PeerIp", "RouterIp", - }); - internal_static_google_cloud_baremetalsolution_v2_ListNetworksRequest_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_baremetalsolution_v2_ListNetworksRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_ListNetworksRequest_descriptor, - new java.lang.String[] { - "Parent", "PageSize", "PageToken", - }); - internal_static_google_cloud_baremetalsolution_v2_ListNetworksResponse_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_cloud_baremetalsolution_v2_ListNetworksResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_ListNetworksResponse_descriptor, - new java.lang.String[] { - "Networks", "NextPageToken", "Unreachable", - }); - internal_static_google_cloud_baremetalsolution_v2_GetNetworkRequest_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_cloud_baremetalsolution_v2_GetNetworkRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_GetNetworkRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_baremetalsolution_v2_GetSnapshotSchedulePolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_cloud_baremetalsolution_v2_GetSnapshotSchedulePolicyRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_GetSnapshotSchedulePolicyRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_baremetalsolution_v2_Instance_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_google_cloud_baremetalsolution_v2_Instance_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_Instance_descriptor, - new java.lang.String[] { - "Name", - "CreateTime", - "UpdateTime", - "MachineType", - "State", - "HyperthreadingEnabled", - "Labels", - "Luns", - "Networks", - "InteractiveSerialConsoleEnabled", - }); - internal_static_google_cloud_baremetalsolution_v2_Instance_LabelsEntry_descriptor = - internal_static_google_cloud_baremetalsolution_v2_Instance_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_baremetalsolution_v2_Instance_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_Instance_LabelsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_baremetalsolution_v2_ListInstancesRequest_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_google_cloud_baremetalsolution_v2_ListInstancesRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_ListInstancesRequest_descriptor, - new java.lang.String[] { - "Parent", "PageSize", "PageToken", - }); - internal_static_google_cloud_baremetalsolution_v2_ListInstancesResponse_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_google_cloud_baremetalsolution_v2_ListInstancesResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_ListInstancesResponse_descriptor, - new java.lang.String[] { - "Instances", "NextPageToken", "Unreachable", - }); - internal_static_google_cloud_baremetalsolution_v2_GetInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_google_cloud_baremetalsolution_v2_GetInstanceRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_GetInstanceRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_baremetalsolution_v2_ResetInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_google_cloud_baremetalsolution_v2_ResetInstanceRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_ResetInstanceRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_baremetalsolution_v2_ResetInstanceResponse_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_google_cloud_baremetalsolution_v2_ResetInstanceResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_ResetInstanceResponse_descriptor, - new java.lang.String[] {}); - internal_static_google_cloud_baremetalsolution_v2_GetVolumeSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_google_cloud_baremetalsolution_v2_GetVolumeSnapshotRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_GetVolumeSnapshotRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_baremetalsolution_v2_ListVolumeSnapshotsRequest_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_google_cloud_baremetalsolution_v2_ListVolumeSnapshotsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_ListVolumeSnapshotsRequest_descriptor, - new java.lang.String[] { - "Parent", "PageSize", "PageToken", - }); - internal_static_google_cloud_baremetalsolution_v2_ListVolumeSnapshotsResponse_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_google_cloud_baremetalsolution_v2_ListVolumeSnapshotsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_ListVolumeSnapshotsResponse_descriptor, - new java.lang.String[] { - "VolumeSnapshots", "NextPageToken", "Unreachable", - }); - internal_static_google_cloud_baremetalsolution_v2_DeleteVolumeSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_google_cloud_baremetalsolution_v2_DeleteVolumeSnapshotRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_DeleteVolumeSnapshotRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_baremetalsolution_v2_OperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(21); - internal_static_google_cloud_baremetalsolution_v2_OperationMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_OperationMetadata_descriptor, - new java.lang.String[] { - "CreateTime", - "EndTime", - "Target", - "Verb", - "StatusMessage", - "RequestedCancellation", - "ApiVersion", - }); - internal_static_google_cloud_baremetalsolution_v2_VolumeSnapshot_descriptor = - getDescriptor().getMessageTypes().get(22); - internal_static_google_cloud_baremetalsolution_v2_VolumeSnapshot_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_VolumeSnapshot_descriptor, - new java.lang.String[] { - "Name", "Description", "SizeBytes", "CreateTime", "StorageVolume", - }); - internal_static_google_cloud_baremetalsolution_v2_SnapshotSchedulePolicy_descriptor = - getDescriptor().getMessageTypes().get(23); - internal_static_google_cloud_baremetalsolution_v2_SnapshotSchedulePolicy_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_SnapshotSchedulePolicy_descriptor, - new java.lang.String[] { - "Name", "Description", "Schedules", - }); - internal_static_google_cloud_baremetalsolution_v2_SnapshotSchedulePolicy_Schedule_descriptor = - internal_static_google_cloud_baremetalsolution_v2_SnapshotSchedulePolicy_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_baremetalsolution_v2_SnapshotSchedulePolicy_Schedule_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_SnapshotSchedulePolicy_Schedule_descriptor, - new java.lang.String[] { - "CrontabSpec", "RetentionCount", "Prefix", - }); - internal_static_google_cloud_baremetalsolution_v2_ListSnapshotSchedulePoliciesRequest_descriptor = - getDescriptor().getMessageTypes().get(24); - internal_static_google_cloud_baremetalsolution_v2_ListSnapshotSchedulePoliciesRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_ListSnapshotSchedulePoliciesRequest_descriptor, - new java.lang.String[] { - "Parent", "PageSize", "PageToken", - }); - internal_static_google_cloud_baremetalsolution_v2_ListSnapshotSchedulePoliciesResponse_descriptor = - getDescriptor().getMessageTypes().get(25); - internal_static_google_cloud_baremetalsolution_v2_ListSnapshotSchedulePoliciesResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_ListSnapshotSchedulePoliciesResponse_descriptor, - new java.lang.String[] { - "SnapshotSchedulePolicies", "NextPageToken", - }); - internal_static_google_cloud_baremetalsolution_v2_CreateSnapshotSchedulePolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(26); - internal_static_google_cloud_baremetalsolution_v2_CreateSnapshotSchedulePolicyRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_CreateSnapshotSchedulePolicyRequest_descriptor, - new java.lang.String[] { - "Parent", "SnapshotSchedulePolicy", "SnapshotSchedulePolicyId", - }); - internal_static_google_cloud_baremetalsolution_v2_UpdateSnapshotSchedulePolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(27); - internal_static_google_cloud_baremetalsolution_v2_UpdateSnapshotSchedulePolicyRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_UpdateSnapshotSchedulePolicyRequest_descriptor, - new java.lang.String[] { - "SnapshotSchedulePolicy", "UpdateMask", - }); - internal_static_google_cloud_baremetalsolution_v2_DeleteSnapshotSchedulePolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(28); - internal_static_google_cloud_baremetalsolution_v2_DeleteSnapshotSchedulePolicyRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_DeleteSnapshotSchedulePolicyRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_baremetalsolution_v2_UpdateVolumeRequest_descriptor = - getDescriptor().getMessageTypes().get(29); - internal_static_google_cloud_baremetalsolution_v2_UpdateVolumeRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_UpdateVolumeRequest_descriptor, - new java.lang.String[] { - "Volume", "UpdateMask", - }); - internal_static_google_cloud_baremetalsolution_v2_GetLunRequest_descriptor = - getDescriptor().getMessageTypes().get(30); - internal_static_google_cloud_baremetalsolution_v2_GetLunRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_GetLunRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_baremetalsolution_v2_ListLunsRequest_descriptor = - getDescriptor().getMessageTypes().get(31); - internal_static_google_cloud_baremetalsolution_v2_ListLunsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_ListLunsRequest_descriptor, - new java.lang.String[] { - "Parent", "PageSize", "PageToken", - }); - internal_static_google_cloud_baremetalsolution_v2_ListLunsResponse_descriptor = - getDescriptor().getMessageTypes().get(32); - internal_static_google_cloud_baremetalsolution_v2_ListLunsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_ListLunsResponse_descriptor, - new java.lang.String[] { - "Luns", "NextPageToken", "Unreachable", - }); - internal_static_google_cloud_baremetalsolution_v2_CreateVolumeSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(33); - internal_static_google_cloud_baremetalsolution_v2_CreateVolumeSnapshotRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_CreateVolumeSnapshotRequest_descriptor, - new java.lang.String[] { - "Parent", "VolumeSnapshot", - }); - internal_static_google_cloud_baremetalsolution_v2_RestoreVolumeSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(34); - internal_static_google_cloud_baremetalsolution_v2_RestoreVolumeSnapshotRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_baremetalsolution_v2_RestoreVolumeSnapshotRequest_descriptor, - new java.lang.String[] { - "VolumeSnapshot", - }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.methodSignature); - registry.add(com.google.api.ClientProto.oauthScopes); - registry.add(com.google.api.ResourceProto.resource); - registry.add(com.google.api.ResourceProto.resourceReference); - registry.add(com.google.longrunning.OperationsProto.operationInfo); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.longrunning.OperationsProto.getDescriptor(); - com.google.protobuf.EmptyProto.getDescriptor(); - com.google.protobuf.FieldMaskProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/CreateSnapshotSchedulePolicyRequest.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/CreateSnapshotSchedulePolicyRequest.java deleted file mode 100644 index b2c9f55ca260..000000000000 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/CreateSnapshotSchedulePolicyRequest.java +++ /dev/null @@ -1,1171 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto - -package com.google.cloud.baremetalsolution.v2; - -/** - * - * - *
- * Message for creating a snapshot schedule policy in a project.
- * 
- * - * Protobuf type {@code google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest} - */ -public final class CreateSnapshotSchedulePolicyRequest - extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest) - CreateSnapshotSchedulePolicyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateSnapshotSchedulePolicyRequest.newBuilder() to construct. - private CreateSnapshotSchedulePolicyRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateSnapshotSchedulePolicyRequest() { - parent_ = ""; - snapshotSchedulePolicyId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateSnapshotSchedulePolicyRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private CreateSnapshotSchedulePolicyRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: - { - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Builder subBuilder = - null; - if (snapshotSchedulePolicy_ != null) { - subBuilder = snapshotSchedulePolicy_.toBuilder(); - } - snapshotSchedulePolicy_ = - input.readMessage( - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(snapshotSchedulePolicy_); - snapshotSchedulePolicy_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - snapshotSchedulePolicyId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_CreateSnapshotSchedulePolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_CreateSnapshotSchedulePolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest.class, - com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest.Builder - .class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * Required. The parent project and location containing the SnapshotSchedulePolicy.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The parent project and location containing the SnapshotSchedulePolicy.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SNAPSHOT_SCHEDULE_POLICY_FIELD_NUMBER = 2; - private com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshotSchedulePolicy_; - /** - * - * - *
-   * Required. The SnapshotSchedulePolicy to create.
-   * 
- * - * - * .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the snapshotSchedulePolicy field is set. - */ - @java.lang.Override - public boolean hasSnapshotSchedulePolicy() { - return snapshotSchedulePolicy_ != null; - } - /** - * - * - *
-   * Required. The SnapshotSchedulePolicy to create.
-   * 
- * - * - * .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The snapshotSchedulePolicy. - */ - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy getSnapshotSchedulePolicy() { - return snapshotSchedulePolicy_ == null - ? com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.getDefaultInstance() - : snapshotSchedulePolicy_; - } - /** - * - * - *
-   * Required. The SnapshotSchedulePolicy to create.
-   * 
- * - * - * .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicyOrBuilder - getSnapshotSchedulePolicyOrBuilder() { - return getSnapshotSchedulePolicy(); - } - - public static final int SNAPSHOT_SCHEDULE_POLICY_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object snapshotSchedulePolicyId_; - /** - * - * - *
-   * Required. Snapshot policy ID
-   * 
- * - * string snapshot_schedule_policy_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The snapshotSchedulePolicyId. - */ - @java.lang.Override - public java.lang.String getSnapshotSchedulePolicyId() { - java.lang.Object ref = snapshotSchedulePolicyId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - snapshotSchedulePolicyId_ = s; - return s; - } - } - /** - * - * - *
-   * Required. Snapshot policy ID
-   * 
- * - * string snapshot_schedule_policy_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for snapshotSchedulePolicyId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSnapshotSchedulePolicyIdBytes() { - java.lang.Object ref = snapshotSchedulePolicyId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - snapshotSchedulePolicyId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (snapshotSchedulePolicy_ != null) { - output.writeMessage(2, getSnapshotSchedulePolicy()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(snapshotSchedulePolicyId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, snapshotSchedulePolicyId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (snapshotSchedulePolicy_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSnapshotSchedulePolicy()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(snapshotSchedulePolicyId_)) { - size += - com.google.protobuf.GeneratedMessageV3.computeStringSize(3, snapshotSchedulePolicyId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest)) { - return super.equals(obj); - } - com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest other = - (com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (hasSnapshotSchedulePolicy() != other.hasSnapshotSchedulePolicy()) return false; - if (hasSnapshotSchedulePolicy()) { - if (!getSnapshotSchedulePolicy().equals(other.getSnapshotSchedulePolicy())) return false; - } - if (!getSnapshotSchedulePolicyId().equals(other.getSnapshotSchedulePolicyId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasSnapshotSchedulePolicy()) { - hash = (37 * hash) + SNAPSHOT_SCHEDULE_POLICY_FIELD_NUMBER; - hash = (53 * hash) + getSnapshotSchedulePolicy().hashCode(); - } - hash = (37 * hash) + SNAPSHOT_SCHEDULE_POLICY_ID_FIELD_NUMBER; - hash = (53 * hash) + getSnapshotSchedulePolicyId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Message for creating a snapshot schedule policy in a project.
-   * 
- * - * Protobuf type {@code google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest) - com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_CreateSnapshotSchedulePolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_CreateSnapshotSchedulePolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest.class, - com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest.Builder - .class); - } - - // Construct using - // com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (snapshotSchedulePolicyBuilder_ == null) { - snapshotSchedulePolicy_ = null; - } else { - snapshotSchedulePolicy_ = null; - snapshotSchedulePolicyBuilder_ = null; - } - snapshotSchedulePolicyId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_CreateSnapshotSchedulePolicyRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest - getDefaultInstanceForType() { - return com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest build() { - com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest - buildPartial() { - com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest result = - new com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest(this); - result.parent_ = parent_; - if (snapshotSchedulePolicyBuilder_ == null) { - result.snapshotSchedulePolicy_ = snapshotSchedulePolicy_; - } else { - result.snapshotSchedulePolicy_ = snapshotSchedulePolicyBuilder_.build(); - } - result.snapshotSchedulePolicyId_ = snapshotSchedulePolicyId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest) { - return mergeFrom( - (com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest other) { - if (other - == com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest - .getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasSnapshotSchedulePolicy()) { - mergeSnapshotSchedulePolicy(other.getSnapshotSchedulePolicy()); - } - if (!other.getSnapshotSchedulePolicyId().isEmpty()) { - snapshotSchedulePolicyId_ = other.snapshotSchedulePolicyId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest parsedMessage = - null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The parent project and location containing the SnapshotSchedulePolicy.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The parent project and location containing the SnapshotSchedulePolicy.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The parent project and location containing the SnapshotSchedulePolicy.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The parent project and location containing the SnapshotSchedulePolicy.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The parent project and location containing the SnapshotSchedulePolicy.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshotSchedulePolicy_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Builder, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicyOrBuilder> - snapshotSchedulePolicyBuilder_; - /** - * - * - *
-     * Required. The SnapshotSchedulePolicy to create.
-     * 
- * - * - * .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the snapshotSchedulePolicy field is set. - */ - public boolean hasSnapshotSchedulePolicy() { - return snapshotSchedulePolicyBuilder_ != null || snapshotSchedulePolicy_ != null; - } - /** - * - * - *
-     * Required. The SnapshotSchedulePolicy to create.
-     * 
- * - * - * .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The snapshotSchedulePolicy. - */ - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy - getSnapshotSchedulePolicy() { - if (snapshotSchedulePolicyBuilder_ == null) { - return snapshotSchedulePolicy_ == null - ? com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.getDefaultInstance() - : snapshotSchedulePolicy_; - } else { - return snapshotSchedulePolicyBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The SnapshotSchedulePolicy to create.
-     * 
- * - * - * .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setSnapshotSchedulePolicy( - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy value) { - if (snapshotSchedulePolicyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - snapshotSchedulePolicy_ = value; - onChanged(); - } else { - snapshotSchedulePolicyBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. The SnapshotSchedulePolicy to create.
-     * 
- * - * - * .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setSnapshotSchedulePolicy( - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Builder builderForValue) { - if (snapshotSchedulePolicyBuilder_ == null) { - snapshotSchedulePolicy_ = builderForValue.build(); - onChanged(); - } else { - snapshotSchedulePolicyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The SnapshotSchedulePolicy to create.
-     * 
- * - * - * .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeSnapshotSchedulePolicy( - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy value) { - if (snapshotSchedulePolicyBuilder_ == null) { - if (snapshotSchedulePolicy_ != null) { - snapshotSchedulePolicy_ = - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.newBuilder( - snapshotSchedulePolicy_) - .mergeFrom(value) - .buildPartial(); - } else { - snapshotSchedulePolicy_ = value; - } - onChanged(); - } else { - snapshotSchedulePolicyBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The SnapshotSchedulePolicy to create.
-     * 
- * - * - * .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearSnapshotSchedulePolicy() { - if (snapshotSchedulePolicyBuilder_ == null) { - snapshotSchedulePolicy_ = null; - onChanged(); - } else { - snapshotSchedulePolicy_ = null; - snapshotSchedulePolicyBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. The SnapshotSchedulePolicy to create.
-     * 
- * - * - * .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Builder - getSnapshotSchedulePolicyBuilder() { - - onChanged(); - return getSnapshotSchedulePolicyFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The SnapshotSchedulePolicy to create.
-     * 
- * - * - * .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicyOrBuilder - getSnapshotSchedulePolicyOrBuilder() { - if (snapshotSchedulePolicyBuilder_ != null) { - return snapshotSchedulePolicyBuilder_.getMessageOrBuilder(); - } else { - return snapshotSchedulePolicy_ == null - ? com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.getDefaultInstance() - : snapshotSchedulePolicy_; - } - } - /** - * - * - *
-     * Required. The SnapshotSchedulePolicy to create.
-     * 
- * - * - * .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Builder, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicyOrBuilder> - getSnapshotSchedulePolicyFieldBuilder() { - if (snapshotSchedulePolicyBuilder_ == null) { - snapshotSchedulePolicyBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Builder, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicyOrBuilder>( - getSnapshotSchedulePolicy(), getParentForChildren(), isClean()); - snapshotSchedulePolicy_ = null; - } - return snapshotSchedulePolicyBuilder_; - } - - private java.lang.Object snapshotSchedulePolicyId_ = ""; - /** - * - * - *
-     * Required. Snapshot policy ID
-     * 
- * - * string snapshot_schedule_policy_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The snapshotSchedulePolicyId. - */ - public java.lang.String getSnapshotSchedulePolicyId() { - java.lang.Object ref = snapshotSchedulePolicyId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - snapshotSchedulePolicyId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. Snapshot policy ID
-     * 
- * - * string snapshot_schedule_policy_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The bytes for snapshotSchedulePolicyId. - */ - public com.google.protobuf.ByteString getSnapshotSchedulePolicyIdBytes() { - java.lang.Object ref = snapshotSchedulePolicyId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - snapshotSchedulePolicyId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. Snapshot policy ID
-     * 
- * - * string snapshot_schedule_policy_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param value The snapshotSchedulePolicyId to set. - * @return This builder for chaining. - */ - public Builder setSnapshotSchedulePolicyId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - snapshotSchedulePolicyId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Snapshot policy ID
-     * 
- * - * string snapshot_schedule_policy_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return This builder for chaining. - */ - public Builder clearSnapshotSchedulePolicyId() { - - snapshotSchedulePolicyId_ = getDefaultInstance().getSnapshotSchedulePolicyId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Snapshot policy ID
-     * 
- * - * string snapshot_schedule_policy_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param value The bytes for snapshotSchedulePolicyId to set. - * @return This builder for chaining. - */ - public Builder setSnapshotSchedulePolicyIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - snapshotSchedulePolicyId_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest) - private static final com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest(); - } - - public static com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateSnapshotSchedulePolicyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateSnapshotSchedulePolicyRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/CreateSnapshotSchedulePolicyRequestOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/CreateSnapshotSchedulePolicyRequestOrBuilder.java deleted file mode 100644 index 620904175b76..000000000000 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/CreateSnapshotSchedulePolicyRequestOrBuilder.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto - -package com.google.cloud.baremetalsolution.v2; - -public interface CreateSnapshotSchedulePolicyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.CreateSnapshotSchedulePolicyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The parent project and location containing the SnapshotSchedulePolicy.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The parent project and location containing the SnapshotSchedulePolicy.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Required. The SnapshotSchedulePolicy to create.
-   * 
- * - * - * .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the snapshotSchedulePolicy field is set. - */ - boolean hasSnapshotSchedulePolicy(); - /** - * - * - *
-   * Required. The SnapshotSchedulePolicy to create.
-   * 
- * - * - * .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The snapshotSchedulePolicy. - */ - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy getSnapshotSchedulePolicy(); - /** - * - * - *
-   * Required. The SnapshotSchedulePolicy to create.
-   * 
- * - * - * .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicyOrBuilder - getSnapshotSchedulePolicyOrBuilder(); - - /** - * - * - *
-   * Required. Snapshot policy ID
-   * 
- * - * string snapshot_schedule_policy_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The snapshotSchedulePolicyId. - */ - java.lang.String getSnapshotSchedulePolicyId(); - /** - * - * - *
-   * Required. Snapshot policy ID
-   * 
- * - * string snapshot_schedule_policy_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for snapshotSchedulePolicyId. - */ - com.google.protobuf.ByteString getSnapshotSchedulePolicyIdBytes(); -} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/CreateVolumeSnapshotRequest.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/CreateVolumeSnapshotRequest.java deleted file mode 100644 index 7c30e350c12f..000000000000 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/CreateVolumeSnapshotRequest.java +++ /dev/null @@ -1,967 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto - -package com.google.cloud.baremetalsolution.v2; - -/** - * - * - *
- * Message for creating a volume snapshot.
- * 
- * - * Protobuf type {@code google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest} - */ -public final class CreateVolumeSnapshotRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest) - CreateVolumeSnapshotRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateVolumeSnapshotRequest.newBuilder() to construct. - private CreateVolumeSnapshotRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateVolumeSnapshotRequest() { - parent_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateVolumeSnapshotRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private CreateVolumeSnapshotRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: - { - com.google.cloud.baremetalsolution.v2.VolumeSnapshot.Builder subBuilder = null; - if (volumeSnapshot_ != null) { - subBuilder = volumeSnapshot_.toBuilder(); - } - volumeSnapshot_ = - input.readMessage( - com.google.cloud.baremetalsolution.v2.VolumeSnapshot.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(volumeSnapshot_); - volumeSnapshot_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_CreateVolumeSnapshotRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_CreateVolumeSnapshotRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest.class, - com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * Required. The volume to snapshot.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The volume to snapshot.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VOLUME_SNAPSHOT_FIELD_NUMBER = 2; - private com.google.cloud.baremetalsolution.v2.VolumeSnapshot volumeSnapshot_; - /** - * - * - *
-   * Required. The volume snapshot to create. Only the description field may be specified.
-   * 
- * - * - * .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the volumeSnapshot field is set. - */ - @java.lang.Override - public boolean hasVolumeSnapshot() { - return volumeSnapshot_ != null; - } - /** - * - * - *
-   * Required. The volume snapshot to create. Only the description field may be specified.
-   * 
- * - * - * .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The volumeSnapshot. - */ - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.VolumeSnapshot getVolumeSnapshot() { - return volumeSnapshot_ == null - ? com.google.cloud.baremetalsolution.v2.VolumeSnapshot.getDefaultInstance() - : volumeSnapshot_; - } - /** - * - * - *
-   * Required. The volume snapshot to create. Only the description field may be specified.
-   * 
- * - * - * .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.VolumeSnapshotOrBuilder - getVolumeSnapshotOrBuilder() { - return getVolumeSnapshot(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (volumeSnapshot_ != null) { - output.writeMessage(2, getVolumeSnapshot()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (volumeSnapshot_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getVolumeSnapshot()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest)) { - return super.equals(obj); - } - com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest other = - (com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (hasVolumeSnapshot() != other.hasVolumeSnapshot()) return false; - if (hasVolumeSnapshot()) { - if (!getVolumeSnapshot().equals(other.getVolumeSnapshot())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasVolumeSnapshot()) { - hash = (37 * hash) + VOLUME_SNAPSHOT_FIELD_NUMBER; - hash = (53 * hash) + getVolumeSnapshot().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Message for creating a volume snapshot.
-   * 
- * - * Protobuf type {@code google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest) - com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_CreateVolumeSnapshotRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_CreateVolumeSnapshotRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest.class, - com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest.Builder.class); - } - - // Construct using - // com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (volumeSnapshotBuilder_ == null) { - volumeSnapshot_ = null; - } else { - volumeSnapshot_ = null; - volumeSnapshotBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_CreateVolumeSnapshotRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest - getDefaultInstanceForType() { - return com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest build() { - com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest buildPartial() { - com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest result = - new com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest(this); - result.parent_ = parent_; - if (volumeSnapshotBuilder_ == null) { - result.volumeSnapshot_ = volumeSnapshot_; - } else { - result.volumeSnapshot_ = volumeSnapshotBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest) { - return mergeFrom((com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest other) { - if (other - == com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasVolumeSnapshot()) { - mergeVolumeSnapshot(other.getVolumeSnapshot()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The volume to snapshot.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The volume to snapshot.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The volume to snapshot.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The volume to snapshot.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The volume to snapshot.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.cloud.baremetalsolution.v2.VolumeSnapshot volumeSnapshot_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.baremetalsolution.v2.VolumeSnapshot, - com.google.cloud.baremetalsolution.v2.VolumeSnapshot.Builder, - com.google.cloud.baremetalsolution.v2.VolumeSnapshotOrBuilder> - volumeSnapshotBuilder_; - /** - * - * - *
-     * Required. The volume snapshot to create. Only the description field may be specified.
-     * 
- * - * - * .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the volumeSnapshot field is set. - */ - public boolean hasVolumeSnapshot() { - return volumeSnapshotBuilder_ != null || volumeSnapshot_ != null; - } - /** - * - * - *
-     * Required. The volume snapshot to create. Only the description field may be specified.
-     * 
- * - * - * .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The volumeSnapshot. - */ - public com.google.cloud.baremetalsolution.v2.VolumeSnapshot getVolumeSnapshot() { - if (volumeSnapshotBuilder_ == null) { - return volumeSnapshot_ == null - ? com.google.cloud.baremetalsolution.v2.VolumeSnapshot.getDefaultInstance() - : volumeSnapshot_; - } else { - return volumeSnapshotBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The volume snapshot to create. Only the description field may be specified.
-     * 
- * - * - * .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setVolumeSnapshot(com.google.cloud.baremetalsolution.v2.VolumeSnapshot value) { - if (volumeSnapshotBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - volumeSnapshot_ = value; - onChanged(); - } else { - volumeSnapshotBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. The volume snapshot to create. Only the description field may be specified.
-     * 
- * - * - * .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setVolumeSnapshot( - com.google.cloud.baremetalsolution.v2.VolumeSnapshot.Builder builderForValue) { - if (volumeSnapshotBuilder_ == null) { - volumeSnapshot_ = builderForValue.build(); - onChanged(); - } else { - volumeSnapshotBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The volume snapshot to create. Only the description field may be specified.
-     * 
- * - * - * .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeVolumeSnapshot(com.google.cloud.baremetalsolution.v2.VolumeSnapshot value) { - if (volumeSnapshotBuilder_ == null) { - if (volumeSnapshot_ != null) { - volumeSnapshot_ = - com.google.cloud.baremetalsolution.v2.VolumeSnapshot.newBuilder(volumeSnapshot_) - .mergeFrom(value) - .buildPartial(); - } else { - volumeSnapshot_ = value; - } - onChanged(); - } else { - volumeSnapshotBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The volume snapshot to create. Only the description field may be specified.
-     * 
- * - * - * .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearVolumeSnapshot() { - if (volumeSnapshotBuilder_ == null) { - volumeSnapshot_ = null; - onChanged(); - } else { - volumeSnapshot_ = null; - volumeSnapshotBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. The volume snapshot to create. Only the description field may be specified.
-     * 
- * - * - * .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.baremetalsolution.v2.VolumeSnapshot.Builder getVolumeSnapshotBuilder() { - - onChanged(); - return getVolumeSnapshotFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The volume snapshot to create. Only the description field may be specified.
-     * 
- * - * - * .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.baremetalsolution.v2.VolumeSnapshotOrBuilder - getVolumeSnapshotOrBuilder() { - if (volumeSnapshotBuilder_ != null) { - return volumeSnapshotBuilder_.getMessageOrBuilder(); - } else { - return volumeSnapshot_ == null - ? com.google.cloud.baremetalsolution.v2.VolumeSnapshot.getDefaultInstance() - : volumeSnapshot_; - } - } - /** - * - * - *
-     * Required. The volume snapshot to create. Only the description field may be specified.
-     * 
- * - * - * .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.baremetalsolution.v2.VolumeSnapshot, - com.google.cloud.baremetalsolution.v2.VolumeSnapshot.Builder, - com.google.cloud.baremetalsolution.v2.VolumeSnapshotOrBuilder> - getVolumeSnapshotFieldBuilder() { - if (volumeSnapshotBuilder_ == null) { - volumeSnapshotBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.baremetalsolution.v2.VolumeSnapshot, - com.google.cloud.baremetalsolution.v2.VolumeSnapshot.Builder, - com.google.cloud.baremetalsolution.v2.VolumeSnapshotOrBuilder>( - getVolumeSnapshot(), getParentForChildren(), isClean()); - volumeSnapshot_ = null; - } - return volumeSnapshotBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest) - private static final com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest(); - } - - public static com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateVolumeSnapshotRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateVolumeSnapshotRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/CreateVolumeSnapshotRequestOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/CreateVolumeSnapshotRequestOrBuilder.java deleted file mode 100644 index c1f7c177f0f6..000000000000 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/CreateVolumeSnapshotRequestOrBuilder.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto - -package com.google.cloud.baremetalsolution.v2; - -public interface CreateVolumeSnapshotRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The volume to snapshot.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The volume to snapshot.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Required. The volume snapshot to create. Only the description field may be specified.
-   * 
- * - * - * .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the volumeSnapshot field is set. - */ - boolean hasVolumeSnapshot(); - /** - * - * - *
-   * Required. The volume snapshot to create. Only the description field may be specified.
-   * 
- * - * - * .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The volumeSnapshot. - */ - com.google.cloud.baremetalsolution.v2.VolumeSnapshot getVolumeSnapshot(); - /** - * - * - *
-   * Required. The volume snapshot to create. Only the description field may be specified.
-   * 
- * - * - * .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.baremetalsolution.v2.VolumeSnapshotOrBuilder getVolumeSnapshotOrBuilder(); -} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/DeleteSnapshotSchedulePolicyRequest.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/DeleteSnapshotSchedulePolicyRequest.java deleted file mode 100644 index 0bef15d15461..000000000000 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/DeleteSnapshotSchedulePolicyRequest.java +++ /dev/null @@ -1,674 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto - -package com.google.cloud.baremetalsolution.v2; - -/** - * - * - *
- * Message for deleting a snapshot schedule policy in a project.
- * 
- * - * Protobuf type {@code google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest} - */ -public final class DeleteSnapshotSchedulePolicyRequest - extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest) - DeleteSnapshotSchedulePolicyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeleteSnapshotSchedulePolicyRequest.newBuilder() to construct. - private DeleteSnapshotSchedulePolicyRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DeleteSnapshotSchedulePolicyRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteSnapshotSchedulePolicyRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private DeleteSnapshotSchedulePolicyRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_DeleteSnapshotSchedulePolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_DeleteSnapshotSchedulePolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest.class, - com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest.Builder - .class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. The name of the snapshot schedule policy to delete.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The name of the snapshot schedule policy to delete.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest)) { - return super.equals(obj); - } - com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest other = - (com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Message for deleting a snapshot schedule policy in a project.
-   * 
- * - * Protobuf type {@code google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest) - com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_DeleteSnapshotSchedulePolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_DeleteSnapshotSchedulePolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest.class, - com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest.Builder - .class); - } - - // Construct using - // com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_DeleteSnapshotSchedulePolicyRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest - getDefaultInstanceForType() { - return com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest build() { - com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest - buildPartial() { - com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest result = - new com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest) { - return mergeFrom( - (com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest other) { - if (other - == com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest - .getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest parsedMessage = - null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The name of the snapshot schedule policy to delete.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The name of the snapshot schedule policy to delete.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The name of the snapshot schedule policy to delete.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The name of the snapshot schedule policy to delete.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The name of the snapshot schedule policy to delete.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest) - private static final com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest(); - } - - public static com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteSnapshotSchedulePolicyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteSnapshotSchedulePolicyRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListSnapshotSchedulePoliciesRequest.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/DetachLunRequest.java similarity index 52% rename from java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListSnapshotSchedulePoliciesRequest.java rename to java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/DetachLunRequest.java index 5cd29da888ce..ec51b3a7e798 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListSnapshotSchedulePoliciesRequest.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/DetachLunRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/instance.proto package com.google.cloud.baremetalsolution.v2; @@ -22,32 +22,30 @@ * * *
- * Message for requesting a list of snapshot schedule policies.
+ * Message for detach specific LUN from an Instance.
  * 
* - * Protobuf type {@code google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest} + * Protobuf type {@code google.cloud.baremetalsolution.v2.DetachLunRequest} */ -public final class ListSnapshotSchedulePoliciesRequest - extends com.google.protobuf.GeneratedMessageV3 +public final class DetachLunRequest extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest) - ListSnapshotSchedulePoliciesRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.DetachLunRequest) + DetachLunRequestOrBuilder { private static final long serialVersionUID = 0L; - // Use ListSnapshotSchedulePoliciesRequest.newBuilder() to construct. - private ListSnapshotSchedulePoliciesRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use DetachLunRequest.newBuilder() to construct. + private DetachLunRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ListSnapshotSchedulePoliciesRequest() { - parent_ = ""; - pageToken_ = ""; + private DetachLunRequest() { + instance_ = ""; + lun_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListSnapshotSchedulePoliciesRequest(); + return new DetachLunRequest(); } @java.lang.Override @@ -55,7 +53,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListSnapshotSchedulePoliciesRequest( + private DetachLunRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -77,19 +75,14 @@ private ListSnapshotSchedulePoliciesRequest( { java.lang.String s = input.readStringRequireUtf8(); - parent_ = s; + instance_ = s; break; } - case 16: - { - pageSize_ = input.readInt32(); - break; - } - case 26: + case 18: { java.lang.String s = input.readStringRequireUtf8(); - pageToken_ = s; + lun_ = s; break; } default: @@ -114,45 +107,44 @@ private ListSnapshotSchedulePoliciesRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_ListSnapshotSchedulePoliciesRequest_descriptor; + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_DetachLunRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_ListSnapshotSchedulePoliciesRequest_fieldAccessorTable + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_DetachLunRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest.class, - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest.Builder - .class); + com.google.cloud.baremetalsolution.v2.DetachLunRequest.class, + com.google.cloud.baremetalsolution.v2.DetachLunRequest.Builder.class); } - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; + public static final int INSTANCE_FIELD_NUMBER = 1; + private volatile java.lang.Object instance_; /** * * *
-   * Required. The parent project containing the Snapshot Schedule Policies.
+   * Required. Name of the instance.
    * 
* * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * - * @return The parent. + * @return The instance. */ @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; + public java.lang.String getInstance() { + java.lang.Object ref = instance_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - parent_ = s; + instance_ = s; return s; } } @@ -160,68 +152,52 @@ public java.lang.String getParent() { * * *
-   * Required. The parent project containing the Snapshot Schedule Policies.
+   * Required. Name of the instance.
    * 
* * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * - * @return The bytes for parent. + * @return The bytes for instance. */ @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; + public com.google.protobuf.ByteString getInstanceBytes() { + java.lang.Object ref = instance_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; + instance_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_; + public static final int LUN_FIELD_NUMBER = 2; + private volatile java.lang.Object lun_; /** * * *
-   * The maximum number of items to return.
+   * Required. Name of the Lun to detach.
    * 
* - * int32 page_size = 2; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - * - * - *
-   * The next_page_token value returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; + * + * string lun = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @return The pageToken. + * @return The lun. */ @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; + public java.lang.String getLun() { + java.lang.Object ref = lun_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; + lun_ = s; return s; } } @@ -229,20 +205,22 @@ public java.lang.String getPageToken() { * * *
-   * The next_page_token value returned from a previous List request, if any.
+   * Required. Name of the Lun to detach.
    * 
* - * string page_token = 3; + * + * string lun = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @return The bytes for pageToken. + * @return The bytes for lun. */ @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; + public com.google.protobuf.ByteString getLunBytes() { + java.lang.Object ref = lun_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; + lun_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -263,14 +241,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instance_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instance_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lun_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, lun_); } unknownFields.writeTo(output); } @@ -281,14 +256,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instance_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, instance_); } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lun_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, lun_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -300,16 +272,14 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj - instanceof com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest)) { + if (!(obj instanceof com.google.cloud.baremetalsolution.v2.DetachLunRequest)) { return super.equals(obj); } - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest other = - (com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest) obj; + com.google.cloud.baremetalsolution.v2.DetachLunRequest other = + (com.google.cloud.baremetalsolution.v2.DetachLunRequest) obj; - if (!getParent().equals(other.getParent())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; + if (!getInstance().equals(other.getInstance())) return false; + if (!getLun().equals(other.getLun())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -321,83 +291,80 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + hash = (37 * hash) + LUN_FIELD_NUMBER; + hash = (53 * hash) + getLun().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.DetachLunRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.DetachLunRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.DetachLunRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.DetachLunRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.baremetalsolution.v2.DetachLunRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.DetachLunRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.DetachLunRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.DetachLunRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + public static com.google.cloud.baremetalsolution.v2.DetachLunRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + public static com.google.cloud.baremetalsolution.v2.DetachLunRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.DetachLunRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.DetachLunRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -415,7 +382,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest prototype) { + com.google.cloud.baremetalsolution.v2.DetachLunRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -433,33 +400,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Message for requesting a list of snapshot schedule policies.
+   * Message for detach specific LUN from an Instance.
    * 
* - * Protobuf type {@code google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest} + * Protobuf type {@code google.cloud.baremetalsolution.v2.DetachLunRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest) - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.DetachLunRequest) + com.google.cloud.baremetalsolution.v2.DetachLunRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_ListSnapshotSchedulePoliciesRequest_descriptor; + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_DetachLunRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_ListSnapshotSchedulePoliciesRequest_fieldAccessorTable + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_DetachLunRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest.class, - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest.Builder - .class); + com.google.cloud.baremetalsolution.v2.DetachLunRequest.class, + com.google.cloud.baremetalsolution.v2.DetachLunRequest.Builder.class); } - // Construct using - // com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest.newBuilder() + // Construct using com.google.cloud.baremetalsolution.v2.DetachLunRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -476,32 +441,27 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - parent_ = ""; + instance_ = ""; - pageSize_ = 0; - - pageToken_ = ""; + lun_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_ListSnapshotSchedulePoliciesRequest_descriptor; + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_DetachLunRequest_descriptor; } @java.lang.Override - public com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest - getDefaultInstanceForType() { - return com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest - .getDefaultInstance(); + public com.google.cloud.baremetalsolution.v2.DetachLunRequest getDefaultInstanceForType() { + return com.google.cloud.baremetalsolution.v2.DetachLunRequest.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest build() { - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest result = - buildPartial(); + public com.google.cloud.baremetalsolution.v2.DetachLunRequest build() { + com.google.cloud.baremetalsolution.v2.DetachLunRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -509,13 +469,11 @@ public com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest } @java.lang.Override - public com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest - buildPartial() { - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest result = - new com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest(this); - result.parent_ = parent_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; + public com.google.cloud.baremetalsolution.v2.DetachLunRequest buildPartial() { + com.google.cloud.baremetalsolution.v2.DetachLunRequest result = + new com.google.cloud.baremetalsolution.v2.DetachLunRequest(this); + result.instance_ = instance_; + result.lun_ = lun_; onBuilt(); return result; } @@ -555,30 +513,23 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest) { - return mergeFrom( - (com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest) other); + if (other instanceof com.google.cloud.baremetalsolution.v2.DetachLunRequest) { + return mergeFrom((com.google.cloud.baremetalsolution.v2.DetachLunRequest) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom( - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest other) { - if (other - == com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest - .getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; + public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.DetachLunRequest other) { + if (other == com.google.cloud.baremetalsolution.v2.DetachLunRequest.getDefaultInstance()) + return this; + if (!other.getInstance().isEmpty()) { + instance_ = other.instance_; onChanged(); } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; + if (!other.getLun().isEmpty()) { + lun_ = other.lun_; onChanged(); } this.mergeUnknownFields(other.unknownFields); @@ -596,14 +547,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest parsedMessage = - null; + com.google.cloud.baremetalsolution.v2.DetachLunRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest) - e.getUnfinishedMessage(); + (com.google.cloud.baremetalsolution.v2.DetachLunRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -613,26 +562,26 @@ public Builder mergeFrom( return this; } - private java.lang.Object parent_ = ""; + private java.lang.Object instance_ = ""; /** * * *
-     * Required. The parent project containing the Snapshot Schedule Policies.
+     * Required. Name of the instance.
      * 
* * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * - * @return The parent. + * @return The instance. */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; + public java.lang.String getInstance() { + java.lang.Object ref = instance_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - parent_ = s; + instance_ = s; return s; } else { return (java.lang.String) ref; @@ -642,21 +591,21 @@ public java.lang.String getParent() { * * *
-     * Required. The parent project containing the Snapshot Schedule Policies.
+     * Required. Name of the instance.
      * 
* * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * - * @return The bytes for parent. + * @return The bytes for instance. */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; + public com.google.protobuf.ByteString getInstanceBytes() { + java.lang.Object ref = instance_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; + instance_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -666,22 +615,22 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-     * Required. The parent project containing the Snapshot Schedule Policies.
+     * Required. Name of the instance.
      * 
* * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * - * @param value The parent to set. + * @param value The instance to set. * @return This builder for chaining. */ - public Builder setParent(java.lang.String value) { + public Builder setInstance(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - parent_ = value; + instance_ = value; onChanged(); return this; } @@ -689,18 +638,18 @@ public Builder setParent(java.lang.String value) { * * *
-     * Required. The parent project containing the Snapshot Schedule Policies.
+     * Required. Name of the instance.
      * 
* * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * * @return This builder for chaining. */ - public Builder clearParent() { + public Builder clearInstance() { - parent_ = getDefaultInstance().getParent(); + instance_ = getDefaultInstance().getInstance(); onChanged(); return this; } @@ -708,97 +657,47 @@ public Builder clearParent() { * * *
-     * Required. The parent project containing the Snapshot Schedule Policies.
+     * Required. Name of the instance.
      * 
* * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * - * @param value The bytes for parent to set. + * @param value The bytes for instance to set. * @return This builder for chaining. */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { + public Builder setInstanceBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - parent_ = value; + instance_ = value; onChanged(); return this; } - private int pageSize_; - /** - * - * - *
-     * The maximum number of items to return.
-     * 
- * - * int32 page_size = 2; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } + private java.lang.Object lun_ = ""; /** * * *
-     * The maximum number of items to return.
+     * Required. Name of the Lun to detach.
      * 
* - * int32 page_size = 2; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The maximum number of items to return.
-     * 
- * - * int32 page_size = 2; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * The next_page_token value returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; + * + * string lun = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @return The pageToken. + * @return The lun. */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; + public java.lang.String getLun() { + java.lang.Object ref = lun_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; + lun_ = s; return s; } else { return (java.lang.String) ref; @@ -808,19 +707,21 @@ public java.lang.String getPageToken() { * * *
-     * The next_page_token value returned from a previous List request, if any.
+     * Required. Name of the Lun to detach.
      * 
* - * string page_token = 3; + * + * string lun = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @return The bytes for pageToken. + * @return The bytes for lun. */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; + public com.google.protobuf.ByteString getLunBytes() { + java.lang.Object ref = lun_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; + lun_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -830,20 +731,22 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *
-     * The next_page_token value returned from a previous List request, if any.
+     * Required. Name of the Lun to detach.
      * 
* - * string page_token = 3; + * + * string lun = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @param value The pageToken to set. + * @param value The lun to set. * @return This builder for chaining. */ - public Builder setPageToken(java.lang.String value) { + public Builder setLun(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - pageToken_ = value; + lun_ = value; onChanged(); return this; } @@ -851,16 +754,18 @@ public Builder setPageToken(java.lang.String value) { * * *
-     * The next_page_token value returned from a previous List request, if any.
+     * Required. Name of the Lun to detach.
      * 
* - * string page_token = 3; + * + * string lun = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ - public Builder clearPageToken() { + public Builder clearLun() { - pageToken_ = getDefaultInstance().getPageToken(); + lun_ = getDefaultInstance().getLun(); onChanged(); return this; } @@ -868,21 +773,23 @@ public Builder clearPageToken() { * * *
-     * The next_page_token value returned from a previous List request, if any.
+     * Required. Name of the Lun to detach.
      * 
* - * string page_token = 3; + * + * string lun = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @param value The bytes for pageToken to set. + * @param value The bytes for lun to set. * @return This builder for chaining. */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + public Builder setLunBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - pageToken_ = value; + lun_ = value; onChanged(); return this; } @@ -898,46 +805,42 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest) + // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.DetachLunRequest) } - // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest) - private static final com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest - DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.DetachLunRequest) + private static final com.google.cloud.baremetalsolution.v2.DetachLunRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = - new com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest(); + DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.DetachLunRequest(); } - public static com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest - getDefaultInstance() { + public static com.google.cloud.baremetalsolution.v2.DetachLunRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public ListSnapshotSchedulePoliciesRequest parsePartialFrom( + public DetachLunRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListSnapshotSchedulePoliciesRequest(input, extensionRegistry); + return new DetachLunRequest(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest - getDefaultInstanceForType() { + public com.google.cloud.baremetalsolution.v2.DetachLunRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/DetachLunRequestOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/DetachLunRequestOrBuilder.java new file mode 100644 index 000000000000..75fbf2515518 --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/DetachLunRequestOrBuilder.java @@ -0,0 +1,83 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/baremetalsolution/v2/instance.proto + +package com.google.cloud.baremetalsolution.v2; + +public interface DetachLunRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.DetachLunRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the instance.
+   * 
+ * + * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The instance. + */ + java.lang.String getInstance(); + /** + * + * + *
+   * Required. Name of the instance.
+   * 
+ * + * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for instance. + */ + com.google.protobuf.ByteString getInstanceBytes(); + + /** + * + * + *
+   * Required. Name of the Lun to detach.
+   * 
+ * + * + * string lun = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The lun. + */ + java.lang.String getLun(); + /** + * + * + *
+   * Required. Name of the Lun to detach.
+   * 
+ * + * + * string lun = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for lun. + */ + com.google.protobuf.ByteString getLunBytes(); +} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetInstanceRequest.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetInstanceRequest.java index a5a64a352852..5990f0fd4a64 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetInstanceRequest.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetInstanceRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/instance.proto package com.google.cloud.baremetalsolution.v2; @@ -99,14 +99,14 @@ private GetInstanceRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.InstanceProto .internal_static_google_cloud_baremetalsolution_v2_GetInstanceRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.InstanceProto .internal_static_google_cloud_baremetalsolution_v2_GetInstanceRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.GetInstanceRequest.class, @@ -340,14 +340,14 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.GetInstanceRequest) com.google.cloud.baremetalsolution.v2.GetInstanceRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.InstanceProto .internal_static_google_cloud_baremetalsolution_v2_GetInstanceRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.InstanceProto .internal_static_google_cloud_baremetalsolution_v2_GetInstanceRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.GetInstanceRequest.class, @@ -378,7 +378,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.InstanceProto .internal_static_google_cloud_baremetalsolution_v2_GetInstanceRequest_descriptor; } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetInstanceRequestOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetInstanceRequestOrBuilder.java index 6807678ef6c0..cc92dbb90b65 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetInstanceRequestOrBuilder.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetInstanceRequestOrBuilder.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/instance.proto package com.google.cloud.baremetalsolution.v2; diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetLunRequest.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetLunRequest.java index 2a59fb40d538..4f0939be38a5 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetLunRequest.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetLunRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/lun.proto package com.google.cloud.baremetalsolution.v2; @@ -99,14 +99,14 @@ private GetLunRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.LunProto .internal_static_google_cloud_baremetalsolution_v2_GetLunRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.LunProto .internal_static_google_cloud_baremetalsolution_v2_GetLunRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.GetLunRequest.class, @@ -339,14 +339,14 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.GetLunRequest) com.google.cloud.baremetalsolution.v2.GetLunRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.LunProto .internal_static_google_cloud_baremetalsolution_v2_GetLunRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.LunProto .internal_static_google_cloud_baremetalsolution_v2_GetLunRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.GetLunRequest.class, @@ -377,7 +377,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.LunProto .internal_static_google_cloud_baremetalsolution_v2_GetLunRequest_descriptor; } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetLunRequestOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetLunRequestOrBuilder.java index 79cfa9398117..9f97c73728be 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetLunRequestOrBuilder.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetLunRequestOrBuilder.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/lun.proto package com.google.cloud.baremetalsolution.v2; diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetNetworkRequest.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetNetworkRequest.java index 98acf8bd51ff..c7048acbc299 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetNetworkRequest.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetNetworkRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/network.proto package com.google.cloud.baremetalsolution.v2; @@ -99,14 +99,14 @@ private GetNetworkRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_GetNetworkRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_GetNetworkRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.GetNetworkRequest.class, @@ -340,14 +340,14 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.GetNetworkRequest) com.google.cloud.baremetalsolution.v2.GetNetworkRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_GetNetworkRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_GetNetworkRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.GetNetworkRequest.class, @@ -378,7 +378,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_GetNetworkRequest_descriptor; } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetNetworkRequestOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetNetworkRequestOrBuilder.java index 447c29518c3d..c619b65360d1 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetNetworkRequestOrBuilder.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetNetworkRequestOrBuilder.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/network.proto package com.google.cloud.baremetalsolution.v2; diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetVolumeSnapshotRequest.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetNfsShareRequest.java similarity index 75% rename from java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetVolumeSnapshotRequest.java rename to java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetNfsShareRequest.java index 5a469da30a0f..30fffbfc6a14 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetVolumeSnapshotRequest.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetNfsShareRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/nfs_share.proto package com.google.cloud.baremetalsolution.v2; @@ -22,29 +22,29 @@ * * *
- * Message for requesting storage volume snapshot information.
+ * Message for requesting NFS share information.
  * 
* - * Protobuf type {@code google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest} + * Protobuf type {@code google.cloud.baremetalsolution.v2.GetNfsShareRequest} */ -public final class GetVolumeSnapshotRequest extends com.google.protobuf.GeneratedMessageV3 +public final class GetNfsShareRequest extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest) - GetVolumeSnapshotRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.GetNfsShareRequest) + GetNfsShareRequestOrBuilder { private static final long serialVersionUID = 0L; - // Use GetVolumeSnapshotRequest.newBuilder() to construct. - private GetVolumeSnapshotRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use GetNfsShareRequest.newBuilder() to construct. + private GetNfsShareRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private GetVolumeSnapshotRequest() { + private GetNfsShareRequest() { name_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetVolumeSnapshotRequest(); + return new GetNfsShareRequest(); } @java.lang.Override @@ -52,7 +52,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetVolumeSnapshotRequest( + private GetNfsShareRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -99,18 +99,18 @@ private GetVolumeSnapshotRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_GetVolumeSnapshotRequest_descriptor; + return com.google.cloud.baremetalsolution.v2.NfsShareProto + .internal_static_google_cloud_baremetalsolution_v2_GetNfsShareRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_GetVolumeSnapshotRequest_fieldAccessorTable + return com.google.cloud.baremetalsolution.v2.NfsShareProto + .internal_static_google_cloud_baremetalsolution_v2_GetNfsShareRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest.class, - com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest.Builder.class); + com.google.cloud.baremetalsolution.v2.GetNfsShareRequest.class, + com.google.cloud.baremetalsolution.v2.GetNfsShareRequest.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; @@ -205,11 +205,11 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest)) { + if (!(obj instanceof com.google.cloud.baremetalsolution.v2.GetNfsShareRequest)) { return super.equals(obj); } - com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest other = - (com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest) obj; + com.google.cloud.baremetalsolution.v2.GetNfsShareRequest other = + (com.google.cloud.baremetalsolution.v2.GetNfsShareRequest) obj; if (!getName().equals(other.getName())) return false; if (!unknownFields.equals(other.unknownFields)) return false; @@ -230,71 +230,71 @@ public int hashCode() { return hash; } - public static com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.GetNfsShareRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.GetNfsShareRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.GetNfsShareRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.GetNfsShareRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.baremetalsolution.v2.GetNfsShareRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.GetNfsShareRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.GetNfsShareRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.GetNfsShareRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest parseDelimitedFrom( + public static com.google.cloud.baremetalsolution.v2.GetNfsShareRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest parseDelimitedFrom( + public static com.google.cloud.baremetalsolution.v2.GetNfsShareRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.GetNfsShareRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.GetNfsShareRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -312,7 +312,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest prototype) { + com.google.cloud.baremetalsolution.v2.GetNfsShareRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -330,31 +330,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Message for requesting storage volume snapshot information.
+   * Message for requesting NFS share information.
    * 
* - * Protobuf type {@code google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest} + * Protobuf type {@code google.cloud.baremetalsolution.v2.GetNfsShareRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest) - com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.GetNfsShareRequest) + com.google.cloud.baremetalsolution.v2.GetNfsShareRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_GetVolumeSnapshotRequest_descriptor; + return com.google.cloud.baremetalsolution.v2.NfsShareProto + .internal_static_google_cloud_baremetalsolution_v2_GetNfsShareRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_GetVolumeSnapshotRequest_fieldAccessorTable + return com.google.cloud.baremetalsolution.v2.NfsShareProto + .internal_static_google_cloud_baremetalsolution_v2_GetNfsShareRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest.class, - com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest.Builder.class); + com.google.cloud.baremetalsolution.v2.GetNfsShareRequest.class, + com.google.cloud.baremetalsolution.v2.GetNfsShareRequest.Builder.class); } - // Construct using com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest.newBuilder() + // Construct using com.google.cloud.baremetalsolution.v2.GetNfsShareRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -378,19 +378,18 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_GetVolumeSnapshotRequest_descriptor; + return com.google.cloud.baremetalsolution.v2.NfsShareProto + .internal_static_google_cloud_baremetalsolution_v2_GetNfsShareRequest_descriptor; } @java.lang.Override - public com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest - getDefaultInstanceForType() { - return com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest.getDefaultInstance(); + public com.google.cloud.baremetalsolution.v2.GetNfsShareRequest getDefaultInstanceForType() { + return com.google.cloud.baremetalsolution.v2.GetNfsShareRequest.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest build() { - com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest result = buildPartial(); + public com.google.cloud.baremetalsolution.v2.GetNfsShareRequest build() { + com.google.cloud.baremetalsolution.v2.GetNfsShareRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -398,9 +397,9 @@ public com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest build() { } @java.lang.Override - public com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest buildPartial() { - com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest result = - new com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest(this); + public com.google.cloud.baremetalsolution.v2.GetNfsShareRequest buildPartial() { + com.google.cloud.baremetalsolution.v2.GetNfsShareRequest result = + new com.google.cloud.baremetalsolution.v2.GetNfsShareRequest(this); result.name_ = name_; onBuilt(); return result; @@ -441,17 +440,16 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest) { - return mergeFrom((com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest) other); + if (other instanceof com.google.cloud.baremetalsolution.v2.GetNfsShareRequest) { + return mergeFrom((com.google.cloud.baremetalsolution.v2.GetNfsShareRequest) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest other) { - if (other - == com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.GetNfsShareRequest other) { + if (other == com.google.cloud.baremetalsolution.v2.GetNfsShareRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; @@ -472,13 +470,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest parsedMessage = null; + com.google.cloud.baremetalsolution.v2.GetNfsShareRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest) - e.getUnfinishedMessage(); + (com.google.cloud.baremetalsolution.v2.GetNfsShareRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -615,45 +612,42 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest) + // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.GetNfsShareRequest) } - // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest) - private static final com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest - DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.GetNfsShareRequest) + private static final com.google.cloud.baremetalsolution.v2.GetNfsShareRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest(); + DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.GetNfsShareRequest(); } - public static com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest - getDefaultInstance() { + public static com.google.cloud.baremetalsolution.v2.GetNfsShareRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public GetVolumeSnapshotRequest parsePartialFrom( + public GetNfsShareRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetVolumeSnapshotRequest(input, extensionRegistry); + return new GetNfsShareRequest(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest - getDefaultInstanceForType() { + public com.google.cloud.baremetalsolution.v2.GetNfsShareRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetVolumeSnapshotRequestOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetNfsShareRequestOrBuilder.java similarity index 89% rename from java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetVolumeSnapshotRequestOrBuilder.java rename to java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetNfsShareRequestOrBuilder.java index a96e1f1c923a..072571ed4604 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetVolumeSnapshotRequestOrBuilder.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetNfsShareRequestOrBuilder.java @@ -14,13 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/nfs_share.proto package com.google.cloud.baremetalsolution.v2; -public interface GetVolumeSnapshotRequestOrBuilder +public interface GetNfsShareRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest) + // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.GetNfsShareRequest) com.google.protobuf.MessageOrBuilder { /** diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetVolumeRequest.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetVolumeRequest.java index d14bf53e6cbc..1a670e544d08 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetVolumeRequest.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetVolumeRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/volume.proto package com.google.cloud.baremetalsolution.v2; @@ -99,14 +99,14 @@ private GetVolumeRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_GetVolumeRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_GetVolumeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.GetVolumeRequest.class, @@ -340,14 +340,14 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.GetVolumeRequest) com.google.cloud.baremetalsolution.v2.GetVolumeRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_GetVolumeRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_GetVolumeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.GetVolumeRequest.class, @@ -378,7 +378,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_GetVolumeRequest_descriptor; } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetVolumeRequestOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetVolumeRequestOrBuilder.java index 21de24dbe080..9830fba5ae4e 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetVolumeRequestOrBuilder.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetVolumeRequestOrBuilder.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/volume.proto package com.google.cloud.baremetalsolution.v2; diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/Instance.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/Instance.java index 5c64c889e919..66c8eeb44960 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/Instance.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/Instance.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/instance.proto package com.google.cloud.baremetalsolution.v2; @@ -39,10 +39,15 @@ private Instance(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Instance() { name_ = ""; + id_ = ""; machineType_ = ""; state_ = 0; luns_ = java.util.Collections.emptyList(); networks_ = java.util.Collections.emptyList(); + osImage_ = ""; + pod_ = ""; + networkTemplate_ = ""; + logicalInterfaces_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -172,6 +177,48 @@ private Instance( interactiveSerialConsoleEnabled_ = input.readBool(); break; } + case 90: + { + java.lang.String s = input.readStringRequireUtf8(); + + id_ = s; + break; + } + case 98: + { + java.lang.String s = input.readStringRequireUtf8(); + + osImage_ = s; + break; + } + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + + pod_ = s; + break; + } + case 114: + { + java.lang.String s = input.readStringRequireUtf8(); + + networkTemplate_ = s; + break; + } + case 122: + { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + logicalInterfaces_ = + new java.util.ArrayList< + com.google.cloud.baremetalsolution.v2.LogicalInterface>(); + mutable_bitField0_ |= 0x00000008; + } + logicalInterfaces_.add( + input.readMessage( + com.google.cloud.baremetalsolution.v2.LogicalInterface.parser(), + extensionRegistry)); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -194,13 +241,16 @@ private Instance( if (((mutable_bitField0_ & 0x00000004) != 0)) { networks_ = java.util.Collections.unmodifiableList(networks_); } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + logicalInterfaces_ = java.util.Collections.unmodifiableList(logicalInterfaces_); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.InstanceProto .internal_static_google_cloud_baremetalsolution_v2_Instance_descriptor; } @@ -218,7 +268,7 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.InstanceProto .internal_static_google_cloud_baremetalsolution_v2_Instance_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.Instance.class, @@ -461,6 +511,55 @@ public com.google.protobuf.ByteString getNameBytes() { } } + public static final int ID_FIELD_NUMBER = 11; + private volatile java.lang.Object id_; + /** + * + * + *
+   * An identifier for the `Instance`, generated by the backend.
+   * 
+ * + * string id = 11; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * + * + *
+   * An identifier for the `Instance`, generated by the backend.
+   * 
+ * + * string id = 11; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int CREATE_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp createTime_; /** @@ -674,7 +773,7 @@ public boolean getHyperthreadingEnabled() { private static final class LabelsDefaultEntryHolder { static final com.google.protobuf.MapEntry defaultEntry = com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + com.google.cloud.baremetalsolution.v2.InstanceProto .internal_static_google_cloud_baremetalsolution_v2_Instance_LabelsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", @@ -925,6 +1024,269 @@ public boolean getInteractiveSerialConsoleEnabled() { return interactiveSerialConsoleEnabled_; } + public static final int OS_IMAGE_FIELD_NUMBER = 12; + private volatile java.lang.Object osImage_; + /** + * + * + *
+   * The OS image currently installed on the server.
+   * 
+ * + * string os_image = 12; + * + * @return The osImage. + */ + @java.lang.Override + public java.lang.String getOsImage() { + java.lang.Object ref = osImage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osImage_ = s; + return s; + } + } + /** + * + * + *
+   * The OS image currently installed on the server.
+   * 
+ * + * string os_image = 12; + * + * @return The bytes for osImage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOsImageBytes() { + java.lang.Object ref = osImage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osImage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POD_FIELD_NUMBER = 13; + private volatile java.lang.Object pod_; + /** + * + * + *
+   * Immutable. Pod name.
+   * Pod is an independent part of infrastructure.
+   * Instance can be connected to the assets (networks, volumes) allocated
+   * in the same pod only.
+   * 
+ * + * string pod = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The pod. + */ + @java.lang.Override + public java.lang.String getPod() { + java.lang.Object ref = pod_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pod_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. Pod name.
+   * Pod is an independent part of infrastructure.
+   * Instance can be connected to the assets (networks, volumes) allocated
+   * in the same pod only.
+   * 
+ * + * string pod = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for pod. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPodBytes() { + java.lang.Object ref = pod_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pod_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_TEMPLATE_FIELD_NUMBER = 14; + private volatile java.lang.Object networkTemplate_; + /** + * + * + *
+   * Instance network template name. For eg, bondaa-bondaa, bondab-nic, etc.
+   * Generally, the template name follows the syntax of
+   * "bond<bond_mode>" or "nic".
+   * 
+ * + * string network_template = 14 [(.google.api.resource_reference) = { ... } + * + * @return The networkTemplate. + */ + @java.lang.Override + public java.lang.String getNetworkTemplate() { + java.lang.Object ref = networkTemplate_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkTemplate_ = s; + return s; + } + } + /** + * + * + *
+   * Instance network template name. For eg, bondaa-bondaa, bondab-nic, etc.
+   * Generally, the template name follows the syntax of
+   * "bond<bond_mode>" or "nic".
+   * 
+ * + * string network_template = 14 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for networkTemplate. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkTemplateBytes() { + java.lang.Object ref = networkTemplate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOGICAL_INTERFACES_FIELD_NUMBER = 15; + private java.util.List logicalInterfaces_; + /** + * + * + *
+   * List of logical interfaces for the instance. The number of logical
+   * interfaces will be the same as number of hardware bond/nic on the chosen
+   * network template. For the non-multivlan configurations (for eg, existing
+   * servers) that use existing default network template (bondaa-bondaa), both
+   * the Instance.networks field and the Instance.logical_interfaces fields will
+   * be filled to ensure backward compatibility. For the others, only
+   * Instance.logical_interfaces will be filled.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; + * + */ + @java.lang.Override + public java.util.List + getLogicalInterfacesList() { + return logicalInterfaces_; + } + /** + * + * + *
+   * List of logical interfaces for the instance. The number of logical
+   * interfaces will be the same as number of hardware bond/nic on the chosen
+   * network template. For the non-multivlan configurations (for eg, existing
+   * servers) that use existing default network template (bondaa-bondaa), both
+   * the Instance.networks field and the Instance.logical_interfaces fields will
+   * be filled to ensure backward compatibility. For the others, only
+   * Instance.logical_interfaces will be filled.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; + * + */ + @java.lang.Override + public java.util.List + getLogicalInterfacesOrBuilderList() { + return logicalInterfaces_; + } + /** + * + * + *
+   * List of logical interfaces for the instance. The number of logical
+   * interfaces will be the same as number of hardware bond/nic on the chosen
+   * network template. For the non-multivlan configurations (for eg, existing
+   * servers) that use existing default network template (bondaa-bondaa), both
+   * the Instance.networks field and the Instance.logical_interfaces fields will
+   * be filled to ensure backward compatibility. For the others, only
+   * Instance.logical_interfaces will be filled.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; + * + */ + @java.lang.Override + public int getLogicalInterfacesCount() { + return logicalInterfaces_.size(); + } + /** + * + * + *
+   * List of logical interfaces for the instance. The number of logical
+   * interfaces will be the same as number of hardware bond/nic on the chosen
+   * network template. For the non-multivlan configurations (for eg, existing
+   * servers) that use existing default network template (bondaa-bondaa), both
+   * the Instance.networks field and the Instance.logical_interfaces fields will
+   * be filled to ensure backward compatibility. For the others, only
+   * Instance.logical_interfaces will be filled.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; + * + */ + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.LogicalInterface getLogicalInterfaces(int index) { + return logicalInterfaces_.get(index); + } + /** + * + * + *
+   * List of logical interfaces for the instance. The number of logical
+   * interfaces will be the same as number of hardware bond/nic on the chosen
+   * network template. For the non-multivlan configurations (for eg, existing
+   * servers) that use existing default network template (bondaa-bondaa), both
+   * the Instance.networks field and the Instance.logical_interfaces fields will
+   * be filled to ensure backward compatibility. For the others, only
+   * Instance.logical_interfaces will be filled.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; + * + */ + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.LogicalInterfaceOrBuilder + getLogicalInterfacesOrBuilder(int index) { + return logicalInterfaces_.get(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -969,6 +1331,21 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (interactiveSerialConsoleEnabled_ != false) { output.writeBool(10, interactiveSerialConsoleEnabled_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(osImage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, osImage_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pod_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, pod_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkTemplate_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, networkTemplate_); + } + for (int i = 0; i < logicalInterfaces_.size(); i++) { + output.writeMessage(15, logicalInterfaces_.get(i)); + } unknownFields.writeTo(output); } @@ -1018,6 +1395,22 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeBoolSize( 10, interactiveSerialConsoleEnabled_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(osImage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, osImage_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pod_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, pod_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkTemplate_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, networkTemplate_); + } + for (int i = 0; i < logicalInterfaces_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(15, logicalInterfaces_.get(i)); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1035,6 +1428,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.baremetalsolution.v2.Instance) obj; if (!getName().equals(other.getName())) return false; + if (!getId().equals(other.getId())) return false; if (hasCreateTime() != other.hasCreateTime()) return false; if (hasCreateTime()) { if (!getCreateTime().equals(other.getCreateTime())) return false; @@ -1051,6 +1445,10 @@ public boolean equals(final java.lang.Object obj) { if (!getNetworksList().equals(other.getNetworksList())) return false; if (getInteractiveSerialConsoleEnabled() != other.getInteractiveSerialConsoleEnabled()) return false; + if (!getOsImage().equals(other.getOsImage())) return false; + if (!getPod().equals(other.getPod())) return false; + if (!getNetworkTemplate().equals(other.getNetworkTemplate())) return false; + if (!getLogicalInterfacesList().equals(other.getLogicalInterfacesList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -1064,6 +1462,8 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); if (hasCreateTime()) { hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getCreateTime().hashCode(); @@ -1094,6 +1494,16 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getInteractiveSerialConsoleEnabled()); + hash = (37 * hash) + OS_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getOsImage().hashCode(); + hash = (37 * hash) + POD_FIELD_NUMBER; + hash = (53 * hash) + getPod().hashCode(); + hash = (37 * hash) + NETWORK_TEMPLATE_FIELD_NUMBER; + hash = (53 * hash) + getNetworkTemplate().hashCode(); + if (getLogicalInterfacesCount() > 0) { + hash = (37 * hash) + LOGICAL_INTERFACES_FIELD_NUMBER; + hash = (53 * hash) + getLogicalInterfacesList().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -1208,7 +1618,7 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.Instance) com.google.cloud.baremetalsolution.v2.InstanceOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.InstanceProto .internal_static_google_cloud_baremetalsolution_v2_Instance_descriptor; } @@ -1235,7 +1645,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.InstanceProto .internal_static_google_cloud_baremetalsolution_v2_Instance_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.Instance.class, @@ -1256,6 +1666,7 @@ private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getLunsFieldBuilder(); getNetworksFieldBuilder(); + getLogicalInterfacesFieldBuilder(); } } @@ -1264,6 +1675,8 @@ public Builder clear() { super.clear(); name_ = ""; + id_ = ""; + if (createTimeBuilder_ == null) { createTime_ = null; } else { @@ -1297,12 +1710,24 @@ public Builder clear() { } interactiveSerialConsoleEnabled_ = false; + osImage_ = ""; + + pod_ = ""; + + networkTemplate_ = ""; + + if (logicalInterfacesBuilder_ == null) { + logicalInterfaces_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + logicalInterfacesBuilder_.clear(); + } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.InstanceProto .internal_static_google_cloud_baremetalsolution_v2_Instance_descriptor; } @@ -1326,6 +1751,7 @@ public com.google.cloud.baremetalsolution.v2.Instance buildPartial() { new com.google.cloud.baremetalsolution.v2.Instance(this); int from_bitField0_ = bitField0_; result.name_ = name_; + result.id_ = id_; if (createTimeBuilder_ == null) { result.createTime_ = createTime_; } else { @@ -1360,6 +1786,18 @@ public com.google.cloud.baremetalsolution.v2.Instance buildPartial() { result.networks_ = networksBuilder_.build(); } result.interactiveSerialConsoleEnabled_ = interactiveSerialConsoleEnabled_; + result.osImage_ = osImage_; + result.pod_ = pod_; + result.networkTemplate_ = networkTemplate_; + if (logicalInterfacesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + logicalInterfaces_ = java.util.Collections.unmodifiableList(logicalInterfaces_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.logicalInterfaces_ = logicalInterfaces_; + } else { + result.logicalInterfaces_ = logicalInterfacesBuilder_.build(); + } onBuilt(); return result; } @@ -1413,6 +1851,10 @@ public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.Instance other) { name_ = other.name_; onChanged(); } + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } if (other.hasCreateTime()) { mergeCreateTime(other.getCreateTime()); } @@ -1487,22 +1929,61 @@ public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.Instance other) { if (other.getInteractiveSerialConsoleEnabled() != false) { setInteractiveSerialConsoleEnabled(other.getInteractiveSerialConsoleEnabled()); } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.baremetalsolution.v2.Instance parsedMessage = null; + if (!other.getOsImage().isEmpty()) { + osImage_ = other.osImage_; + onChanged(); + } + if (!other.getPod().isEmpty()) { + pod_ = other.pod_; + onChanged(); + } + if (!other.getNetworkTemplate().isEmpty()) { + networkTemplate_ = other.networkTemplate_; + onChanged(); + } + if (logicalInterfacesBuilder_ == null) { + if (!other.logicalInterfaces_.isEmpty()) { + if (logicalInterfaces_.isEmpty()) { + logicalInterfaces_ = other.logicalInterfaces_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureLogicalInterfacesIsMutable(); + logicalInterfaces_.addAll(other.logicalInterfaces_); + } + onChanged(); + } + } else { + if (!other.logicalInterfaces_.isEmpty()) { + if (logicalInterfacesBuilder_.isEmpty()) { + logicalInterfacesBuilder_.dispose(); + logicalInterfacesBuilder_ = null; + logicalInterfaces_ = other.logicalInterfaces_; + bitField0_ = (bitField0_ & ~0x00000008); + logicalInterfacesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getLogicalInterfacesFieldBuilder() + : null; + } else { + logicalInterfacesBuilder_.addAllMessages(other.logicalInterfaces_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.baremetalsolution.v2.Instance parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -1644,6 +2125,112 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object id_ = ""; + /** + * + * + *
+     * An identifier for the `Instance`, generated by the backend.
+     * 
+ * + * string id = 11; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * An identifier for the `Instance`, generated by the backend.
+     * 
+ * + * string id = 11; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * An identifier for the `Instance`, generated by the backend.
+     * 
+ * + * string id = 11; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * An identifier for the `Instance`, generated by the backend.
+     * 
+ * + * string id = 11; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * + * + *
+     * An identifier for the `Instance`, generated by the backend.
+     * 
+ * + * string id = 11; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + private com.google.protobuf.Timestamp createTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, @@ -3225,6 +3812,840 @@ public Builder clearInteractiveSerialConsoleEnabled() { return this; } + private java.lang.Object osImage_ = ""; + /** + * + * + *
+     * The OS image currently installed on the server.
+     * 
+ * + * string os_image = 12; + * + * @return The osImage. + */ + public java.lang.String getOsImage() { + java.lang.Object ref = osImage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osImage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The OS image currently installed on the server.
+     * 
+ * + * string os_image = 12; + * + * @return The bytes for osImage. + */ + public com.google.protobuf.ByteString getOsImageBytes() { + java.lang.Object ref = osImage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osImage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The OS image currently installed on the server.
+     * 
+ * + * string os_image = 12; + * + * @param value The osImage to set. + * @return This builder for chaining. + */ + public Builder setOsImage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + osImage_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The OS image currently installed on the server.
+     * 
+ * + * string os_image = 12; + * + * @return This builder for chaining. + */ + public Builder clearOsImage() { + + osImage_ = getDefaultInstance().getOsImage(); + onChanged(); + return this; + } + /** + * + * + *
+     * The OS image currently installed on the server.
+     * 
+ * + * string os_image = 12; + * + * @param value The bytes for osImage to set. + * @return This builder for chaining. + */ + public Builder setOsImageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + osImage_ = value; + onChanged(); + return this; + } + + private java.lang.Object pod_ = ""; + /** + * + * + *
+     * Immutable. Pod name.
+     * Pod is an independent part of infrastructure.
+     * Instance can be connected to the assets (networks, volumes) allocated
+     * in the same pod only.
+     * 
+ * + * string pod = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The pod. + */ + public java.lang.String getPod() { + java.lang.Object ref = pod_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pod_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. Pod name.
+     * Pod is an independent part of infrastructure.
+     * Instance can be connected to the assets (networks, volumes) allocated
+     * in the same pod only.
+     * 
+ * + * string pod = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for pod. + */ + public com.google.protobuf.ByteString getPodBytes() { + java.lang.Object ref = pod_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pod_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. Pod name.
+     * Pod is an independent part of infrastructure.
+     * Instance can be connected to the assets (networks, volumes) allocated
+     * in the same pod only.
+     * 
+ * + * string pod = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The pod to set. + * @return This builder for chaining. + */ + public Builder setPod(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pod_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Pod name.
+     * Pod is an independent part of infrastructure.
+     * Instance can be connected to the assets (networks, volumes) allocated
+     * in the same pod only.
+     * 
+ * + * string pod = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearPod() { + + pod_ = getDefaultInstance().getPod(); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Pod name.
+     * Pod is an independent part of infrastructure.
+     * Instance can be connected to the assets (networks, volumes) allocated
+     * in the same pod only.
+     * 
+ * + * string pod = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for pod to set. + * @return This builder for chaining. + */ + public Builder setPodBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pod_ = value; + onChanged(); + return this; + } + + private java.lang.Object networkTemplate_ = ""; + /** + * + * + *
+     * Instance network template name. For eg, bondaa-bondaa, bondab-nic, etc.
+     * Generally, the template name follows the syntax of
+     * "bond<bond_mode>" or "nic".
+     * 
+ * + * string network_template = 14 [(.google.api.resource_reference) = { ... } + * + * @return The networkTemplate. + */ + public java.lang.String getNetworkTemplate() { + java.lang.Object ref = networkTemplate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkTemplate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Instance network template name. For eg, bondaa-bondaa, bondab-nic, etc.
+     * Generally, the template name follows the syntax of
+     * "bond<bond_mode>" or "nic".
+     * 
+ * + * string network_template = 14 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for networkTemplate. + */ + public com.google.protobuf.ByteString getNetworkTemplateBytes() { + java.lang.Object ref = networkTemplate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Instance network template name. For eg, bondaa-bondaa, bondab-nic, etc.
+     * Generally, the template name follows the syntax of
+     * "bond<bond_mode>" or "nic".
+     * 
+ * + * string network_template = 14 [(.google.api.resource_reference) = { ... } + * + * @param value The networkTemplate to set. + * @return This builder for chaining. + */ + public Builder setNetworkTemplate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + networkTemplate_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Instance network template name. For eg, bondaa-bondaa, bondab-nic, etc.
+     * Generally, the template name follows the syntax of
+     * "bond<bond_mode>" or "nic".
+     * 
+ * + * string network_template = 14 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearNetworkTemplate() { + + networkTemplate_ = getDefaultInstance().getNetworkTemplate(); + onChanged(); + return this; + } + /** + * + * + *
+     * Instance network template name. For eg, bondaa-bondaa, bondab-nic, etc.
+     * Generally, the template name follows the syntax of
+     * "bond<bond_mode>" or "nic".
+     * 
+ * + * string network_template = 14 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for networkTemplate to set. + * @return This builder for chaining. + */ + public Builder setNetworkTemplateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + networkTemplate_ = value; + onChanged(); + return this; + } + + private java.util.List + logicalInterfaces_ = java.util.Collections.emptyList(); + + private void ensureLogicalInterfacesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + logicalInterfaces_ = + new java.util.ArrayList( + logicalInterfaces_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.baremetalsolution.v2.LogicalInterface, + com.google.cloud.baremetalsolution.v2.LogicalInterface.Builder, + com.google.cloud.baremetalsolution.v2.LogicalInterfaceOrBuilder> + logicalInterfacesBuilder_; + + /** + * + * + *
+     * List of logical interfaces for the instance. The number of logical
+     * interfaces will be the same as number of hardware bond/nic on the chosen
+     * network template. For the non-multivlan configurations (for eg, existing
+     * servers) that use existing default network template (bondaa-bondaa), both
+     * the Instance.networks field and the Instance.logical_interfaces fields will
+     * be filled to ensure backward compatibility. For the others, only
+     * Instance.logical_interfaces will be filled.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; + * + */ + public java.util.List + getLogicalInterfacesList() { + if (logicalInterfacesBuilder_ == null) { + return java.util.Collections.unmodifiableList(logicalInterfaces_); + } else { + return logicalInterfacesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of logical interfaces for the instance. The number of logical
+     * interfaces will be the same as number of hardware bond/nic on the chosen
+     * network template. For the non-multivlan configurations (for eg, existing
+     * servers) that use existing default network template (bondaa-bondaa), both
+     * the Instance.networks field and the Instance.logical_interfaces fields will
+     * be filled to ensure backward compatibility. For the others, only
+     * Instance.logical_interfaces will be filled.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; + * + */ + public int getLogicalInterfacesCount() { + if (logicalInterfacesBuilder_ == null) { + return logicalInterfaces_.size(); + } else { + return logicalInterfacesBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of logical interfaces for the instance. The number of logical
+     * interfaces will be the same as number of hardware bond/nic on the chosen
+     * network template. For the non-multivlan configurations (for eg, existing
+     * servers) that use existing default network template (bondaa-bondaa), both
+     * the Instance.networks field and the Instance.logical_interfaces fields will
+     * be filled to ensure backward compatibility. For the others, only
+     * Instance.logical_interfaces will be filled.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; + * + */ + public com.google.cloud.baremetalsolution.v2.LogicalInterface getLogicalInterfaces(int index) { + if (logicalInterfacesBuilder_ == null) { + return logicalInterfaces_.get(index); + } else { + return logicalInterfacesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of logical interfaces for the instance. The number of logical
+     * interfaces will be the same as number of hardware bond/nic on the chosen
+     * network template. For the non-multivlan configurations (for eg, existing
+     * servers) that use existing default network template (bondaa-bondaa), both
+     * the Instance.networks field and the Instance.logical_interfaces fields will
+     * be filled to ensure backward compatibility. For the others, only
+     * Instance.logical_interfaces will be filled.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; + * + */ + public Builder setLogicalInterfaces( + int index, com.google.cloud.baremetalsolution.v2.LogicalInterface value) { + if (logicalInterfacesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogicalInterfacesIsMutable(); + logicalInterfaces_.set(index, value); + onChanged(); + } else { + logicalInterfacesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of logical interfaces for the instance. The number of logical
+     * interfaces will be the same as number of hardware bond/nic on the chosen
+     * network template. For the non-multivlan configurations (for eg, existing
+     * servers) that use existing default network template (bondaa-bondaa), both
+     * the Instance.networks field and the Instance.logical_interfaces fields will
+     * be filled to ensure backward compatibility. For the others, only
+     * Instance.logical_interfaces will be filled.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; + * + */ + public Builder setLogicalInterfaces( + int index, com.google.cloud.baremetalsolution.v2.LogicalInterface.Builder builderForValue) { + if (logicalInterfacesBuilder_ == null) { + ensureLogicalInterfacesIsMutable(); + logicalInterfaces_.set(index, builderForValue.build()); + onChanged(); + } else { + logicalInterfacesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of logical interfaces for the instance. The number of logical
+     * interfaces will be the same as number of hardware bond/nic on the chosen
+     * network template. For the non-multivlan configurations (for eg, existing
+     * servers) that use existing default network template (bondaa-bondaa), both
+     * the Instance.networks field and the Instance.logical_interfaces fields will
+     * be filled to ensure backward compatibility. For the others, only
+     * Instance.logical_interfaces will be filled.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; + * + */ + public Builder addLogicalInterfaces( + com.google.cloud.baremetalsolution.v2.LogicalInterface value) { + if (logicalInterfacesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogicalInterfacesIsMutable(); + logicalInterfaces_.add(value); + onChanged(); + } else { + logicalInterfacesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of logical interfaces for the instance. The number of logical
+     * interfaces will be the same as number of hardware bond/nic on the chosen
+     * network template. For the non-multivlan configurations (for eg, existing
+     * servers) that use existing default network template (bondaa-bondaa), both
+     * the Instance.networks field and the Instance.logical_interfaces fields will
+     * be filled to ensure backward compatibility. For the others, only
+     * Instance.logical_interfaces will be filled.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; + * + */ + public Builder addLogicalInterfaces( + int index, com.google.cloud.baremetalsolution.v2.LogicalInterface value) { + if (logicalInterfacesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogicalInterfacesIsMutable(); + logicalInterfaces_.add(index, value); + onChanged(); + } else { + logicalInterfacesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of logical interfaces for the instance. The number of logical
+     * interfaces will be the same as number of hardware bond/nic on the chosen
+     * network template. For the non-multivlan configurations (for eg, existing
+     * servers) that use existing default network template (bondaa-bondaa), both
+     * the Instance.networks field and the Instance.logical_interfaces fields will
+     * be filled to ensure backward compatibility. For the others, only
+     * Instance.logical_interfaces will be filled.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; + * + */ + public Builder addLogicalInterfaces( + com.google.cloud.baremetalsolution.v2.LogicalInterface.Builder builderForValue) { + if (logicalInterfacesBuilder_ == null) { + ensureLogicalInterfacesIsMutable(); + logicalInterfaces_.add(builderForValue.build()); + onChanged(); + } else { + logicalInterfacesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of logical interfaces for the instance. The number of logical
+     * interfaces will be the same as number of hardware bond/nic on the chosen
+     * network template. For the non-multivlan configurations (for eg, existing
+     * servers) that use existing default network template (bondaa-bondaa), both
+     * the Instance.networks field and the Instance.logical_interfaces fields will
+     * be filled to ensure backward compatibility. For the others, only
+     * Instance.logical_interfaces will be filled.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; + * + */ + public Builder addLogicalInterfaces( + int index, com.google.cloud.baremetalsolution.v2.LogicalInterface.Builder builderForValue) { + if (logicalInterfacesBuilder_ == null) { + ensureLogicalInterfacesIsMutable(); + logicalInterfaces_.add(index, builderForValue.build()); + onChanged(); + } else { + logicalInterfacesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of logical interfaces for the instance. The number of logical
+     * interfaces will be the same as number of hardware bond/nic on the chosen
+     * network template. For the non-multivlan configurations (for eg, existing
+     * servers) that use existing default network template (bondaa-bondaa), both
+     * the Instance.networks field and the Instance.logical_interfaces fields will
+     * be filled to ensure backward compatibility. For the others, only
+     * Instance.logical_interfaces will be filled.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; + * + */ + public Builder addAllLogicalInterfaces( + java.lang.Iterable + values) { + if (logicalInterfacesBuilder_ == null) { + ensureLogicalInterfacesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, logicalInterfaces_); + onChanged(); + } else { + logicalInterfacesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of logical interfaces for the instance. The number of logical
+     * interfaces will be the same as number of hardware bond/nic on the chosen
+     * network template. For the non-multivlan configurations (for eg, existing
+     * servers) that use existing default network template (bondaa-bondaa), both
+     * the Instance.networks field and the Instance.logical_interfaces fields will
+     * be filled to ensure backward compatibility. For the others, only
+     * Instance.logical_interfaces will be filled.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; + * + */ + public Builder clearLogicalInterfaces() { + if (logicalInterfacesBuilder_ == null) { + logicalInterfaces_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + logicalInterfacesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of logical interfaces for the instance. The number of logical
+     * interfaces will be the same as number of hardware bond/nic on the chosen
+     * network template. For the non-multivlan configurations (for eg, existing
+     * servers) that use existing default network template (bondaa-bondaa), both
+     * the Instance.networks field and the Instance.logical_interfaces fields will
+     * be filled to ensure backward compatibility. For the others, only
+     * Instance.logical_interfaces will be filled.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; + * + */ + public Builder removeLogicalInterfaces(int index) { + if (logicalInterfacesBuilder_ == null) { + ensureLogicalInterfacesIsMutable(); + logicalInterfaces_.remove(index); + onChanged(); + } else { + logicalInterfacesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of logical interfaces for the instance. The number of logical
+     * interfaces will be the same as number of hardware bond/nic on the chosen
+     * network template. For the non-multivlan configurations (for eg, existing
+     * servers) that use existing default network template (bondaa-bondaa), both
+     * the Instance.networks field and the Instance.logical_interfaces fields will
+     * be filled to ensure backward compatibility. For the others, only
+     * Instance.logical_interfaces will be filled.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; + * + */ + public com.google.cloud.baremetalsolution.v2.LogicalInterface.Builder + getLogicalInterfacesBuilder(int index) { + return getLogicalInterfacesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of logical interfaces for the instance. The number of logical
+     * interfaces will be the same as number of hardware bond/nic on the chosen
+     * network template. For the non-multivlan configurations (for eg, existing
+     * servers) that use existing default network template (bondaa-bondaa), both
+     * the Instance.networks field and the Instance.logical_interfaces fields will
+     * be filled to ensure backward compatibility. For the others, only
+     * Instance.logical_interfaces will be filled.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; + * + */ + public com.google.cloud.baremetalsolution.v2.LogicalInterfaceOrBuilder + getLogicalInterfacesOrBuilder(int index) { + if (logicalInterfacesBuilder_ == null) { + return logicalInterfaces_.get(index); + } else { + return logicalInterfacesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of logical interfaces for the instance. The number of logical
+     * interfaces will be the same as number of hardware bond/nic on the chosen
+     * network template. For the non-multivlan configurations (for eg, existing
+     * servers) that use existing default network template (bondaa-bondaa), both
+     * the Instance.networks field and the Instance.logical_interfaces fields will
+     * be filled to ensure backward compatibility. For the others, only
+     * Instance.logical_interfaces will be filled.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; + * + */ + public java.util.List + getLogicalInterfacesOrBuilderList() { + if (logicalInterfacesBuilder_ != null) { + return logicalInterfacesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(logicalInterfaces_); + } + } + /** + * + * + *
+     * List of logical interfaces for the instance. The number of logical
+     * interfaces will be the same as number of hardware bond/nic on the chosen
+     * network template. For the non-multivlan configurations (for eg, existing
+     * servers) that use existing default network template (bondaa-bondaa), both
+     * the Instance.networks field and the Instance.logical_interfaces fields will
+     * be filled to ensure backward compatibility. For the others, only
+     * Instance.logical_interfaces will be filled.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; + * + */ + public com.google.cloud.baremetalsolution.v2.LogicalInterface.Builder + addLogicalInterfacesBuilder() { + return getLogicalInterfacesFieldBuilder() + .addBuilder(com.google.cloud.baremetalsolution.v2.LogicalInterface.getDefaultInstance()); + } + /** + * + * + *
+     * List of logical interfaces for the instance. The number of logical
+     * interfaces will be the same as number of hardware bond/nic on the chosen
+     * network template. For the non-multivlan configurations (for eg, existing
+     * servers) that use existing default network template (bondaa-bondaa), both
+     * the Instance.networks field and the Instance.logical_interfaces fields will
+     * be filled to ensure backward compatibility. For the others, only
+     * Instance.logical_interfaces will be filled.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; + * + */ + public com.google.cloud.baremetalsolution.v2.LogicalInterface.Builder + addLogicalInterfacesBuilder(int index) { + return getLogicalInterfacesFieldBuilder() + .addBuilder( + index, com.google.cloud.baremetalsolution.v2.LogicalInterface.getDefaultInstance()); + } + /** + * + * + *
+     * List of logical interfaces for the instance. The number of logical
+     * interfaces will be the same as number of hardware bond/nic on the chosen
+     * network template. For the non-multivlan configurations (for eg, existing
+     * servers) that use existing default network template (bondaa-bondaa), both
+     * the Instance.networks field and the Instance.logical_interfaces fields will
+     * be filled to ensure backward compatibility. For the others, only
+     * Instance.logical_interfaces will be filled.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; + * + */ + public java.util.List + getLogicalInterfacesBuilderList() { + return getLogicalInterfacesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.baremetalsolution.v2.LogicalInterface, + com.google.cloud.baremetalsolution.v2.LogicalInterface.Builder, + com.google.cloud.baremetalsolution.v2.LogicalInterfaceOrBuilder> + getLogicalInterfacesFieldBuilder() { + if (logicalInterfacesBuilder_ == null) { + logicalInterfacesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.baremetalsolution.v2.LogicalInterface, + com.google.cloud.baremetalsolution.v2.LogicalInterface.Builder, + com.google.cloud.baremetalsolution.v2.LogicalInterfaceOrBuilder>( + logicalInterfaces_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + logicalInterfaces_ = null; + } + return logicalInterfacesBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/InstanceOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/InstanceOrBuilder.java index 7b0b96dc954a..d375ed94d246 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/InstanceOrBuilder.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/InstanceOrBuilder.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/instance.proto package com.google.cloud.baremetalsolution.v2; @@ -56,6 +56,31 @@ public interface InstanceOrBuilder */ com.google.protobuf.ByteString getNameBytes(); + /** + * + * + *
+   * An identifier for the `Instance`, generated by the backend.
+   * 
+ * + * string id = 11; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * An identifier for the `Instance`, generated by the backend.
+   * 
+ * + * string id = 11; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + /** * * @@ -377,4 +402,177 @@ java.lang.String getLabelsOrDefault( * @return The interactiveSerialConsoleEnabled. */ boolean getInteractiveSerialConsoleEnabled(); + + /** + * + * + *
+   * The OS image currently installed on the server.
+   * 
+ * + * string os_image = 12; + * + * @return The osImage. + */ + java.lang.String getOsImage(); + /** + * + * + *
+   * The OS image currently installed on the server.
+   * 
+ * + * string os_image = 12; + * + * @return The bytes for osImage. + */ + com.google.protobuf.ByteString getOsImageBytes(); + + /** + * + * + *
+   * Immutable. Pod name.
+   * Pod is an independent part of infrastructure.
+   * Instance can be connected to the assets (networks, volumes) allocated
+   * in the same pod only.
+   * 
+ * + * string pod = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The pod. + */ + java.lang.String getPod(); + /** + * + * + *
+   * Immutable. Pod name.
+   * Pod is an independent part of infrastructure.
+   * Instance can be connected to the assets (networks, volumes) allocated
+   * in the same pod only.
+   * 
+ * + * string pod = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for pod. + */ + com.google.protobuf.ByteString getPodBytes(); + + /** + * + * + *
+   * Instance network template name. For eg, bondaa-bondaa, bondab-nic, etc.
+   * Generally, the template name follows the syntax of
+   * "bond<bond_mode>" or "nic".
+   * 
+ * + * string network_template = 14 [(.google.api.resource_reference) = { ... } + * + * @return The networkTemplate. + */ + java.lang.String getNetworkTemplate(); + /** + * + * + *
+   * Instance network template name. For eg, bondaa-bondaa, bondab-nic, etc.
+   * Generally, the template name follows the syntax of
+   * "bond<bond_mode>" or "nic".
+   * 
+ * + * string network_template = 14 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for networkTemplate. + */ + com.google.protobuf.ByteString getNetworkTemplateBytes(); + + /** + * + * + *
+   * List of logical interfaces for the instance. The number of logical
+   * interfaces will be the same as number of hardware bond/nic on the chosen
+   * network template. For the non-multivlan configurations (for eg, existing
+   * servers) that use existing default network template (bondaa-bondaa), both
+   * the Instance.networks field and the Instance.logical_interfaces fields will
+   * be filled to ensure backward compatibility. For the others, only
+   * Instance.logical_interfaces will be filled.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; + * + */ + java.util.List getLogicalInterfacesList(); + /** + * + * + *
+   * List of logical interfaces for the instance. The number of logical
+   * interfaces will be the same as number of hardware bond/nic on the chosen
+   * network template. For the non-multivlan configurations (for eg, existing
+   * servers) that use existing default network template (bondaa-bondaa), both
+   * the Instance.networks field and the Instance.logical_interfaces fields will
+   * be filled to ensure backward compatibility. For the others, only
+   * Instance.logical_interfaces will be filled.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; + * + */ + com.google.cloud.baremetalsolution.v2.LogicalInterface getLogicalInterfaces(int index); + /** + * + * + *
+   * List of logical interfaces for the instance. The number of logical
+   * interfaces will be the same as number of hardware bond/nic on the chosen
+   * network template. For the non-multivlan configurations (for eg, existing
+   * servers) that use existing default network template (bondaa-bondaa), both
+   * the Instance.networks field and the Instance.logical_interfaces fields will
+   * be filled to ensure backward compatibility. For the others, only
+   * Instance.logical_interfaces will be filled.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; + * + */ + int getLogicalInterfacesCount(); + /** + * + * + *
+   * List of logical interfaces for the instance. The number of logical
+   * interfaces will be the same as number of hardware bond/nic on the chosen
+   * network template. For the non-multivlan configurations (for eg, existing
+   * servers) that use existing default network template (bondaa-bondaa), both
+   * the Instance.networks field and the Instance.logical_interfaces fields will
+   * be filled to ensure backward compatibility. For the others, only
+   * Instance.logical_interfaces will be filled.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; + * + */ + java.util.List + getLogicalInterfacesOrBuilderList(); + /** + * + * + *
+   * List of logical interfaces for the instance. The number of logical
+   * interfaces will be the same as number of hardware bond/nic on the chosen
+   * network template. For the non-multivlan configurations (for eg, existing
+   * servers) that use existing default network template (bondaa-bondaa), both
+   * the Instance.networks field and the Instance.logical_interfaces fields will
+   * be filled to ensure backward compatibility. For the others, only
+   * Instance.logical_interfaces will be filled.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; + * + */ + com.google.cloud.baremetalsolution.v2.LogicalInterfaceOrBuilder getLogicalInterfacesOrBuilder( + int index); } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/InstanceProto.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/InstanceProto.java new file mode 100644 index 000000000000..7b9b6d44b6a3 --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/InstanceProto.java @@ -0,0 +1,325 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/baremetalsolution/v2/instance.proto + +package com.google.cloud.baremetalsolution.v2; + +public final class InstanceProto { + private InstanceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_Instance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_Instance_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_Instance_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_Instance_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_GetInstanceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_GetInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_ListInstancesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_ListInstancesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_ListInstancesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_ListInstancesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_UpdateInstanceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_UpdateInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_ResetInstanceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_ResetInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_StartInstanceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_StartInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_StopInstanceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_StopInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_DetachLunRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_DetachLunRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_ServerNetworkTemplate_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_ServerNetworkTemplate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_ServerNetworkTemplate_LogicalInterface_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_ServerNetworkTemplate_LogicalInterface_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_StartInstanceResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_StartInstanceResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_StopInstanceResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_StopInstanceResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n0google/cloud/baremetalsolution/v2/inst" + + "ance.proto\022!google.cloud.baremetalsoluti" + + "on.v2\032\037google/api/field_behavior.proto\032\031" + + "google/api/resource.proto\032+google/cloud/" + + "baremetalsolution/v2/lun.proto\032/google/c" + + "loud/baremetalsolution/v2/network.proto\032" + + " google/protobuf/field_mask.proto\032\037googl" + + "e/protobuf/timestamp.proto\"\253\007\n\010Instance\022" + + "\021\n\004name\030\001 \001(\tB\003\340A\003\022\n\n\002id\030\013 \001(\t\0224\n\013create" + + "_time\030\002 \001(\0132\032.google.protobuf.TimestampB" + + "\003\340A\003\0224\n\013update_time\030\003 \001(\0132\032.google.proto" + + "buf.TimestampB\003\340A\003\022\024\n\014machine_type\030\004 \001(\t" + + "\022@\n\005state\030\005 \001(\01621.google.cloud.baremetal" + + "solution.v2.Instance.State\022\036\n\026hyperthrea" + + "ding_enabled\030\006 \001(\010\022G\n\006labels\030\007 \003(\01327.goo" + + "gle.cloud.baremetalsolution.v2.Instance." + + "LabelsEntry\0224\n\004luns\030\010 \003(\0132&.google.cloud" + + ".baremetalsolution.v2.Lun\022<\n\010networks\030\t " + + "\003(\0132*.google.cloud.baremetalsolution.v2." + + "Network\022*\n\"interactive_serial_console_en" + + "abled\030\n \001(\010\022\020\n\010os_image\030\014 \001(\t\022\020\n\003pod\030\r \001" + + "(\tB\003\340A\005\022U\n\020network_template\030\016 \001(\tB;\372A8\n6" + + "baremetalsolution.googleapis.com/ServerN" + + "etworkTemplate\022O\n\022logical_interfaces\030\017 \003" + + "(\01323.google.cloud.baremetalsolution.v2.L" + + "ogicalInterface\032-\n\013LabelsEntry\022\013\n\003key\030\001 " + + "\001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"J\n\005State\022\025\n\021STATE" + + "_UNSPECIFIED\020\000\022\020\n\014PROVISIONING\020\001\022\013\n\007RUNN" + + "ING\020\002\022\013\n\007DELETED\020\003:l\352Ai\n)baremetalsoluti" + + "on.googleapis.com/Instance\022\n\tinstances\030\001 \003(\0132" + + "+.google.cloud.baremetalsolution.v2.Inst" + + "ance\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unreach" + + "able\030\003 \003(\t\"\214\001\n\025UpdateInstanceRequest\022B\n\010" + + "instance\030\001 \001(\0132+.google.cloud.baremetals" + + "olution.v2.InstanceB\003\340A\002\022/\n\013update_mask\030" + + "\002 \001(\0132\032.google.protobuf.FieldMask\"W\n\024Res" + + "etInstanceRequest\022?\n\004name\030\001 \001(\tB1\340A\002\372A+\n" + + ")baremetalsolution.googleapis.com/Instan" + + "ce\"W\n\024StartInstanceRequest\022?\n\004name\030\001 \001(\t" + + "B1\340A\002\372A+\n)baremetalsolution.googleapis.c" + + "om/Instance\"V\n\023StopInstanceRequest\022?\n\004na" + + "me\030\001 \001(\tB1\340A\002\372A+\n)baremetalsolution.goog" + + "leapis.com/Instance\"\222\001\n\020DetachLunRequest" + + "\022C\n\010instance\030\001 \001(\tB1\340A\002\372A+\n)baremetalsol" + + "ution.googleapis.com/Instance\0229\n\003lun\030\002 \001" + + "(\tB,\340A\002\372A&\n$baremetalsolution.googleapis" + + ".com/Lun\"\254\004\n\025ServerNetworkTemplate\022\021\n\004na" + + "me\030\001 \001(\tB\003\340A\003\022!\n\031applicable_instance_typ" + + "es\030\002 \003(\t\022e\n\022logical_interfaces\030\003 \003(\0132I.g" + + "oogle.cloud.baremetalsolution.v2.ServerN" + + "etworkTemplate.LogicalInterface\032\335\001\n\020Logi" + + "calInterface\022\014\n\004name\030\001 \001(\t\022e\n\004type\030\002 \001(\016" + + "2W.google.cloud.baremetalsolution.v2.Ser" + + "verNetworkTemplate.LogicalInterface.Inte" + + "rfaceType\022\020\n\010required\030\003 \001(\010\"B\n\rInterface" + + "Type\022\036\n\032INTERFACE_TYPE_UNSPECIFIED\020\000\022\010\n\004" + + "BOND\020\001\022\007\n\003NIC\020\002:\225\001\352A\221\001\n6baremetalsolutio" + + "n.googleapis.com/ServerNetworkTemplate\022W" + + "projects/{project}/locations/{location}/" + + "serverNetworkTemplate/{server_network_te" + + "mplate}\"\027\n\025StartInstanceResponse\"\026\n\024Stop" + + "InstanceResponseB\373\001\n%com.google.cloud.ba" + + "remetalsolution.v2B\rInstanceProtoP\001ZRgoo" + + "gle.golang.org/genproto/googleapis/cloud" + + "/baremetalsolution/v2;baremetalsolution\252" + + "\002!Google.Cloud.BareMetalSolution.V2\312\002!Go" + + "ogle\\Cloud\\BareMetalSolution\\V2\352\002$Google" + + "::Cloud::BareMetalSolution::V2b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.baremetalsolution.v2.LunProto.getDescriptor(), + com.google.cloud.baremetalsolution.v2.NetworkProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_baremetalsolution_v2_Instance_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_baremetalsolution_v2_Instance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_Instance_descriptor, + new java.lang.String[] { + "Name", + "Id", + "CreateTime", + "UpdateTime", + "MachineType", + "State", + "HyperthreadingEnabled", + "Labels", + "Luns", + "Networks", + "InteractiveSerialConsoleEnabled", + "OsImage", + "Pod", + "NetworkTemplate", + "LogicalInterfaces", + }); + internal_static_google_cloud_baremetalsolution_v2_Instance_LabelsEntry_descriptor = + internal_static_google_cloud_baremetalsolution_v2_Instance_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_baremetalsolution_v2_Instance_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_Instance_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_baremetalsolution_v2_GetInstanceRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_baremetalsolution_v2_GetInstanceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_GetInstanceRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_baremetalsolution_v2_ListInstancesRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_baremetalsolution_v2_ListInstancesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_ListInstancesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", + }); + internal_static_google_cloud_baremetalsolution_v2_ListInstancesResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_baremetalsolution_v2_ListInstancesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_ListInstancesResponse_descriptor, + new java.lang.String[] { + "Instances", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_baremetalsolution_v2_UpdateInstanceRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_baremetalsolution_v2_UpdateInstanceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_UpdateInstanceRequest_descriptor, + new java.lang.String[] { + "Instance", "UpdateMask", + }); + internal_static_google_cloud_baremetalsolution_v2_ResetInstanceRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_baremetalsolution_v2_ResetInstanceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_ResetInstanceRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_baremetalsolution_v2_StartInstanceRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_baremetalsolution_v2_StartInstanceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_StartInstanceRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_baremetalsolution_v2_StopInstanceRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_baremetalsolution_v2_StopInstanceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_StopInstanceRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_baremetalsolution_v2_DetachLunRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_baremetalsolution_v2_DetachLunRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_DetachLunRequest_descriptor, + new java.lang.String[] { + "Instance", "Lun", + }); + internal_static_google_cloud_baremetalsolution_v2_ServerNetworkTemplate_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_baremetalsolution_v2_ServerNetworkTemplate_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_ServerNetworkTemplate_descriptor, + new java.lang.String[] { + "Name", "ApplicableInstanceTypes", "LogicalInterfaces", + }); + internal_static_google_cloud_baremetalsolution_v2_ServerNetworkTemplate_LogicalInterface_descriptor = + internal_static_google_cloud_baremetalsolution_v2_ServerNetworkTemplate_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_baremetalsolution_v2_ServerNetworkTemplate_LogicalInterface_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_ServerNetworkTemplate_LogicalInterface_descriptor, + new java.lang.String[] { + "Name", "Type", "Required", + }); + internal_static_google_cloud_baremetalsolution_v2_StartInstanceResponse_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_baremetalsolution_v2_StartInstanceResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_StartInstanceResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_baremetalsolution_v2_StopInstanceResponse_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_baremetalsolution_v2_StopInstanceResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_StopInstanceResponse_descriptor, + new java.lang.String[] {}); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.baremetalsolution.v2.LunProto.getDescriptor(); + com.google.cloud.baremetalsolution.v2.NetworkProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListInstancesRequest.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListInstancesRequest.java index dde78eaeacb5..8419229676fd 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListInstancesRequest.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListInstancesRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/instance.proto package com.google.cloud.baremetalsolution.v2; @@ -40,6 +40,7 @@ private ListInstancesRequest(com.google.protobuf.GeneratedMessageV3.Builder b private ListInstancesRequest() { parent_ = ""; pageToken_ = ""; + filter_ = ""; } @java.lang.Override @@ -90,6 +91,13 @@ private ListInstancesRequest( pageToken_ = s; break; } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -112,14 +120,14 @@ private ListInstancesRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.InstanceProto .internal_static_google_cloud_baremetalsolution_v2_ListInstancesRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.InstanceProto .internal_static_google_cloud_baremetalsolution_v2_ListInstancesRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.ListInstancesRequest.class, @@ -247,6 +255,55 @@ public com.google.protobuf.ByteString getPageTokenBytes() { } } + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * List filter.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * List filter.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -270,6 +327,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } unknownFields.writeTo(output); } @@ -288,6 +348,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -307,6 +370,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -324,6 +388,8 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -439,14 +505,14 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.ListInstancesRequest) com.google.cloud.baremetalsolution.v2.ListInstancesRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.InstanceProto .internal_static_google_cloud_baremetalsolution_v2_ListInstancesRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.InstanceProto .internal_static_google_cloud_baremetalsolution_v2_ListInstancesRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.ListInstancesRequest.class, @@ -476,12 +542,14 @@ public Builder clear() { pageToken_ = ""; + filter_ = ""; + return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.InstanceProto .internal_static_google_cloud_baremetalsolution_v2_ListInstancesRequest_descriptor; } @@ -506,6 +574,7 @@ public com.google.cloud.baremetalsolution.v2.ListInstancesRequest buildPartial() result.parent_ = parent_; result.pageSize_ = pageSize_; result.pageToken_ = pageToken_; + result.filter_ = filter_; onBuilt(); return result; } @@ -567,6 +636,10 @@ public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.ListInstancesRequ pageToken_ = other.pageToken_; onChanged(); } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -874,6 +947,112 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListInstancesRequestOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListInstancesRequestOrBuilder.java index 1cf81891a6c2..10c9345d49b5 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListInstancesRequestOrBuilder.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListInstancesRequestOrBuilder.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/instance.proto package com.google.cloud.baremetalsolution.v2; @@ -90,4 +90,29 @@ public interface ListInstancesRequestOrBuilder * @return The bytes for pageToken. */ com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * List filter.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * List filter.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListInstancesResponse.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListInstancesResponse.java index cb23ffeb354a..69f116a64f7f 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListInstancesResponse.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListInstancesResponse.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/instance.proto package com.google.cloud.baremetalsolution.v2; @@ -130,14 +130,14 @@ private ListInstancesResponse( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.InstanceProto .internal_static_google_cloud_baremetalsolution_v2_ListInstancesResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.InstanceProto .internal_static_google_cloud_baremetalsolution_v2_ListInstancesResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.ListInstancesResponse.class, @@ -524,14 +524,14 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.ListInstancesResponse) com.google.cloud.baremetalsolution.v2.ListInstancesResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.InstanceProto .internal_static_google_cloud_baremetalsolution_v2_ListInstancesResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.InstanceProto .internal_static_google_cloud_baremetalsolution_v2_ListInstancesResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.ListInstancesResponse.class, @@ -572,7 +572,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.InstanceProto .internal_static_google_cloud_baremetalsolution_v2_ListInstancesResponse_descriptor; } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListInstancesResponseOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListInstancesResponseOrBuilder.java index 1d259d78eec3..65768d2beb07 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListInstancesResponseOrBuilder.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListInstancesResponseOrBuilder.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/instance.proto package com.google.cloud.baremetalsolution.v2; diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListLunsRequest.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListLunsRequest.java index 52e9a74ce2a2..625cb299e569 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListLunsRequest.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListLunsRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/lun.proto package com.google.cloud.baremetalsolution.v2; @@ -112,14 +112,14 @@ private ListLunsRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.LunProto .internal_static_google_cloud_baremetalsolution_v2_ListLunsRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.LunProto .internal_static_google_cloud_baremetalsolution_v2_ListLunsRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.ListLunsRequest.class, @@ -439,14 +439,14 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.ListLunsRequest) com.google.cloud.baremetalsolution.v2.ListLunsRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.LunProto .internal_static_google_cloud_baremetalsolution_v2_ListLunsRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.LunProto .internal_static_google_cloud_baremetalsolution_v2_ListLunsRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.ListLunsRequest.class, @@ -481,7 +481,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.LunProto .internal_static_google_cloud_baremetalsolution_v2_ListLunsRequest_descriptor; } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListLunsRequestOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListLunsRequestOrBuilder.java index 65d1f6d06e26..c79ee15184cd 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListLunsRequestOrBuilder.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListLunsRequestOrBuilder.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/lun.proto package com.google.cloud.baremetalsolution.v2; diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListLunsResponse.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListLunsResponse.java index f245642584a0..e1c04712390e 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListLunsResponse.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListLunsResponse.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/lun.proto package com.google.cloud.baremetalsolution.v2; @@ -129,14 +129,14 @@ private ListLunsResponse( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.LunProto .internal_static_google_cloud_baremetalsolution_v2_ListLunsResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.LunProto .internal_static_google_cloud_baremetalsolution_v2_ListLunsResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.ListLunsResponse.class, @@ -523,14 +523,14 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.ListLunsResponse) com.google.cloud.baremetalsolution.v2.ListLunsResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.LunProto .internal_static_google_cloud_baremetalsolution_v2_ListLunsResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.LunProto .internal_static_google_cloud_baremetalsolution_v2_ListLunsResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.ListLunsResponse.class, @@ -571,7 +571,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.LunProto .internal_static_google_cloud_baremetalsolution_v2_ListLunsResponse_descriptor; } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListLunsResponseOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListLunsResponseOrBuilder.java index d59395142be2..4e01c38bd2b7 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListLunsResponseOrBuilder.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListLunsResponseOrBuilder.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/lun.proto package com.google.cloud.baremetalsolution.v2; diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/RestoreVolumeSnapshotRequest.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNetworkUsageRequest.java similarity index 59% rename from java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/RestoreVolumeSnapshotRequest.java rename to java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNetworkUsageRequest.java index 063b6f8d3ab6..98e6e1413790 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/RestoreVolumeSnapshotRequest.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNetworkUsageRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/network.proto package com.google.cloud.baremetalsolution.v2; @@ -22,29 +22,29 @@ * * *
- * Message for restoring a volume snapshot.
+ * Request to get networks with IPs.
  * 
* - * Protobuf type {@code google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest} + * Protobuf type {@code google.cloud.baremetalsolution.v2.ListNetworkUsageRequest} */ -public final class RestoreVolumeSnapshotRequest extends com.google.protobuf.GeneratedMessageV3 +public final class ListNetworkUsageRequest extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest) - RestoreVolumeSnapshotRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.ListNetworkUsageRequest) + ListNetworkUsageRequestOrBuilder { private static final long serialVersionUID = 0L; - // Use RestoreVolumeSnapshotRequest.newBuilder() to construct. - private RestoreVolumeSnapshotRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use ListNetworkUsageRequest.newBuilder() to construct. + private ListNetworkUsageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private RestoreVolumeSnapshotRequest() { - volumeSnapshot_ = ""; + private ListNetworkUsageRequest() { + location_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new RestoreVolumeSnapshotRequest(); + return new ListNetworkUsageRequest(); } @java.lang.Override @@ -52,7 +52,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RestoreVolumeSnapshotRequest( + private ListNetworkUsageRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -74,7 +74,7 @@ private RestoreVolumeSnapshotRequest( { java.lang.String s = input.readStringRequireUtf8(); - volumeSnapshot_ = s; + location_ = s; break; } default: @@ -99,44 +99,44 @@ private RestoreVolumeSnapshotRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_RestoreVolumeSnapshotRequest_descriptor; + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_ListNetworkUsageRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_RestoreVolumeSnapshotRequest_fieldAccessorTable + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_ListNetworkUsageRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest.class, - com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest.Builder.class); + com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest.class, + com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest.Builder.class); } - public static final int VOLUME_SNAPSHOT_FIELD_NUMBER = 1; - private volatile java.lang.Object volumeSnapshot_; + public static final int LOCATION_FIELD_NUMBER = 1; + private volatile java.lang.Object location_; /** * * *
-   * Required. Name of the resource.
+   * Required. Parent value (project and location).
    * 
* * - * string volume_snapshot = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * - * @return The volumeSnapshot. + * @return The location. */ @java.lang.Override - public java.lang.String getVolumeSnapshot() { - java.lang.Object ref = volumeSnapshot_; + public java.lang.String getLocation() { + java.lang.Object ref = location_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - volumeSnapshot_ = s; + location_ = s; return s; } } @@ -144,22 +144,22 @@ public java.lang.String getVolumeSnapshot() { * * *
-   * Required. Name of the resource.
+   * Required. Parent value (project and location).
    * 
* * - * string volume_snapshot = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * - * @return The bytes for volumeSnapshot. + * @return The bytes for location. */ @java.lang.Override - public com.google.protobuf.ByteString getVolumeSnapshotBytes() { - java.lang.Object ref = volumeSnapshot_; + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - volumeSnapshot_ = b; + location_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -180,8 +180,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(volumeSnapshot_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, volumeSnapshot_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, location_); } unknownFields.writeTo(output); } @@ -192,8 +192,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(volumeSnapshot_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, volumeSnapshot_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, location_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -205,13 +205,13 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest)) { + if (!(obj instanceof com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest)) { return super.equals(obj); } - com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest other = - (com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest) obj; + com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest other = + (com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest) obj; - if (!getVolumeSnapshot().equals(other.getVolumeSnapshot())) return false; + if (!getLocation().equals(other.getLocation())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -223,79 +223,78 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + VOLUME_SNAPSHOT_FIELD_NUMBER; - hash = (53 * hash) + getVolumeSnapshot().hashCode(); + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + public static com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + public static com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -313,7 +312,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest prototype) { + com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -331,32 +330,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Message for restoring a volume snapshot.
+   * Request to get networks with IPs.
    * 
* - * Protobuf type {@code google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest} + * Protobuf type {@code google.cloud.baremetalsolution.v2.ListNetworkUsageRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest) - com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.ListNetworkUsageRequest) + com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_RestoreVolumeSnapshotRequest_descriptor; + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_ListNetworkUsageRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_RestoreVolumeSnapshotRequest_fieldAccessorTable + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_ListNetworkUsageRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest.class, - com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest.Builder.class); + com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest.class, + com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest.Builder.class); } - // Construct using - // com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest.newBuilder() + // Construct using com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -373,27 +371,26 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - volumeSnapshot_ = ""; + location_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_RestoreVolumeSnapshotRequest_descriptor; + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_ListNetworkUsageRequest_descriptor; } @java.lang.Override - public com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest + public com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest getDefaultInstanceForType() { - return com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest - .getDefaultInstance(); + return com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest build() { - com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest result = buildPartial(); + public com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest build() { + com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -401,10 +398,10 @@ public com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest build( } @java.lang.Override - public com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest buildPartial() { - com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest result = - new com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest(this); - result.volumeSnapshot_ = volumeSnapshot_; + public com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest buildPartial() { + com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest result = + new com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest(this); + result.location_ = location_; onBuilt(); return result; } @@ -444,22 +441,20 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest) { - return mergeFrom( - (com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest) other); + if (other instanceof com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest) { + return mergeFrom((com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom( - com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest other) { + public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest other) { if (other - == com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest - .getDefaultInstance()) return this; - if (!other.getVolumeSnapshot().isEmpty()) { - volumeSnapshot_ = other.volumeSnapshot_; + == com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest.getDefaultInstance()) + return this; + if (!other.getLocation().isEmpty()) { + location_ = other.location_; onChanged(); } this.mergeUnknownFields(other.unknownFields); @@ -477,12 +472,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest parsedMessage = null; + com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest) + (com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { @@ -493,26 +488,26 @@ public Builder mergeFrom( return this; } - private java.lang.Object volumeSnapshot_ = ""; + private java.lang.Object location_ = ""; /** * * *
-     * Required. Name of the resource.
+     * Required. Parent value (project and location).
      * 
* * - * string volume_snapshot = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * - * @return The volumeSnapshot. + * @return The location. */ - public java.lang.String getVolumeSnapshot() { - java.lang.Object ref = volumeSnapshot_; + public java.lang.String getLocation() { + java.lang.Object ref = location_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - volumeSnapshot_ = s; + location_ = s; return s; } else { return (java.lang.String) ref; @@ -522,21 +517,21 @@ public java.lang.String getVolumeSnapshot() { * * *
-     * Required. Name of the resource.
+     * Required. Parent value (project and location).
      * 
* * - * string volume_snapshot = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * - * @return The bytes for volumeSnapshot. + * @return The bytes for location. */ - public com.google.protobuf.ByteString getVolumeSnapshotBytes() { - java.lang.Object ref = volumeSnapshot_; + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - volumeSnapshot_ = b; + location_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -546,22 +541,22 @@ public com.google.protobuf.ByteString getVolumeSnapshotBytes() { * * *
-     * Required. Name of the resource.
+     * Required. Parent value (project and location).
      * 
* * - * string volume_snapshot = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * - * @param value The volumeSnapshot to set. + * @param value The location to set. * @return This builder for chaining. */ - public Builder setVolumeSnapshot(java.lang.String value) { + public Builder setLocation(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - volumeSnapshot_ = value; + location_ = value; onChanged(); return this; } @@ -569,18 +564,18 @@ public Builder setVolumeSnapshot(java.lang.String value) { * * *
-     * Required. Name of the resource.
+     * Required. Parent value (project and location).
      * 
* * - * string volume_snapshot = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * * @return This builder for chaining. */ - public Builder clearVolumeSnapshot() { + public Builder clearLocation() { - volumeSnapshot_ = getDefaultInstance().getVolumeSnapshot(); + location_ = getDefaultInstance().getLocation(); onChanged(); return this; } @@ -588,23 +583,23 @@ public Builder clearVolumeSnapshot() { * * *
-     * Required. Name of the resource.
+     * Required. Parent value (project and location).
      * 
* * - * string volume_snapshot = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * - * @param value The bytes for volumeSnapshot to set. + * @param value The bytes for location to set. * @return This builder for chaining. */ - public Builder setVolumeSnapshotBytes(com.google.protobuf.ByteString value) { + public Builder setLocationBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - volumeSnapshot_ = value; + location_ = value; onChanged(); return this; } @@ -620,45 +615,43 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest) + // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.ListNetworkUsageRequest) } - // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest) - private static final com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest + // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.ListNetworkUsageRequest) + private static final com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest(); + DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest(); } - public static com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest - getDefaultInstance() { + public static com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public RestoreVolumeSnapshotRequest parsePartialFrom( + public ListNetworkUsageRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RestoreVolumeSnapshotRequest(input, extensionRegistry); + return new ListNetworkUsageRequest(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest - getDefaultInstanceForType() { + public com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/RestoreVolumeSnapshotRequestOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNetworkUsageRequestOrBuilder.java similarity index 60% rename from java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/RestoreVolumeSnapshotRequestOrBuilder.java rename to java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNetworkUsageRequestOrBuilder.java index b56f0044c624..05ccf8f99c6d 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/RestoreVolumeSnapshotRequestOrBuilder.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNetworkUsageRequestOrBuilder.java @@ -14,41 +14,41 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/network.proto package com.google.cloud.baremetalsolution.v2; -public interface RestoreVolumeSnapshotRequestOrBuilder +public interface ListNetworkUsageRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest) + // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.ListNetworkUsageRequest) com.google.protobuf.MessageOrBuilder { /** * * *
-   * Required. Name of the resource.
+   * Required. Parent value (project and location).
    * 
* * - * string volume_snapshot = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * - * @return The volumeSnapshot. + * @return The location. */ - java.lang.String getVolumeSnapshot(); + java.lang.String getLocation(); /** * * *
-   * Required. Name of the resource.
+   * Required. Parent value (project and location).
    * 
* * - * string volume_snapshot = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * - * @return The bytes for volumeSnapshot. + * @return The bytes for location. */ - com.google.protobuf.ByteString getVolumeSnapshotBytes(); + com.google.protobuf.ByteString getLocationBytes(); } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNetworkUsageResponse.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNetworkUsageResponse.java new file mode 100644 index 000000000000..78f0f774333d --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNetworkUsageResponse.java @@ -0,0 +1,969 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/baremetalsolution/v2/network.proto + +package com.google.cloud.baremetalsolution.v2; + +/** + * + * + *
+ * Response with Networks with IPs
+ * 
+ * + * Protobuf type {@code google.cloud.baremetalsolution.v2.ListNetworkUsageResponse} + */ +public final class ListNetworkUsageResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.ListNetworkUsageResponse) + ListNetworkUsageResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListNetworkUsageResponse.newBuilder() to construct. + private ListNetworkUsageResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListNetworkUsageResponse() { + networks_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListNetworkUsageResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListNetworkUsageResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + networks_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + networks_.add( + input.readMessage( + com.google.cloud.baremetalsolution.v2.NetworkUsage.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + networks_ = java.util.Collections.unmodifiableList(networks_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_ListNetworkUsageResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_ListNetworkUsageResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse.class, + com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse.Builder.class); + } + + public static final int NETWORKS_FIELD_NUMBER = 1; + private java.util.List networks_; + /** + * + * + *
+   * Networks with IPs.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; + */ + @java.lang.Override + public java.util.List getNetworksList() { + return networks_; + } + /** + * + * + *
+   * Networks with IPs.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; + */ + @java.lang.Override + public java.util.List + getNetworksOrBuilderList() { + return networks_; + } + /** + * + * + *
+   * Networks with IPs.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; + */ + @java.lang.Override + public int getNetworksCount() { + return networks_.size(); + } + /** + * + * + *
+   * Networks with IPs.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; + */ + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.NetworkUsage getNetworks(int index) { + return networks_.get(index); + } + /** + * + * + *
+   * Networks with IPs.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; + */ + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.NetworkUsageOrBuilder getNetworksOrBuilder( + int index) { + return networks_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < networks_.size(); i++) { + output.writeMessage(1, networks_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < networks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, networks_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse)) { + return super.equals(obj); + } + com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse other = + (com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse) obj; + + if (!getNetworksList().equals(other.getNetworksList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNetworksCount() > 0) { + hash = (37 * hash) + NETWORKS_FIELD_NUMBER; + hash = (53 * hash) + getNetworksList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response with Networks with IPs
+   * 
+ * + * Protobuf type {@code google.cloud.baremetalsolution.v2.ListNetworkUsageResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.ListNetworkUsageResponse) + com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_ListNetworkUsageResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_ListNetworkUsageResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse.class, + com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse.Builder.class); + } + + // Construct using com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getNetworksFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (networksBuilder_ == null) { + networks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + networksBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_ListNetworkUsageResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse + getDefaultInstanceForType() { + return com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse build() { + com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse buildPartial() { + com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse result = + new com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse(this); + int from_bitField0_ = bitField0_; + if (networksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + networks_ = java.util.Collections.unmodifiableList(networks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.networks_ = networks_; + } else { + result.networks_ = networksBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse) { + return mergeFrom((com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse other) { + if (other + == com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse.getDefaultInstance()) + return this; + if (networksBuilder_ == null) { + if (!other.networks_.isEmpty()) { + if (networks_.isEmpty()) { + networks_ = other.networks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNetworksIsMutable(); + networks_.addAll(other.networks_); + } + onChanged(); + } + } else { + if (!other.networks_.isEmpty()) { + if (networksBuilder_.isEmpty()) { + networksBuilder_.dispose(); + networksBuilder_ = null; + networks_ = other.networks_; + bitField0_ = (bitField0_ & ~0x00000001); + networksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getNetworksFieldBuilder() + : null; + } else { + networksBuilder_.addAllMessages(other.networks_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List networks_ = + java.util.Collections.emptyList(); + + private void ensureNetworksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + networks_ = + new java.util.ArrayList(networks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.baremetalsolution.v2.NetworkUsage, + com.google.cloud.baremetalsolution.v2.NetworkUsage.Builder, + com.google.cloud.baremetalsolution.v2.NetworkUsageOrBuilder> + networksBuilder_; + + /** + * + * + *
+     * Networks with IPs.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; + */ + public java.util.List getNetworksList() { + if (networksBuilder_ == null) { + return java.util.Collections.unmodifiableList(networks_); + } else { + return networksBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Networks with IPs.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; + */ + public int getNetworksCount() { + if (networksBuilder_ == null) { + return networks_.size(); + } else { + return networksBuilder_.getCount(); + } + } + /** + * + * + *
+     * Networks with IPs.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; + */ + public com.google.cloud.baremetalsolution.v2.NetworkUsage getNetworks(int index) { + if (networksBuilder_ == null) { + return networks_.get(index); + } else { + return networksBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Networks with IPs.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; + */ + public Builder setNetworks( + int index, com.google.cloud.baremetalsolution.v2.NetworkUsage value) { + if (networksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworksIsMutable(); + networks_.set(index, value); + onChanged(); + } else { + networksBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Networks with IPs.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; + */ + public Builder setNetworks( + int index, com.google.cloud.baremetalsolution.v2.NetworkUsage.Builder builderForValue) { + if (networksBuilder_ == null) { + ensureNetworksIsMutable(); + networks_.set(index, builderForValue.build()); + onChanged(); + } else { + networksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Networks with IPs.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; + */ + public Builder addNetworks(com.google.cloud.baremetalsolution.v2.NetworkUsage value) { + if (networksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworksIsMutable(); + networks_.add(value); + onChanged(); + } else { + networksBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Networks with IPs.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; + */ + public Builder addNetworks( + int index, com.google.cloud.baremetalsolution.v2.NetworkUsage value) { + if (networksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworksIsMutable(); + networks_.add(index, value); + onChanged(); + } else { + networksBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Networks with IPs.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; + */ + public Builder addNetworks( + com.google.cloud.baremetalsolution.v2.NetworkUsage.Builder builderForValue) { + if (networksBuilder_ == null) { + ensureNetworksIsMutable(); + networks_.add(builderForValue.build()); + onChanged(); + } else { + networksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Networks with IPs.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; + */ + public Builder addNetworks( + int index, com.google.cloud.baremetalsolution.v2.NetworkUsage.Builder builderForValue) { + if (networksBuilder_ == null) { + ensureNetworksIsMutable(); + networks_.add(index, builderForValue.build()); + onChanged(); + } else { + networksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Networks with IPs.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; + */ + public Builder addAllNetworks( + java.lang.Iterable values) { + if (networksBuilder_ == null) { + ensureNetworksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, networks_); + onChanged(); + } else { + networksBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Networks with IPs.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; + */ + public Builder clearNetworks() { + if (networksBuilder_ == null) { + networks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + networksBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Networks with IPs.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; + */ + public Builder removeNetworks(int index) { + if (networksBuilder_ == null) { + ensureNetworksIsMutable(); + networks_.remove(index); + onChanged(); + } else { + networksBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Networks with IPs.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; + */ + public com.google.cloud.baremetalsolution.v2.NetworkUsage.Builder getNetworksBuilder( + int index) { + return getNetworksFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Networks with IPs.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; + */ + public com.google.cloud.baremetalsolution.v2.NetworkUsageOrBuilder getNetworksOrBuilder( + int index) { + if (networksBuilder_ == null) { + return networks_.get(index); + } else { + return networksBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Networks with IPs.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; + */ + public java.util.List + getNetworksOrBuilderList() { + if (networksBuilder_ != null) { + return networksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(networks_); + } + } + /** + * + * + *
+     * Networks with IPs.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; + */ + public com.google.cloud.baremetalsolution.v2.NetworkUsage.Builder addNetworksBuilder() { + return getNetworksFieldBuilder() + .addBuilder(com.google.cloud.baremetalsolution.v2.NetworkUsage.getDefaultInstance()); + } + /** + * + * + *
+     * Networks with IPs.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; + */ + public com.google.cloud.baremetalsolution.v2.NetworkUsage.Builder addNetworksBuilder( + int index) { + return getNetworksFieldBuilder() + .addBuilder( + index, com.google.cloud.baremetalsolution.v2.NetworkUsage.getDefaultInstance()); + } + /** + * + * + *
+     * Networks with IPs.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; + */ + public java.util.List + getNetworksBuilderList() { + return getNetworksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.baremetalsolution.v2.NetworkUsage, + com.google.cloud.baremetalsolution.v2.NetworkUsage.Builder, + com.google.cloud.baremetalsolution.v2.NetworkUsageOrBuilder> + getNetworksFieldBuilder() { + if (networksBuilder_ == null) { + networksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.baremetalsolution.v2.NetworkUsage, + com.google.cloud.baremetalsolution.v2.NetworkUsage.Builder, + com.google.cloud.baremetalsolution.v2.NetworkUsageOrBuilder>( + networks_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + networks_ = null; + } + return networksBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.ListNetworkUsageResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.ListNetworkUsageResponse) + private static final com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse(); + } + + public static com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNetworkUsageResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListNetworkUsageResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNetworkUsageResponseOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNetworkUsageResponseOrBuilder.java new file mode 100644 index 000000000000..ef8a66bc9d05 --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNetworkUsageResponseOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/baremetalsolution/v2/network.proto + +package com.google.cloud.baremetalsolution.v2; + +public interface ListNetworkUsageResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.ListNetworkUsageResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Networks with IPs.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; + */ + java.util.List getNetworksList(); + /** + * + * + *
+   * Networks with IPs.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; + */ + com.google.cloud.baremetalsolution.v2.NetworkUsage getNetworks(int index); + /** + * + * + *
+   * Networks with IPs.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; + */ + int getNetworksCount(); + /** + * + * + *
+   * Networks with IPs.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; + */ + java.util.List + getNetworksOrBuilderList(); + /** + * + * + *
+   * Networks with IPs.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkUsage networks = 1; + */ + com.google.cloud.baremetalsolution.v2.NetworkUsageOrBuilder getNetworksOrBuilder(int index); +} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNetworksRequest.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNetworksRequest.java index aee4e27c3bb0..276a02f8de08 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNetworksRequest.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNetworksRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/network.proto package com.google.cloud.baremetalsolution.v2; @@ -40,6 +40,7 @@ private ListNetworksRequest(com.google.protobuf.GeneratedMessageV3.Builder bu private ListNetworksRequest() { parent_ = ""; pageToken_ = ""; + filter_ = ""; } @java.lang.Override @@ -90,6 +91,13 @@ private ListNetworksRequest( pageToken_ = s; break; } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -112,14 +120,14 @@ private ListNetworksRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_ListNetworksRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_ListNetworksRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.ListNetworksRequest.class, @@ -247,6 +255,55 @@ public com.google.protobuf.ByteString getPageTokenBytes() { } } + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * List filter.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * List filter.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -270,6 +327,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } unknownFields.writeTo(output); } @@ -288,6 +348,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -307,6 +370,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -324,6 +388,8 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -439,14 +505,14 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.ListNetworksRequest) com.google.cloud.baremetalsolution.v2.ListNetworksRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_ListNetworksRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_ListNetworksRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.ListNetworksRequest.class, @@ -476,12 +542,14 @@ public Builder clear() { pageToken_ = ""; + filter_ = ""; + return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_ListNetworksRequest_descriptor; } @@ -506,6 +574,7 @@ public com.google.cloud.baremetalsolution.v2.ListNetworksRequest buildPartial() result.parent_ = parent_; result.pageSize_ = pageSize_; result.pageToken_ = pageToken_; + result.filter_ = filter_; onBuilt(); return result; } @@ -567,6 +636,10 @@ public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.ListNetworksReque pageToken_ = other.pageToken_; onChanged(); } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -874,6 +947,112 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNetworksRequestOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNetworksRequestOrBuilder.java index 7e88f84a7242..f0ccc2fad5d7 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNetworksRequestOrBuilder.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNetworksRequestOrBuilder.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/network.proto package com.google.cloud.baremetalsolution.v2; @@ -90,4 +90,29 @@ public interface ListNetworksRequestOrBuilder * @return The bytes for pageToken. */ com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * List filter.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * List filter.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNetworksResponse.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNetworksResponse.java index 81a6952c818a..ce6d42654514 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNetworksResponse.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNetworksResponse.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/network.proto package com.google.cloud.baremetalsolution.v2; @@ -130,14 +130,14 @@ private ListNetworksResponse( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_ListNetworksResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_ListNetworksResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.ListNetworksResponse.class, @@ -524,14 +524,14 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.ListNetworksResponse) com.google.cloud.baremetalsolution.v2.ListNetworksResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_ListNetworksResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_ListNetworksResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.ListNetworksResponse.class, @@ -572,7 +572,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_ListNetworksResponse_descriptor; } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNetworksResponseOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNetworksResponseOrBuilder.java index 0d11c4545f20..871810102aec 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNetworksResponseOrBuilder.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNetworksResponseOrBuilder.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/network.proto package com.google.cloud.baremetalsolution.v2; diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListVolumeSnapshotsRequest.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNfsSharesRequest.java similarity index 71% rename from java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListVolumeSnapshotsRequest.java rename to java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNfsSharesRequest.java index 62a7d68d4ae1..ff77931a9a20 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListVolumeSnapshotsRequest.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNfsSharesRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/nfs_share.proto package com.google.cloud.baremetalsolution.v2; @@ -22,30 +22,31 @@ * * *
- * Message for requesting a list of storage volume snapshots.
+ * Message for requesting a list of NFS shares.
  * 
* - * Protobuf type {@code google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest} + * Protobuf type {@code google.cloud.baremetalsolution.v2.ListNfsSharesRequest} */ -public final class ListVolumeSnapshotsRequest extends com.google.protobuf.GeneratedMessageV3 +public final class ListNfsSharesRequest extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest) - ListVolumeSnapshotsRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.ListNfsSharesRequest) + ListNfsSharesRequestOrBuilder { private static final long serialVersionUID = 0L; - // Use ListVolumeSnapshotsRequest.newBuilder() to construct. - private ListVolumeSnapshotsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use ListNfsSharesRequest.newBuilder() to construct. + private ListNfsSharesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ListVolumeSnapshotsRequest() { + private ListNfsSharesRequest() { parent_ = ""; pageToken_ = ""; + filter_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListVolumeSnapshotsRequest(); + return new ListNfsSharesRequest(); } @java.lang.Override @@ -53,7 +54,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListVolumeSnapshotsRequest( + private ListNfsSharesRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -90,6 +91,13 @@ private ListVolumeSnapshotsRequest( pageToken_ = s; break; } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -112,18 +120,18 @@ private ListVolumeSnapshotsRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_ListVolumeSnapshotsRequest_descriptor; + return com.google.cloud.baremetalsolution.v2.NfsShareProto + .internal_static_google_cloud_baremetalsolution_v2_ListNfsSharesRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_ListVolumeSnapshotsRequest_fieldAccessorTable + return com.google.cloud.baremetalsolution.v2.NfsShareProto + .internal_static_google_cloud_baremetalsolution_v2_ListNfsSharesRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest.class, - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest.Builder.class); + com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest.class, + com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest.Builder.class); } public static final int PARENT_FIELD_NUMBER = 1; @@ -132,7 +140,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. Parent value for ListVolumesRequest.
+   * Required. Parent value for ListNfsSharesRequest.
    * 
* * @@ -157,7 +165,7 @@ public java.lang.String getParent() { * * *
-   * Required. Parent value for ListVolumesRequest.
+   * Required. Parent value for ListNfsSharesRequest.
    * 
* * @@ -247,6 +255,55 @@ public com.google.protobuf.ByteString getPageTokenBytes() { } } + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * List filter.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * List filter.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -270,6 +327,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } unknownFields.writeTo(output); } @@ -288,6 +348,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -298,15 +361,16 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest)) { + if (!(obj instanceof com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest)) { return super.equals(obj); } - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest other = - (com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest) obj; + com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest other = + (com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest) obj; if (!getParent().equals(other.getParent())) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -324,76 +388,78 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest parseDelimitedFrom( + public static com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest parseDelimitedFrom( + public static com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -411,7 +477,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest prototype) { + com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -429,31 +495,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Message for requesting a list of storage volume snapshots.
+   * Message for requesting a list of NFS shares.
    * 
* - * Protobuf type {@code google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest} + * Protobuf type {@code google.cloud.baremetalsolution.v2.ListNfsSharesRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest) - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.ListNfsSharesRequest) + com.google.cloud.baremetalsolution.v2.ListNfsSharesRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_ListVolumeSnapshotsRequest_descriptor; + return com.google.cloud.baremetalsolution.v2.NfsShareProto + .internal_static_google_cloud_baremetalsolution_v2_ListNfsSharesRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_ListVolumeSnapshotsRequest_fieldAccessorTable + return com.google.cloud.baremetalsolution.v2.NfsShareProto + .internal_static_google_cloud_baremetalsolution_v2_ListNfsSharesRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest.class, - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest.Builder.class); + com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest.class, + com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest.Builder.class); } - // Construct using com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest.newBuilder() + // Construct using com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -476,24 +542,25 @@ public Builder clear() { pageToken_ = ""; + filter_ = ""; + return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_ListVolumeSnapshotsRequest_descriptor; + return com.google.cloud.baremetalsolution.v2.NfsShareProto + .internal_static_google_cloud_baremetalsolution_v2_ListNfsSharesRequest_descriptor; } @java.lang.Override - public com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest - getDefaultInstanceForType() { - return com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest.getDefaultInstance(); + public com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest getDefaultInstanceForType() { + return com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest build() { - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest result = buildPartial(); + public com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest build() { + com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -501,12 +568,13 @@ public com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest build() } @java.lang.Override - public com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest buildPartial() { - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest result = - new com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest(this); + public com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest buildPartial() { + com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest result = + new com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest(this); result.parent_ = parent_; result.pageSize_ = pageSize_; result.pageToken_ = pageToken_; + result.filter_ = filter_; onBuilt(); return result; } @@ -546,18 +614,16 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest) { - return mergeFrom((com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest) other); + if (other instanceof com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest) { + return mergeFrom((com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom( - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest other) { - if (other - == com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest other) { + if (other == com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest.getDefaultInstance()) return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; @@ -570,6 +636,10 @@ public Builder mergeFrom( pageToken_ = other.pageToken_; onChanged(); } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -585,13 +655,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest parsedMessage = null; + com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest) - e.getUnfinishedMessage(); + (com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -606,7 +675,7 @@ public Builder mergeFrom( * * *
-     * Required. Parent value for ListVolumesRequest.
+     * Required. Parent value for ListNfsSharesRequest.
      * 
* * @@ -630,7 +699,7 @@ public java.lang.String getParent() { * * *
-     * Required. Parent value for ListVolumesRequest.
+     * Required. Parent value for ListNfsSharesRequest.
      * 
* * @@ -654,7 +723,7 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-     * Required. Parent value for ListVolumesRequest.
+     * Required. Parent value for ListNfsSharesRequest.
      * 
* * @@ -677,7 +746,7 @@ public Builder setParent(java.lang.String value) { * * *
-     * Required. Parent value for ListVolumesRequest.
+     * Required. Parent value for ListNfsSharesRequest.
      * 
* * @@ -696,7 +765,7 @@ public Builder clearParent() { * * *
-     * Required. Parent value for ListVolumesRequest.
+     * Required. Parent value for ListNfsSharesRequest.
      * 
* * @@ -878,6 +947,112 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); @@ -889,45 +1064,42 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest) + // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.ListNfsSharesRequest) } - // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest) - private static final com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest - DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.ListNfsSharesRequest) + private static final com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest(); + DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest(); } - public static com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest - getDefaultInstance() { + public static com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public ListVolumeSnapshotsRequest parsePartialFrom( + public ListNfsSharesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListVolumeSnapshotsRequest(input, extensionRegistry); + return new ListNfsSharesRequest(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest - getDefaultInstanceForType() { + public com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListVolumeSnapshotsRequestOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNfsSharesRequestOrBuilder.java similarity index 77% rename from java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListVolumeSnapshotsRequestOrBuilder.java rename to java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNfsSharesRequestOrBuilder.java index 78915792f25b..195f826fdf9a 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListVolumeSnapshotsRequestOrBuilder.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNfsSharesRequestOrBuilder.java @@ -14,20 +14,20 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/nfs_share.proto package com.google.cloud.baremetalsolution.v2; -public interface ListVolumeSnapshotsRequestOrBuilder +public interface ListNfsSharesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest) + // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.ListNfsSharesRequest) com.google.protobuf.MessageOrBuilder { /** * * *
-   * Required. Parent value for ListVolumesRequest.
+   * Required. Parent value for ListNfsSharesRequest.
    * 
* * @@ -41,7 +41,7 @@ public interface ListVolumeSnapshotsRequestOrBuilder * * *
-   * Required. Parent value for ListVolumesRequest.
+   * Required. Parent value for ListNfsSharesRequest.
    * 
* * @@ -90,4 +90,29 @@ public interface ListVolumeSnapshotsRequestOrBuilder * @return The bytes for pageToken. */ com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * List filter.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * List filter.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListVolumeSnapshotsResponse.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNfsSharesResponse.java similarity index 61% rename from java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListVolumeSnapshotsResponse.java rename to java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNfsSharesResponse.java index f3bd25684207..c9c1e94afbe1 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListVolumeSnapshotsResponse.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNfsSharesResponse.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/nfs_share.proto package com.google.cloud.baremetalsolution.v2; @@ -22,23 +22,23 @@ * * *
- * Response message containing the list of storage volume snapshots.
+ * Response message containing the list of NFS shares.
  * 
* - * Protobuf type {@code google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse} + * Protobuf type {@code google.cloud.baremetalsolution.v2.ListNfsSharesResponse} */ -public final class ListVolumeSnapshotsResponse extends com.google.protobuf.GeneratedMessageV3 +public final class ListNfsSharesResponse extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse) - ListVolumeSnapshotsResponseOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.ListNfsSharesResponse) + ListNfsSharesResponseOrBuilder { private static final long serialVersionUID = 0L; - // Use ListVolumeSnapshotsResponse.newBuilder() to construct. - private ListVolumeSnapshotsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use ListNfsSharesResponse.newBuilder() to construct. + private ListNfsSharesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ListVolumeSnapshotsResponse() { - volumeSnapshots_ = java.util.Collections.emptyList(); + private ListNfsSharesResponse() { + nfsShares_ = java.util.Collections.emptyList(); nextPageToken_ = ""; unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; } @@ -46,7 +46,7 @@ private ListVolumeSnapshotsResponse() { @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListVolumeSnapshotsResponse(); + return new ListNfsSharesResponse(); } @java.lang.Override @@ -54,7 +54,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListVolumeSnapshotsResponse( + private ListNfsSharesResponse( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -76,14 +76,13 @@ private ListVolumeSnapshotsResponse( case 10: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { - volumeSnapshots_ = - new java.util.ArrayList(); + nfsShares_ = + new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } - volumeSnapshots_.add( + nfsShares_.add( input.readMessage( - com.google.cloud.baremetalsolution.v2.VolumeSnapshot.parser(), - extensionRegistry)); + com.google.cloud.baremetalsolution.v2.NfsShare.parser(), extensionRegistry)); break; } case 18: @@ -120,7 +119,7 @@ private ListVolumeSnapshotsResponse( throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { - volumeSnapshots_ = java.util.Collections.unmodifiableList(volumeSnapshots_); + nfsShares_ = java.util.Collections.unmodifiableList(nfsShares_); } if (((mutable_bitField0_ & 0x00000002) != 0)) { unreachable_ = unreachable_.getUnmodifiableView(); @@ -131,89 +130,87 @@ private ListVolumeSnapshotsResponse( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_ListVolumeSnapshotsResponse_descriptor; + return com.google.cloud.baremetalsolution.v2.NfsShareProto + .internal_static_google_cloud_baremetalsolution_v2_ListNfsSharesResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_ListVolumeSnapshotsResponse_fieldAccessorTable + return com.google.cloud.baremetalsolution.v2.NfsShareProto + .internal_static_google_cloud_baremetalsolution_v2_ListNfsSharesResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse.class, - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse.Builder.class); + com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse.class, + com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse.Builder.class); } - public static final int VOLUME_SNAPSHOTS_FIELD_NUMBER = 1; - private java.util.List volumeSnapshots_; + public static final int NFS_SHARES_FIELD_NUMBER = 1; + private java.util.List nfsShares_; /** * * *
-   * The list of storage volumes.
+   * The list of NFS shares.
    * 
* - * repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; + * repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; */ @java.lang.Override - public java.util.List - getVolumeSnapshotsList() { - return volumeSnapshots_; + public java.util.List getNfsSharesList() { + return nfsShares_; } /** * * *
-   * The list of storage volumes.
+   * The list of NFS shares.
    * 
* - * repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; + * repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; */ @java.lang.Override - public java.util.List - getVolumeSnapshotsOrBuilderList() { - return volumeSnapshots_; + public java.util.List + getNfsSharesOrBuilderList() { + return nfsShares_; } /** * * *
-   * The list of storage volumes.
+   * The list of NFS shares.
    * 
* - * repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; + * repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; */ @java.lang.Override - public int getVolumeSnapshotsCount() { - return volumeSnapshots_.size(); + public int getNfsSharesCount() { + return nfsShares_.size(); } /** * * *
-   * The list of storage volumes.
+   * The list of NFS shares.
    * 
* - * repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; + * repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; */ @java.lang.Override - public com.google.cloud.baremetalsolution.v2.VolumeSnapshot getVolumeSnapshots(int index) { - return volumeSnapshots_.get(index); + public com.google.cloud.baremetalsolution.v2.NfsShare getNfsShares(int index) { + return nfsShares_.get(index); } /** * * *
-   * The list of storage volumes.
+   * The list of NFS shares.
    * 
* - * repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; + * repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; */ @java.lang.Override - public com.google.cloud.baremetalsolution.v2.VolumeSnapshotOrBuilder getVolumeSnapshotsOrBuilder( - int index) { - return volumeSnapshots_.get(index); + public com.google.cloud.baremetalsolution.v2.NfsShareOrBuilder getNfsSharesOrBuilder(int index) { + return nfsShares_.get(index); } public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; @@ -340,8 +337,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < volumeSnapshots_.size(); i++) { - output.writeMessage(1, volumeSnapshots_.get(i)); + for (int i = 0; i < nfsShares_.size(); i++) { + output.writeMessage(1, nfsShares_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); @@ -358,8 +355,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - for (int i = 0; i < volumeSnapshots_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, volumeSnapshots_.get(i)); + for (int i = 0; i < nfsShares_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, nfsShares_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); @@ -382,13 +379,13 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse)) { + if (!(obj instanceof com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse)) { return super.equals(obj); } - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse other = - (com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse) obj; + com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse other = + (com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse) obj; - if (!getVolumeSnapshotsList().equals(other.getVolumeSnapshotsList())) return false; + if (!getNfsSharesList().equals(other.getNfsSharesList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; if (!getUnreachableList().equals(other.getUnreachableList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; @@ -402,9 +399,9 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (getVolumeSnapshotsCount() > 0) { - hash = (37 * hash) + VOLUME_SNAPSHOTS_FIELD_NUMBER; - hash = (53 * hash) + getVolumeSnapshotsList().hashCode(); + if (getNfsSharesCount() > 0) { + hash = (37 * hash) + NFS_SHARES_FIELD_NUMBER; + hash = (53 * hash) + getNfsSharesList().hashCode(); } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); @@ -417,72 +414,71 @@ public int hashCode() { return hash; } - public static com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse parseFrom( + public static com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse parseFrom( + public static com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse parseFrom( + public static com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse parseFrom( + public static com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse parseFrom( + public static com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse parseFrom( + public static com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse parseFrom( + public static com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + public static com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + public static com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse parseFrom( + public static com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse parseFrom( + public static com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -500,7 +496,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse prototype) { + com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -518,32 +514,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Response message containing the list of storage volume snapshots.
+   * Response message containing the list of NFS shares.
    * 
* - * Protobuf type {@code google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse} + * Protobuf type {@code google.cloud.baremetalsolution.v2.ListNfsSharesResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse) - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponseOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.ListNfsSharesResponse) + com.google.cloud.baremetalsolution.v2.ListNfsSharesResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_ListVolumeSnapshotsResponse_descriptor; + return com.google.cloud.baremetalsolution.v2.NfsShareProto + .internal_static_google_cloud_baremetalsolution_v2_ListNfsSharesResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_ListVolumeSnapshotsResponse_fieldAccessorTable + return com.google.cloud.baremetalsolution.v2.NfsShareProto + .internal_static_google_cloud_baremetalsolution_v2_ListNfsSharesResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse.class, - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse.Builder.class); + com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse.class, + com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse.Builder.class); } - // Construct using - // com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse.newBuilder() + // Construct using com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -555,18 +550,18 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getVolumeSnapshotsFieldBuilder(); + getNfsSharesFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); - if (volumeSnapshotsBuilder_ == null) { - volumeSnapshots_ = java.util.Collections.emptyList(); + if (nfsSharesBuilder_ == null) { + nfsShares_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { - volumeSnapshotsBuilder_.clear(); + nfsSharesBuilder_.clear(); } nextPageToken_ = ""; @@ -577,19 +572,18 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_ListVolumeSnapshotsResponse_descriptor; + return com.google.cloud.baremetalsolution.v2.NfsShareProto + .internal_static_google_cloud_baremetalsolution_v2_ListNfsSharesResponse_descriptor; } @java.lang.Override - public com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse - getDefaultInstanceForType() { - return com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse.getDefaultInstance(); + public com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse getDefaultInstanceForType() { + return com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse build() { - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse result = buildPartial(); + public com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse build() { + com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -597,18 +591,18 @@ public com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse build() } @java.lang.Override - public com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse buildPartial() { - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse result = - new com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse(this); + public com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse buildPartial() { + com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse result = + new com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse(this); int from_bitField0_ = bitField0_; - if (volumeSnapshotsBuilder_ == null) { + if (nfsSharesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { - volumeSnapshots_ = java.util.Collections.unmodifiableList(volumeSnapshots_); + nfsShares_ = java.util.Collections.unmodifiableList(nfsShares_); bitField0_ = (bitField0_ & ~0x00000001); } - result.volumeSnapshots_ = volumeSnapshots_; + result.nfsShares_ = nfsShares_; } else { - result.volumeSnapshots_ = volumeSnapshotsBuilder_.build(); + result.nfsShares_ = nfsSharesBuilder_.build(); } result.nextPageToken_ = nextPageToken_; if (((bitField0_ & 0x00000002) != 0)) { @@ -655,43 +649,41 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse) { - return mergeFrom((com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse) other); + if (other instanceof com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse) { + return mergeFrom((com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom( - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse other) { - if (other - == com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse other) { + if (other == com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse.getDefaultInstance()) return this; - if (volumeSnapshotsBuilder_ == null) { - if (!other.volumeSnapshots_.isEmpty()) { - if (volumeSnapshots_.isEmpty()) { - volumeSnapshots_ = other.volumeSnapshots_; + if (nfsSharesBuilder_ == null) { + if (!other.nfsShares_.isEmpty()) { + if (nfsShares_.isEmpty()) { + nfsShares_ = other.nfsShares_; bitField0_ = (bitField0_ & ~0x00000001); } else { - ensureVolumeSnapshotsIsMutable(); - volumeSnapshots_.addAll(other.volumeSnapshots_); + ensureNfsSharesIsMutable(); + nfsShares_.addAll(other.nfsShares_); } onChanged(); } } else { - if (!other.volumeSnapshots_.isEmpty()) { - if (volumeSnapshotsBuilder_.isEmpty()) { - volumeSnapshotsBuilder_.dispose(); - volumeSnapshotsBuilder_ = null; - volumeSnapshots_ = other.volumeSnapshots_; + if (!other.nfsShares_.isEmpty()) { + if (nfsSharesBuilder_.isEmpty()) { + nfsSharesBuilder_.dispose(); + nfsSharesBuilder_ = null; + nfsShares_ = other.nfsShares_; bitField0_ = (bitField0_ & ~0x00000001); - volumeSnapshotsBuilder_ = + nfsSharesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getVolumeSnapshotsFieldBuilder() + ? getNfsSharesFieldBuilder() : null; } else { - volumeSnapshotsBuilder_.addAllMessages(other.volumeSnapshots_); + nfsSharesBuilder_.addAllMessages(other.nfsShares_); } } } @@ -724,13 +716,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse parsedMessage = null; + com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse) - e.getUnfinishedMessage(); + (com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -742,93 +733,90 @@ public Builder mergeFrom( private int bitField0_; - private java.util.List volumeSnapshots_ = + private java.util.List nfsShares_ = java.util.Collections.emptyList(); - private void ensureVolumeSnapshotsIsMutable() { + private void ensureNfsSharesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { - volumeSnapshots_ = - new java.util.ArrayList( - volumeSnapshots_); + nfsShares_ = + new java.util.ArrayList(nfsShares_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.baremetalsolution.v2.VolumeSnapshot, - com.google.cloud.baremetalsolution.v2.VolumeSnapshot.Builder, - com.google.cloud.baremetalsolution.v2.VolumeSnapshotOrBuilder> - volumeSnapshotsBuilder_; + com.google.cloud.baremetalsolution.v2.NfsShare, + com.google.cloud.baremetalsolution.v2.NfsShare.Builder, + com.google.cloud.baremetalsolution.v2.NfsShareOrBuilder> + nfsSharesBuilder_; /** * * *
-     * The list of storage volumes.
+     * The list of NFS shares.
      * 
* - * repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; + * repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; */ - public java.util.List - getVolumeSnapshotsList() { - if (volumeSnapshotsBuilder_ == null) { - return java.util.Collections.unmodifiableList(volumeSnapshots_); + public java.util.List getNfsSharesList() { + if (nfsSharesBuilder_ == null) { + return java.util.Collections.unmodifiableList(nfsShares_); } else { - return volumeSnapshotsBuilder_.getMessageList(); + return nfsSharesBuilder_.getMessageList(); } } /** * * *
-     * The list of storage volumes.
+     * The list of NFS shares.
      * 
* - * repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; + * repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; */ - public int getVolumeSnapshotsCount() { - if (volumeSnapshotsBuilder_ == null) { - return volumeSnapshots_.size(); + public int getNfsSharesCount() { + if (nfsSharesBuilder_ == null) { + return nfsShares_.size(); } else { - return volumeSnapshotsBuilder_.getCount(); + return nfsSharesBuilder_.getCount(); } } /** * * *
-     * The list of storage volumes.
+     * The list of NFS shares.
      * 
* - * repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; + * repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; */ - public com.google.cloud.baremetalsolution.v2.VolumeSnapshot getVolumeSnapshots(int index) { - if (volumeSnapshotsBuilder_ == null) { - return volumeSnapshots_.get(index); + public com.google.cloud.baremetalsolution.v2.NfsShare getNfsShares(int index) { + if (nfsSharesBuilder_ == null) { + return nfsShares_.get(index); } else { - return volumeSnapshotsBuilder_.getMessage(index); + return nfsSharesBuilder_.getMessage(index); } } /** * * *
-     * The list of storage volumes.
+     * The list of NFS shares.
      * 
* - * repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; + * repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; */ - public Builder setVolumeSnapshots( - int index, com.google.cloud.baremetalsolution.v2.VolumeSnapshot value) { - if (volumeSnapshotsBuilder_ == null) { + public Builder setNfsShares(int index, com.google.cloud.baremetalsolution.v2.NfsShare value) { + if (nfsSharesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureVolumeSnapshotsIsMutable(); - volumeSnapshots_.set(index, value); + ensureNfsSharesIsMutable(); + nfsShares_.set(index, value); onChanged(); } else { - volumeSnapshotsBuilder_.setMessage(index, value); + nfsSharesBuilder_.setMessage(index, value); } return this; } @@ -836,19 +824,19 @@ public Builder setVolumeSnapshots( * * *
-     * The list of storage volumes.
+     * The list of NFS shares.
      * 
* - * repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; + * repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; */ - public Builder setVolumeSnapshots( - int index, com.google.cloud.baremetalsolution.v2.VolumeSnapshot.Builder builderForValue) { - if (volumeSnapshotsBuilder_ == null) { - ensureVolumeSnapshotsIsMutable(); - volumeSnapshots_.set(index, builderForValue.build()); + public Builder setNfsShares( + int index, com.google.cloud.baremetalsolution.v2.NfsShare.Builder builderForValue) { + if (nfsSharesBuilder_ == null) { + ensureNfsSharesIsMutable(); + nfsShares_.set(index, builderForValue.build()); onChanged(); } else { - volumeSnapshotsBuilder_.setMessage(index, builderForValue.build()); + nfsSharesBuilder_.setMessage(index, builderForValue.build()); } return this; } @@ -856,21 +844,21 @@ public Builder setVolumeSnapshots( * * *
-     * The list of storage volumes.
+     * The list of NFS shares.
      * 
* - * repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; + * repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; */ - public Builder addVolumeSnapshots(com.google.cloud.baremetalsolution.v2.VolumeSnapshot value) { - if (volumeSnapshotsBuilder_ == null) { + public Builder addNfsShares(com.google.cloud.baremetalsolution.v2.NfsShare value) { + if (nfsSharesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureVolumeSnapshotsIsMutable(); - volumeSnapshots_.add(value); + ensureNfsSharesIsMutable(); + nfsShares_.add(value); onChanged(); } else { - volumeSnapshotsBuilder_.addMessage(value); + nfsSharesBuilder_.addMessage(value); } return this; } @@ -878,22 +866,21 @@ public Builder addVolumeSnapshots(com.google.cloud.baremetalsolution.v2.VolumeSn * * *
-     * The list of storage volumes.
+     * The list of NFS shares.
      * 
* - * repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; + * repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; */ - public Builder addVolumeSnapshots( - int index, com.google.cloud.baremetalsolution.v2.VolumeSnapshot value) { - if (volumeSnapshotsBuilder_ == null) { + public Builder addNfsShares(int index, com.google.cloud.baremetalsolution.v2.NfsShare value) { + if (nfsSharesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureVolumeSnapshotsIsMutable(); - volumeSnapshots_.add(index, value); + ensureNfsSharesIsMutable(); + nfsShares_.add(index, value); onChanged(); } else { - volumeSnapshotsBuilder_.addMessage(index, value); + nfsSharesBuilder_.addMessage(index, value); } return this; } @@ -901,19 +888,19 @@ public Builder addVolumeSnapshots( * * *
-     * The list of storage volumes.
+     * The list of NFS shares.
      * 
* - * repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; + * repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; */ - public Builder addVolumeSnapshots( - com.google.cloud.baremetalsolution.v2.VolumeSnapshot.Builder builderForValue) { - if (volumeSnapshotsBuilder_ == null) { - ensureVolumeSnapshotsIsMutable(); - volumeSnapshots_.add(builderForValue.build()); + public Builder addNfsShares( + com.google.cloud.baremetalsolution.v2.NfsShare.Builder builderForValue) { + if (nfsSharesBuilder_ == null) { + ensureNfsSharesIsMutable(); + nfsShares_.add(builderForValue.build()); onChanged(); } else { - volumeSnapshotsBuilder_.addMessage(builderForValue.build()); + nfsSharesBuilder_.addMessage(builderForValue.build()); } return this; } @@ -921,19 +908,19 @@ public Builder addVolumeSnapshots( * * *
-     * The list of storage volumes.
+     * The list of NFS shares.
      * 
* - * repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; + * repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; */ - public Builder addVolumeSnapshots( - int index, com.google.cloud.baremetalsolution.v2.VolumeSnapshot.Builder builderForValue) { - if (volumeSnapshotsBuilder_ == null) { - ensureVolumeSnapshotsIsMutable(); - volumeSnapshots_.add(index, builderForValue.build()); + public Builder addNfsShares( + int index, com.google.cloud.baremetalsolution.v2.NfsShare.Builder builderForValue) { + if (nfsSharesBuilder_ == null) { + ensureNfsSharesIsMutable(); + nfsShares_.add(index, builderForValue.build()); onChanged(); } else { - volumeSnapshotsBuilder_.addMessage(index, builderForValue.build()); + nfsSharesBuilder_.addMessage(index, builderForValue.build()); } return this; } @@ -941,19 +928,19 @@ public Builder addVolumeSnapshots( * * *
-     * The list of storage volumes.
+     * The list of NFS shares.
      * 
* - * repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; + * repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; */ - public Builder addAllVolumeSnapshots( - java.lang.Iterable values) { - if (volumeSnapshotsBuilder_ == null) { - ensureVolumeSnapshotsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, volumeSnapshots_); + public Builder addAllNfsShares( + java.lang.Iterable values) { + if (nfsSharesBuilder_ == null) { + ensureNfsSharesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, nfsShares_); onChanged(); } else { - volumeSnapshotsBuilder_.addAllMessages(values); + nfsSharesBuilder_.addAllMessages(values); } return this; } @@ -961,18 +948,18 @@ public Builder addAllVolumeSnapshots( * * *
-     * The list of storage volumes.
+     * The list of NFS shares.
      * 
* - * repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; + * repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; */ - public Builder clearVolumeSnapshots() { - if (volumeSnapshotsBuilder_ == null) { - volumeSnapshots_ = java.util.Collections.emptyList(); + public Builder clearNfsShares() { + if (nfsSharesBuilder_ == null) { + nfsShares_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { - volumeSnapshotsBuilder_.clear(); + nfsSharesBuilder_.clear(); } return this; } @@ -980,18 +967,18 @@ public Builder clearVolumeSnapshots() { * * *
-     * The list of storage volumes.
+     * The list of NFS shares.
      * 
* - * repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; + * repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; */ - public Builder removeVolumeSnapshots(int index) { - if (volumeSnapshotsBuilder_ == null) { - ensureVolumeSnapshotsIsMutable(); - volumeSnapshots_.remove(index); + public Builder removeNfsShares(int index) { + if (nfsSharesBuilder_ == null) { + ensureNfsSharesIsMutable(); + nfsShares_.remove(index); onChanged(); } else { - volumeSnapshotsBuilder_.remove(index); + nfsSharesBuilder_.remove(index); } return this; } @@ -999,110 +986,103 @@ public Builder removeVolumeSnapshots(int index) { * * *
-     * The list of storage volumes.
+     * The list of NFS shares.
      * 
* - * repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; + * repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; */ - public com.google.cloud.baremetalsolution.v2.VolumeSnapshot.Builder getVolumeSnapshotsBuilder( - int index) { - return getVolumeSnapshotsFieldBuilder().getBuilder(index); + public com.google.cloud.baremetalsolution.v2.NfsShare.Builder getNfsSharesBuilder(int index) { + return getNfsSharesFieldBuilder().getBuilder(index); } /** * * *
-     * The list of storage volumes.
+     * The list of NFS shares.
      * 
* - * repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; + * repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; */ - public com.google.cloud.baremetalsolution.v2.VolumeSnapshotOrBuilder - getVolumeSnapshotsOrBuilder(int index) { - if (volumeSnapshotsBuilder_ == null) { - return volumeSnapshots_.get(index); + public com.google.cloud.baremetalsolution.v2.NfsShareOrBuilder getNfsSharesOrBuilder( + int index) { + if (nfsSharesBuilder_ == null) { + return nfsShares_.get(index); } else { - return volumeSnapshotsBuilder_.getMessageOrBuilder(index); + return nfsSharesBuilder_.getMessageOrBuilder(index); } } /** * * *
-     * The list of storage volumes.
+     * The list of NFS shares.
      * 
* - * repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; + * repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; */ - public java.util.List - getVolumeSnapshotsOrBuilderList() { - if (volumeSnapshotsBuilder_ != null) { - return volumeSnapshotsBuilder_.getMessageOrBuilderList(); + public java.util.List + getNfsSharesOrBuilderList() { + if (nfsSharesBuilder_ != null) { + return nfsSharesBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(volumeSnapshots_); + return java.util.Collections.unmodifiableList(nfsShares_); } } /** * * *
-     * The list of storage volumes.
+     * The list of NFS shares.
      * 
* - * repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; + * repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; */ - public com.google.cloud.baremetalsolution.v2.VolumeSnapshot.Builder - addVolumeSnapshotsBuilder() { - return getVolumeSnapshotsFieldBuilder() - .addBuilder(com.google.cloud.baremetalsolution.v2.VolumeSnapshot.getDefaultInstance()); + public com.google.cloud.baremetalsolution.v2.NfsShare.Builder addNfsSharesBuilder() { + return getNfsSharesFieldBuilder() + .addBuilder(com.google.cloud.baremetalsolution.v2.NfsShare.getDefaultInstance()); } /** * * *
-     * The list of storage volumes.
+     * The list of NFS shares.
      * 
* - * repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; + * repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; */ - public com.google.cloud.baremetalsolution.v2.VolumeSnapshot.Builder addVolumeSnapshotsBuilder( - int index) { - return getVolumeSnapshotsFieldBuilder() - .addBuilder( - index, com.google.cloud.baremetalsolution.v2.VolumeSnapshot.getDefaultInstance()); + public com.google.cloud.baremetalsolution.v2.NfsShare.Builder addNfsSharesBuilder(int index) { + return getNfsSharesFieldBuilder() + .addBuilder(index, com.google.cloud.baremetalsolution.v2.NfsShare.getDefaultInstance()); } /** * * *
-     * The list of storage volumes.
+     * The list of NFS shares.
      * 
* - * repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; + * repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; */ - public java.util.List - getVolumeSnapshotsBuilderList() { - return getVolumeSnapshotsFieldBuilder().getBuilderList(); + public java.util.List + getNfsSharesBuilderList() { + return getNfsSharesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.baremetalsolution.v2.VolumeSnapshot, - com.google.cloud.baremetalsolution.v2.VolumeSnapshot.Builder, - com.google.cloud.baremetalsolution.v2.VolumeSnapshotOrBuilder> - getVolumeSnapshotsFieldBuilder() { - if (volumeSnapshotsBuilder_ == null) { - volumeSnapshotsBuilder_ = + com.google.cloud.baremetalsolution.v2.NfsShare, + com.google.cloud.baremetalsolution.v2.NfsShare.Builder, + com.google.cloud.baremetalsolution.v2.NfsShareOrBuilder> + getNfsSharesFieldBuilder() { + if (nfsSharesBuilder_ == null) { + nfsSharesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.baremetalsolution.v2.VolumeSnapshot, - com.google.cloud.baremetalsolution.v2.VolumeSnapshot.Builder, - com.google.cloud.baremetalsolution.v2.VolumeSnapshotOrBuilder>( - volumeSnapshots_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - volumeSnapshots_ = null; + com.google.cloud.baremetalsolution.v2.NfsShare, + com.google.cloud.baremetalsolution.v2.NfsShare.Builder, + com.google.cloud.baremetalsolution.v2.NfsShareOrBuilder>( + nfsShares_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + nfsShares_ = null; } - return volumeSnapshotsBuilder_; + return nfsSharesBuilder_; } private java.lang.Object nextPageToken_ = ""; @@ -1390,45 +1370,42 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse) + // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.ListNfsSharesResponse) } - // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse) - private static final com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse - DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.ListNfsSharesResponse) + private static final com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse(); + DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse(); } - public static com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse - getDefaultInstance() { + public static com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public ListVolumeSnapshotsResponse parsePartialFrom( + public ListNfsSharesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListVolumeSnapshotsResponse(input, extensionRegistry); + return new ListNfsSharesResponse(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse - getDefaultInstanceForType() { + public com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListVolumeSnapshotsResponseOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNfsSharesResponseOrBuilder.java similarity index 68% rename from java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListVolumeSnapshotsResponseOrBuilder.java rename to java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNfsSharesResponseOrBuilder.java index b7e9ca571780..219771e17ea2 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListVolumeSnapshotsResponseOrBuilder.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListNfsSharesResponseOrBuilder.java @@ -14,67 +14,66 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/nfs_share.proto package com.google.cloud.baremetalsolution.v2; -public interface ListVolumeSnapshotsResponseOrBuilder +public interface ListNfsSharesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.ListVolumeSnapshotsResponse) + // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.ListNfsSharesResponse) com.google.protobuf.MessageOrBuilder { /** * * *
-   * The list of storage volumes.
+   * The list of NFS shares.
    * 
* - * repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; + * repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; */ - java.util.List getVolumeSnapshotsList(); + java.util.List getNfsSharesList(); /** * * *
-   * The list of storage volumes.
+   * The list of NFS shares.
    * 
* - * repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; + * repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; */ - com.google.cloud.baremetalsolution.v2.VolumeSnapshot getVolumeSnapshots(int index); + com.google.cloud.baremetalsolution.v2.NfsShare getNfsShares(int index); /** * * *
-   * The list of storage volumes.
+   * The list of NFS shares.
    * 
* - * repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; + * repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; */ - int getVolumeSnapshotsCount(); + int getNfsSharesCount(); /** * * *
-   * The list of storage volumes.
+   * The list of NFS shares.
    * 
* - * repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; + * repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; */ - java.util.List - getVolumeSnapshotsOrBuilderList(); + java.util.List + getNfsSharesOrBuilderList(); /** * * *
-   * The list of storage volumes.
+   * The list of NFS shares.
    * 
* - * repeated .google.cloud.baremetalsolution.v2.VolumeSnapshot volume_snapshots = 1; + * repeated .google.cloud.baremetalsolution.v2.NfsShare nfs_shares = 1; */ - com.google.cloud.baremetalsolution.v2.VolumeSnapshotOrBuilder getVolumeSnapshotsOrBuilder( - int index); + com.google.cloud.baremetalsolution.v2.NfsShareOrBuilder getNfsSharesOrBuilder(int index); /** * diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListSnapshotSchedulePoliciesRequestOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListSnapshotSchedulePoliciesRequestOrBuilder.java deleted file mode 100644 index f5a85e03417d..000000000000 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListSnapshotSchedulePoliciesRequestOrBuilder.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto - -package com.google.cloud.baremetalsolution.v2; - -public interface ListSnapshotSchedulePoliciesRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The parent project containing the Snapshot Schedule Policies.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The parent project containing the Snapshot Schedule Policies.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * The maximum number of items to return.
-   * 
- * - * int32 page_size = 2; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * The next_page_token value returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * The next_page_token value returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); -} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListSnapshotSchedulePoliciesResponse.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListSnapshotSchedulePoliciesResponse.java deleted file mode 100644 index e849db0572bc..000000000000 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListSnapshotSchedulePoliciesResponse.java +++ /dev/null @@ -1,1245 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto - -package com.google.cloud.baremetalsolution.v2; - -/** - * - * - *
- * Response message containing the list of snapshot schedule policies.
- * 
- * - * Protobuf type {@code google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse} - */ -public final class ListSnapshotSchedulePoliciesResponse - extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse) - ListSnapshotSchedulePoliciesResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListSnapshotSchedulePoliciesResponse.newBuilder() to construct. - private ListSnapshotSchedulePoliciesResponse( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListSnapshotSchedulePoliciesResponse() { - snapshotSchedulePolicies_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListSnapshotSchedulePoliciesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ListSnapshotSchedulePoliciesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - snapshotSchedulePolicies_ = - new java.util.ArrayList< - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy>(); - mutable_bitField0_ |= 0x00000001; - } - snapshotSchedulePolicies_.add( - input.readMessage( - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.parser(), - extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - snapshotSchedulePolicies_ = - java.util.Collections.unmodifiableList(snapshotSchedulePolicies_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_ListSnapshotSchedulePoliciesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_ListSnapshotSchedulePoliciesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse.class, - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse.Builder - .class); - } - - public static final int SNAPSHOT_SCHEDULE_POLICIES_FIELD_NUMBER = 1; - private java.util.List - snapshotSchedulePolicies_; - /** - * - * - *
-   * The snapshot schedule policies registered in this project.
-   * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policies = 1; - * - */ - @java.lang.Override - public java.util.List - getSnapshotSchedulePoliciesList() { - return snapshotSchedulePolicies_; - } - /** - * - * - *
-   * The snapshot schedule policies registered in this project.
-   * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policies = 1; - * - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicyOrBuilder> - getSnapshotSchedulePoliciesOrBuilderList() { - return snapshotSchedulePolicies_; - } - /** - * - * - *
-   * The snapshot schedule policies registered in this project.
-   * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policies = 1; - * - */ - @java.lang.Override - public int getSnapshotSchedulePoliciesCount() { - return snapshotSchedulePolicies_.size(); - } - /** - * - * - *
-   * The snapshot schedule policies registered in this project.
-   * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policies = 1; - * - */ - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy getSnapshotSchedulePolicies( - int index) { - return snapshotSchedulePolicies_.get(index); - } - /** - * - * - *
-   * The snapshot schedule policies registered in this project.
-   * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policies = 1; - * - */ - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicyOrBuilder - getSnapshotSchedulePoliciesOrBuilder(int index) { - return snapshotSchedulePolicies_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - * - * - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < snapshotSchedulePolicies_.size(); i++) { - output.writeMessage(1, snapshotSchedulePolicies_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < snapshotSchedulePolicies_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, snapshotSchedulePolicies_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse)) { - return super.equals(obj); - } - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse other = - (com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse) obj; - - if (!getSnapshotSchedulePoliciesList().equals(other.getSnapshotSchedulePoliciesList())) - return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getSnapshotSchedulePoliciesCount() > 0) { - hash = (37 * hash) + SNAPSHOT_SCHEDULE_POLICIES_FIELD_NUMBER; - hash = (53 * hash) + getSnapshotSchedulePoliciesList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message containing the list of snapshot schedule policies.
-   * 
- * - * Protobuf type {@code google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse) - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_ListSnapshotSchedulePoliciesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_ListSnapshotSchedulePoliciesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse.class, - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse.Builder - .class); - } - - // Construct using - // com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getSnapshotSchedulePoliciesFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (snapshotSchedulePoliciesBuilder_ == null) { - snapshotSchedulePolicies_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - snapshotSchedulePoliciesBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_ListSnapshotSchedulePoliciesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse - getDefaultInstanceForType() { - return com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse build() { - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse - buildPartial() { - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse result = - new com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse(this); - int from_bitField0_ = bitField0_; - if (snapshotSchedulePoliciesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - snapshotSchedulePolicies_ = - java.util.Collections.unmodifiableList(snapshotSchedulePolicies_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.snapshotSchedulePolicies_ = snapshotSchedulePolicies_; - } else { - result.snapshotSchedulePolicies_ = snapshotSchedulePoliciesBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse) { - return mergeFrom( - (com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse other) { - if (other - == com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse - .getDefaultInstance()) return this; - if (snapshotSchedulePoliciesBuilder_ == null) { - if (!other.snapshotSchedulePolicies_.isEmpty()) { - if (snapshotSchedulePolicies_.isEmpty()) { - snapshotSchedulePolicies_ = other.snapshotSchedulePolicies_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSnapshotSchedulePoliciesIsMutable(); - snapshotSchedulePolicies_.addAll(other.snapshotSchedulePolicies_); - } - onChanged(); - } - } else { - if (!other.snapshotSchedulePolicies_.isEmpty()) { - if (snapshotSchedulePoliciesBuilder_.isEmpty()) { - snapshotSchedulePoliciesBuilder_.dispose(); - snapshotSchedulePoliciesBuilder_ = null; - snapshotSchedulePolicies_ = other.snapshotSchedulePolicies_; - bitField0_ = (bitField0_ & ~0x00000001); - snapshotSchedulePoliciesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getSnapshotSchedulePoliciesFieldBuilder() - : null; - } else { - snapshotSchedulePoliciesBuilder_.addAllMessages(other.snapshotSchedulePolicies_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse parsedMessage = - null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List - snapshotSchedulePolicies_ = java.util.Collections.emptyList(); - - private void ensureSnapshotSchedulePoliciesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - snapshotSchedulePolicies_ = - new java.util.ArrayList( - snapshotSchedulePolicies_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Builder, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicyOrBuilder> - snapshotSchedulePoliciesBuilder_; - - /** - * - * - *
-     * The snapshot schedule policies registered in this project.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policies = 1; - * - */ - public java.util.List - getSnapshotSchedulePoliciesList() { - if (snapshotSchedulePoliciesBuilder_ == null) { - return java.util.Collections.unmodifiableList(snapshotSchedulePolicies_); - } else { - return snapshotSchedulePoliciesBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The snapshot schedule policies registered in this project.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policies = 1; - * - */ - public int getSnapshotSchedulePoliciesCount() { - if (snapshotSchedulePoliciesBuilder_ == null) { - return snapshotSchedulePolicies_.size(); - } else { - return snapshotSchedulePoliciesBuilder_.getCount(); - } - } - /** - * - * - *
-     * The snapshot schedule policies registered in this project.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policies = 1; - * - */ - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy getSnapshotSchedulePolicies( - int index) { - if (snapshotSchedulePoliciesBuilder_ == null) { - return snapshotSchedulePolicies_.get(index); - } else { - return snapshotSchedulePoliciesBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The snapshot schedule policies registered in this project.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policies = 1; - * - */ - public Builder setSnapshotSchedulePolicies( - int index, com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy value) { - if (snapshotSchedulePoliciesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSnapshotSchedulePoliciesIsMutable(); - snapshotSchedulePolicies_.set(index, value); - onChanged(); - } else { - snapshotSchedulePoliciesBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The snapshot schedule policies registered in this project.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policies = 1; - * - */ - public Builder setSnapshotSchedulePolicies( - int index, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Builder builderForValue) { - if (snapshotSchedulePoliciesBuilder_ == null) { - ensureSnapshotSchedulePoliciesIsMutable(); - snapshotSchedulePolicies_.set(index, builderForValue.build()); - onChanged(); - } else { - snapshotSchedulePoliciesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The snapshot schedule policies registered in this project.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policies = 1; - * - */ - public Builder addSnapshotSchedulePolicies( - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy value) { - if (snapshotSchedulePoliciesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSnapshotSchedulePoliciesIsMutable(); - snapshotSchedulePolicies_.add(value); - onChanged(); - } else { - snapshotSchedulePoliciesBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The snapshot schedule policies registered in this project.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policies = 1; - * - */ - public Builder addSnapshotSchedulePolicies( - int index, com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy value) { - if (snapshotSchedulePoliciesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSnapshotSchedulePoliciesIsMutable(); - snapshotSchedulePolicies_.add(index, value); - onChanged(); - } else { - snapshotSchedulePoliciesBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The snapshot schedule policies registered in this project.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policies = 1; - * - */ - public Builder addSnapshotSchedulePolicies( - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Builder builderForValue) { - if (snapshotSchedulePoliciesBuilder_ == null) { - ensureSnapshotSchedulePoliciesIsMutable(); - snapshotSchedulePolicies_.add(builderForValue.build()); - onChanged(); - } else { - snapshotSchedulePoliciesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The snapshot schedule policies registered in this project.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policies = 1; - * - */ - public Builder addSnapshotSchedulePolicies( - int index, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Builder builderForValue) { - if (snapshotSchedulePoliciesBuilder_ == null) { - ensureSnapshotSchedulePoliciesIsMutable(); - snapshotSchedulePolicies_.add(index, builderForValue.build()); - onChanged(); - } else { - snapshotSchedulePoliciesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The snapshot schedule policies registered in this project.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policies = 1; - * - */ - public Builder addAllSnapshotSchedulePolicies( - java.lang.Iterable - values) { - if (snapshotSchedulePoliciesBuilder_ == null) { - ensureSnapshotSchedulePoliciesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, snapshotSchedulePolicies_); - onChanged(); - } else { - snapshotSchedulePoliciesBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The snapshot schedule policies registered in this project.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policies = 1; - * - */ - public Builder clearSnapshotSchedulePolicies() { - if (snapshotSchedulePoliciesBuilder_ == null) { - snapshotSchedulePolicies_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - snapshotSchedulePoliciesBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The snapshot schedule policies registered in this project.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policies = 1; - * - */ - public Builder removeSnapshotSchedulePolicies(int index) { - if (snapshotSchedulePoliciesBuilder_ == null) { - ensureSnapshotSchedulePoliciesIsMutable(); - snapshotSchedulePolicies_.remove(index); - onChanged(); - } else { - snapshotSchedulePoliciesBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The snapshot schedule policies registered in this project.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policies = 1; - * - */ - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Builder - getSnapshotSchedulePoliciesBuilder(int index) { - return getSnapshotSchedulePoliciesFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The snapshot schedule policies registered in this project.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policies = 1; - * - */ - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicyOrBuilder - getSnapshotSchedulePoliciesOrBuilder(int index) { - if (snapshotSchedulePoliciesBuilder_ == null) { - return snapshotSchedulePolicies_.get(index); - } else { - return snapshotSchedulePoliciesBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The snapshot schedule policies registered in this project.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policies = 1; - * - */ - public java.util.List< - ? extends com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicyOrBuilder> - getSnapshotSchedulePoliciesOrBuilderList() { - if (snapshotSchedulePoliciesBuilder_ != null) { - return snapshotSchedulePoliciesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(snapshotSchedulePolicies_); - } - } - /** - * - * - *
-     * The snapshot schedule policies registered in this project.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policies = 1; - * - */ - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Builder - addSnapshotSchedulePoliciesBuilder() { - return getSnapshotSchedulePoliciesFieldBuilder() - .addBuilder( - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.getDefaultInstance()); - } - /** - * - * - *
-     * The snapshot schedule policies registered in this project.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policies = 1; - * - */ - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Builder - addSnapshotSchedulePoliciesBuilder(int index) { - return getSnapshotSchedulePoliciesFieldBuilder() - .addBuilder( - index, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.getDefaultInstance()); - } - /** - * - * - *
-     * The snapshot schedule policies registered in this project.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policies = 1; - * - */ - public java.util.List - getSnapshotSchedulePoliciesBuilderList() { - return getSnapshotSchedulePoliciesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Builder, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicyOrBuilder> - getSnapshotSchedulePoliciesFieldBuilder() { - if (snapshotSchedulePoliciesBuilder_ == null) { - snapshotSchedulePoliciesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Builder, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicyOrBuilder>( - snapshotSchedulePolicies_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - snapshotSchedulePolicies_ = null; - } - return snapshotSchedulePoliciesBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse) - private static final com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse(); - } - - public static com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListSnapshotSchedulePoliciesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListSnapshotSchedulePoliciesResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListSnapshotSchedulePoliciesResponseOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListSnapshotSchedulePoliciesResponseOrBuilder.java deleted file mode 100644 index eb1ea404f4a2..000000000000 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListSnapshotSchedulePoliciesResponseOrBuilder.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto - -package com.google.cloud.baremetalsolution.v2; - -public interface ListSnapshotSchedulePoliciesResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.ListSnapshotSchedulePoliciesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The snapshot schedule policies registered in this project.
-   * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policies = 1; - * - */ - java.util.List - getSnapshotSchedulePoliciesList(); - /** - * - * - *
-   * The snapshot schedule policies registered in this project.
-   * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policies = 1; - * - */ - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy getSnapshotSchedulePolicies( - int index); - /** - * - * - *
-   * The snapshot schedule policies registered in this project.
-   * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policies = 1; - * - */ - int getSnapshotSchedulePoliciesCount(); - /** - * - * - *
-   * The snapshot schedule policies registered in this project.
-   * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policies = 1; - * - */ - java.util.List - getSnapshotSchedulePoliciesOrBuilderList(); - /** - * - * - *
-   * The snapshot schedule policies registered in this project.
-   * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policies = 1; - * - */ - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicyOrBuilder - getSnapshotSchedulePoliciesOrBuilder(int index); - - /** - * - * - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); -} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListVolumesRequest.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListVolumesRequest.java index 886ac9cd4700..31b65d9f0307 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListVolumesRequest.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListVolumesRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/volume.proto package com.google.cloud.baremetalsolution.v2; @@ -40,6 +40,7 @@ private ListVolumesRequest(com.google.protobuf.GeneratedMessageV3.Builder bui private ListVolumesRequest() { parent_ = ""; pageToken_ = ""; + filter_ = ""; } @java.lang.Override @@ -90,6 +91,13 @@ private ListVolumesRequest( pageToken_ = s; break; } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -112,14 +120,14 @@ private ListVolumesRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_ListVolumesRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_ListVolumesRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.ListVolumesRequest.class, @@ -247,6 +255,55 @@ public com.google.protobuf.ByteString getPageTokenBytes() { } } + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * List filter.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * List filter.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -270,6 +327,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } unknownFields.writeTo(output); } @@ -288,6 +348,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -307,6 +370,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -324,6 +388,8 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -439,14 +505,14 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.ListVolumesRequest) com.google.cloud.baremetalsolution.v2.ListVolumesRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_ListVolumesRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_ListVolumesRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.ListVolumesRequest.class, @@ -476,12 +542,14 @@ public Builder clear() { pageToken_ = ""; + filter_ = ""; + return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_ListVolumesRequest_descriptor; } @@ -506,6 +574,7 @@ public com.google.cloud.baremetalsolution.v2.ListVolumesRequest buildPartial() { result.parent_ = parent_; result.pageSize_ = pageSize_; result.pageToken_ = pageToken_; + result.filter_ = filter_; onBuilt(); return result; } @@ -567,6 +636,10 @@ public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.ListVolumesReques pageToken_ = other.pageToken_; onChanged(); } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -874,6 +947,112 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListVolumesRequestOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListVolumesRequestOrBuilder.java index 10a64dbf40e7..6db831582472 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListVolumesRequestOrBuilder.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListVolumesRequestOrBuilder.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/volume.proto package com.google.cloud.baremetalsolution.v2; @@ -90,4 +90,29 @@ public interface ListVolumesRequestOrBuilder * @return The bytes for pageToken. */ com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * List filter.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * List filter.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListVolumesResponse.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListVolumesResponse.java index 0180abcd67b8..06aba8484238 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListVolumesResponse.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListVolumesResponse.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/volume.proto package com.google.cloud.baremetalsolution.v2; @@ -129,14 +129,14 @@ private ListVolumesResponse( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_ListVolumesResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_ListVolumesResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.ListVolumesResponse.class, @@ -523,14 +523,14 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.ListVolumesResponse) com.google.cloud.baremetalsolution.v2.ListVolumesResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_ListVolumesResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_ListVolumesResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.ListVolumesResponse.class, @@ -571,7 +571,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_ListVolumesResponse_descriptor; } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListVolumesResponseOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListVolumesResponseOrBuilder.java index 62887de25150..4d4b8f6759b8 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListVolumesResponseOrBuilder.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListVolumesResponseOrBuilder.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/volume.proto package com.google.cloud.baremetalsolution.v2; diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/LogicalInterface.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/LogicalInterface.java new file mode 100644 index 000000000000..2a49f8baeb2b --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/LogicalInterface.java @@ -0,0 +1,2727 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/baremetalsolution/v2/network.proto + +package com.google.cloud.baremetalsolution.v2; + +/** + * + * + *
+ * Each logical interface represents a logical abstraction of the underlying
+ * physical interface (for eg. bond, nic) of the instance. Each logical
+ * interface can effectively map to multiple network-IP pairs and still be
+ * mapped to one underlying physical interface.
+ * 
+ * + * Protobuf type {@code google.cloud.baremetalsolution.v2.LogicalInterface} + */ +public final class LogicalInterface extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.LogicalInterface) + LogicalInterfaceOrBuilder { + private static final long serialVersionUID = 0L; + // Use LogicalInterface.newBuilder() to construct. + private LogicalInterface(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LogicalInterface() { + logicalNetworkInterfaces_ = java.util.Collections.emptyList(); + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LogicalInterface(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LogicalInterface( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + logicalNetworkInterfaces_ = + new java.util.ArrayList< + com.google.cloud.baremetalsolution.v2.LogicalInterface + .LogicalNetworkInterface>(); + mutable_bitField0_ |= 0x00000001; + } + logicalNetworkInterfaces_.add( + input.readMessage( + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface + .parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 24: + { + interfaceIndex_ = input.readInt32(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + logicalNetworkInterfaces_ = + java.util.Collections.unmodifiableList(logicalNetworkInterfaces_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_LogicalInterface_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_LogicalInterface_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.baremetalsolution.v2.LogicalInterface.class, + com.google.cloud.baremetalsolution.v2.LogicalInterface.Builder.class); + } + + public interface LogicalNetworkInterfaceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Name of the network
+     * 
+ * + * string network = 1; + * + * @return The network. + */ + java.lang.String getNetwork(); + /** + * + * + *
+     * Name of the network
+     * 
+ * + * string network = 1; + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); + + /** + * + * + *
+     * IP address in the network
+     * 
+ * + * string ip_address = 2; + * + * @return The ipAddress. + */ + java.lang.String getIpAddress(); + /** + * + * + *
+     * IP address in the network
+     * 
+ * + * string ip_address = 2; + * + * @return The bytes for ipAddress. + */ + com.google.protobuf.ByteString getIpAddressBytes(); + + /** + * + * + *
+     * Whether this interface is the default gateway for the instance. Only
+     * one interface can be the default gateway for the instance.
+     * 
+ * + * bool default_gateway = 3; + * + * @return The defaultGateway. + */ + boolean getDefaultGateway(); + + /** + * + * + *
+     * Type of network.
+     * 
+ * + * .google.cloud.baremetalsolution.v2.Network.Type network_type = 4; + * + * @return The enum numeric value on the wire for networkType. + */ + int getNetworkTypeValue(); + /** + * + * + *
+     * Type of network.
+     * 
+ * + * .google.cloud.baremetalsolution.v2.Network.Type network_type = 4; + * + * @return The networkType. + */ + com.google.cloud.baremetalsolution.v2.Network.Type getNetworkType(); + + /** + * + * + *
+     * An identifier for the `Network`, generated by the backend.
+     * 
+ * + * string id = 5; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+     * An identifier for the `Network`, generated by the backend.
+     * 
+ * + * string id = 5; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + } + /** + * + * + *
+   * Each logical network interface is effectively a network and IP pair.
+   * 
+ * + * Protobuf type {@code + * google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface} + */ + public static final class LogicalNetworkInterface extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface) + LogicalNetworkInterfaceOrBuilder { + private static final long serialVersionUID = 0L; + // Use LogicalNetworkInterface.newBuilder() to construct. + private LogicalNetworkInterface(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LogicalNetworkInterface() { + network_ = ""; + ipAddress_ = ""; + networkType_ = 0; + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LogicalNetworkInterface(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LogicalNetworkInterface( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + network_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + ipAddress_ = s; + break; + } + case 24: + { + defaultGateway_ = input.readBool(); + break; + } + case 32: + { + int rawValue = input.readEnum(); + + networkType_ = rawValue; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + id_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_LogicalInterface_LogicalNetworkInterface_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_LogicalInterface_LogicalNetworkInterface_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface.class, + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface.Builder + .class); + } + + public static final int NETWORK_FIELD_NUMBER = 1; + private volatile java.lang.Object network_; + /** + * + * + *
+     * Name of the network
+     * 
+ * + * string network = 1; + * + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } + } + /** + * + * + *
+     * Name of the network
+     * 
+ * + * string network = 1; + * + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IP_ADDRESS_FIELD_NUMBER = 2; + private volatile java.lang.Object ipAddress_; + /** + * + * + *
+     * IP address in the network
+     * 
+ * + * string ip_address = 2; + * + * @return The ipAddress. + */ + @java.lang.Override + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipAddress_ = s; + return s; + } + } + /** + * + * + *
+     * IP address in the network
+     * 
+ * + * string ip_address = 2; + * + * @return The bytes for ipAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFAULT_GATEWAY_FIELD_NUMBER = 3; + private boolean defaultGateway_; + /** + * + * + *
+     * Whether this interface is the default gateway for the instance. Only
+     * one interface can be the default gateway for the instance.
+     * 
+ * + * bool default_gateway = 3; + * + * @return The defaultGateway. + */ + @java.lang.Override + public boolean getDefaultGateway() { + return defaultGateway_; + } + + public static final int NETWORK_TYPE_FIELD_NUMBER = 4; + private int networkType_; + /** + * + * + *
+     * Type of network.
+     * 
+ * + * .google.cloud.baremetalsolution.v2.Network.Type network_type = 4; + * + * @return The enum numeric value on the wire for networkType. + */ + @java.lang.Override + public int getNetworkTypeValue() { + return networkType_; + } + /** + * + * + *
+     * Type of network.
+     * 
+ * + * .google.cloud.baremetalsolution.v2.Network.Type network_type = 4; + * + * @return The networkType. + */ + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.Network.Type getNetworkType() { + @SuppressWarnings("deprecation") + com.google.cloud.baremetalsolution.v2.Network.Type result = + com.google.cloud.baremetalsolution.v2.Network.Type.valueOf(networkType_); + return result == null + ? com.google.cloud.baremetalsolution.v2.Network.Type.UNRECOGNIZED + : result; + } + + public static final int ID_FIELD_NUMBER = 5; + private volatile java.lang.Object id_; + /** + * + * + *
+     * An identifier for the `Network`, generated by the backend.
+     * 
+ * + * string id = 5; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * + * + *
+     * An identifier for the `Network`, generated by the backend.
+     * 
+ * + * string id = 5; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, network_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ipAddress_); + } + if (defaultGateway_ != false) { + output.writeBool(3, defaultGateway_); + } + if (networkType_ + != com.google.cloud.baremetalsolution.v2.Network.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, networkType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, id_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, network_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ipAddress_); + } + if (defaultGateway_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, defaultGateway_); + } + if (networkType_ + != com.google.cloud.baremetalsolution.v2.Network.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, networkType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, id_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface)) { + return super.equals(obj); + } + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface other = + (com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface) obj; + + if (!getNetwork().equals(other.getNetwork())) return false; + if (!getIpAddress().equals(other.getIpAddress())) return false; + if (getDefaultGateway() != other.getDefaultGateway()) return false; + if (networkType_ != other.networkType_) return false; + if (!getId().equals(other.getId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getIpAddress().hashCode(); + hash = (37 * hash) + DEFAULT_GATEWAY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDefaultGateway()); + hash = (37 * hash) + NETWORK_TYPE_FIELD_NUMBER; + hash = (53 * hash) + networkType_; + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Each logical network interface is effectively a network and IP pair.
+     * 
+ * + * Protobuf type {@code + * google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface) + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterfaceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_LogicalInterface_LogicalNetworkInterface_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_LogicalInterface_LogicalNetworkInterface_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface + .class, + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface + .Builder.class); + } + + // Construct using + // com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + network_ = ""; + + ipAddress_ = ""; + + defaultGateway_ = false; + + networkType_ = 0; + + id_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_LogicalInterface_LogicalNetworkInterface_descriptor; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface + getDefaultInstanceForType() { + return com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface + build() { + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface + buildPartial() { + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface result = + new com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface( + this); + result.network_ = network_; + result.ipAddress_ = ipAddress_; + result.defaultGateway_ = defaultGateway_; + result.networkType_ = networkType_; + result.id_ = id_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface) { + return mergeFrom( + (com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface other) { + if (other + == com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface + .getDefaultInstance()) return this; + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; + onChanged(); + } + if (!other.getIpAddress().isEmpty()) { + ipAddress_ = other.ipAddress_; + onChanged(); + } + if (other.getDefaultGateway() != false) { + setDefaultGateway(other.getDefaultGateway()); + } + if (other.networkType_ != 0) { + setNetworkTypeValue(other.getNetworkTypeValue()); + } + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object network_ = ""; + /** + * + * + *
+       * Name of the network
+       * 
+ * + * string network = 1; + * + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Name of the network
+       * 
+ * + * string network = 1; + * + * @return The bytes for network. + */ + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Name of the network
+       * 
+ * + * string network = 1; + * + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + network_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Name of the network
+       * 
+ * + * string network = 1; + * + * @return This builder for chaining. + */ + public Builder clearNetwork() { + + network_ = getDefaultInstance().getNetwork(); + onChanged(); + return this; + } + /** + * + * + *
+       * Name of the network
+       * 
+ * + * string network = 1; + * + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + network_ = value; + onChanged(); + return this; + } + + private java.lang.Object ipAddress_ = ""; + /** + * + * + *
+       * IP address in the network
+       * 
+ * + * string ip_address = 2; + * + * @return The ipAddress. + */ + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * IP address in the network
+       * 
+ * + * string ip_address = 2; + * + * @return The bytes for ipAddress. + */ + public com.google.protobuf.ByteString getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * IP address in the network
+       * 
+ * + * string ip_address = 2; + * + * @param value The ipAddress to set. + * @return This builder for chaining. + */ + public Builder setIpAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + ipAddress_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * IP address in the network
+       * 
+ * + * string ip_address = 2; + * + * @return This builder for chaining. + */ + public Builder clearIpAddress() { + + ipAddress_ = getDefaultInstance().getIpAddress(); + onChanged(); + return this; + } + /** + * + * + *
+       * IP address in the network
+       * 
+ * + * string ip_address = 2; + * + * @param value The bytes for ipAddress to set. + * @return This builder for chaining. + */ + public Builder setIpAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + ipAddress_ = value; + onChanged(); + return this; + } + + private boolean defaultGateway_; + /** + * + * + *
+       * Whether this interface is the default gateway for the instance. Only
+       * one interface can be the default gateway for the instance.
+       * 
+ * + * bool default_gateway = 3; + * + * @return The defaultGateway. + */ + @java.lang.Override + public boolean getDefaultGateway() { + return defaultGateway_; + } + /** + * + * + *
+       * Whether this interface is the default gateway for the instance. Only
+       * one interface can be the default gateway for the instance.
+       * 
+ * + * bool default_gateway = 3; + * + * @param value The defaultGateway to set. + * @return This builder for chaining. + */ + public Builder setDefaultGateway(boolean value) { + + defaultGateway_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Whether this interface is the default gateway for the instance. Only
+       * one interface can be the default gateway for the instance.
+       * 
+ * + * bool default_gateway = 3; + * + * @return This builder for chaining. + */ + public Builder clearDefaultGateway() { + + defaultGateway_ = false; + onChanged(); + return this; + } + + private int networkType_ = 0; + /** + * + * + *
+       * Type of network.
+       * 
+ * + * .google.cloud.baremetalsolution.v2.Network.Type network_type = 4; + * + * @return The enum numeric value on the wire for networkType. + */ + @java.lang.Override + public int getNetworkTypeValue() { + return networkType_; + } + /** + * + * + *
+       * Type of network.
+       * 
+ * + * .google.cloud.baremetalsolution.v2.Network.Type network_type = 4; + * + * @param value The enum numeric value on the wire for networkType to set. + * @return This builder for chaining. + */ + public Builder setNetworkTypeValue(int value) { + + networkType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Type of network.
+       * 
+ * + * .google.cloud.baremetalsolution.v2.Network.Type network_type = 4; + * + * @return The networkType. + */ + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.Network.Type getNetworkType() { + @SuppressWarnings("deprecation") + com.google.cloud.baremetalsolution.v2.Network.Type result = + com.google.cloud.baremetalsolution.v2.Network.Type.valueOf(networkType_); + return result == null + ? com.google.cloud.baremetalsolution.v2.Network.Type.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Type of network.
+       * 
+ * + * .google.cloud.baremetalsolution.v2.Network.Type network_type = 4; + * + * @param value The networkType to set. + * @return This builder for chaining. + */ + public Builder setNetworkType(com.google.cloud.baremetalsolution.v2.Network.Type value) { + if (value == null) { + throw new NullPointerException(); + } + + networkType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Type of network.
+       * 
+ * + * .google.cloud.baremetalsolution.v2.Network.Type network_type = 4; + * + * @return This builder for chaining. + */ + public Builder clearNetworkType() { + + networkType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object id_ = ""; + /** + * + * + *
+       * An identifier for the `Network`, generated by the backend.
+       * 
+ * + * string id = 5; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * An identifier for the `Network`, generated by the backend.
+       * 
+ * + * string id = 5; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * An identifier for the `Network`, generated by the backend.
+       * 
+ * + * string id = 5; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * An identifier for the `Network`, generated by the backend.
+       * 
+ * + * string id = 5; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * + * + *
+       * An identifier for the `Network`, generated by the backend.
+       * 
+ * + * string id = 5; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface) + } + + // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface) + private static final com.google.cloud.baremetalsolution.v2.LogicalInterface + .LogicalNetworkInterface + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface(); + } + + public static com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LogicalNetworkInterface parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LogicalNetworkInterface(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int LOGICAL_NETWORK_INTERFACES_FIELD_NUMBER = 1; + private java.util.List< + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface> + logicalNetworkInterfaces_; + /** + * + * + *
+   * List of logical network interfaces within a logical interface.
+   * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface> + getLogicalNetworkInterfacesList() { + return logicalNetworkInterfaces_; + } + /** + * + * + *
+   * List of logical network interfaces within a logical interface.
+   * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.baremetalsolution.v2.LogicalInterface + .LogicalNetworkInterfaceOrBuilder> + getLogicalNetworkInterfacesOrBuilderList() { + return logicalNetworkInterfaces_; + } + /** + * + * + *
+   * List of logical network interfaces within a logical interface.
+   * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; + * + */ + @java.lang.Override + public int getLogicalNetworkInterfacesCount() { + return logicalNetworkInterfaces_.size(); + } + /** + * + * + *
+   * List of logical network interfaces within a logical interface.
+   * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; + * + */ + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface + getLogicalNetworkInterfaces(int index) { + return logicalNetworkInterfaces_.get(index); + } + /** + * + * + *
+   * List of logical network interfaces within a logical interface.
+   * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; + * + */ + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterfaceOrBuilder + getLogicalNetworkInterfacesOrBuilder(int index) { + return logicalNetworkInterfaces_.get(index); + } + + public static final int NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Interface name. This is of syntax <bond><bond_mode> or <nic> and
+   * forms part of the network template name.
+   * 
+ * + * string name = 2; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Interface name. This is of syntax <bond><bond_mode> or <nic> and
+   * forms part of the network template name.
+   * 
+ * + * string name = 2; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTERFACE_INDEX_FIELD_NUMBER = 3; + private int interfaceIndex_; + /** + * + * + *
+   * The index of the logical interface mapping to the index of the hardware
+   * bond or nic on the chosen network template.
+   * 
+ * + * int32 interface_index = 3; + * + * @return The interfaceIndex. + */ + @java.lang.Override + public int getInterfaceIndex() { + return interfaceIndex_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < logicalNetworkInterfaces_.size(); i++) { + output.writeMessage(1, logicalNetworkInterfaces_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + if (interfaceIndex_ != 0) { + output.writeInt32(3, interfaceIndex_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < logicalNetworkInterfaces_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, logicalNetworkInterfaces_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + if (interfaceIndex_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, interfaceIndex_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.baremetalsolution.v2.LogicalInterface)) { + return super.equals(obj); + } + com.google.cloud.baremetalsolution.v2.LogicalInterface other = + (com.google.cloud.baremetalsolution.v2.LogicalInterface) obj; + + if (!getLogicalNetworkInterfacesList().equals(other.getLogicalNetworkInterfacesList())) + return false; + if (!getName().equals(other.getName())) return false; + if (getInterfaceIndex() != other.getInterfaceIndex()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getLogicalNetworkInterfacesCount() > 0) { + hash = (37 * hash) + LOGICAL_NETWORK_INTERFACES_FIELD_NUMBER; + hash = (53 * hash) + getLogicalNetworkInterfacesList().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + INTERFACE_INDEX_FIELD_NUMBER; + hash = (53 * hash) + getInterfaceIndex(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.baremetalsolution.v2.LogicalInterface parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.LogicalInterface parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.LogicalInterface parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.LogicalInterface parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.LogicalInterface parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.LogicalInterface parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.LogicalInterface parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.LogicalInterface parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.LogicalInterface parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.LogicalInterface parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.LogicalInterface parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.LogicalInterface parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.baremetalsolution.v2.LogicalInterface prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Each logical interface represents a logical abstraction of the underlying
+   * physical interface (for eg. bond, nic) of the instance. Each logical
+   * interface can effectively map to multiple network-IP pairs and still be
+   * mapped to one underlying physical interface.
+   * 
+ * + * Protobuf type {@code google.cloud.baremetalsolution.v2.LogicalInterface} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.LogicalInterface) + com.google.cloud.baremetalsolution.v2.LogicalInterfaceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_LogicalInterface_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_LogicalInterface_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.baremetalsolution.v2.LogicalInterface.class, + com.google.cloud.baremetalsolution.v2.LogicalInterface.Builder.class); + } + + // Construct using com.google.cloud.baremetalsolution.v2.LogicalInterface.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getLogicalNetworkInterfacesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (logicalNetworkInterfacesBuilder_ == null) { + logicalNetworkInterfaces_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + logicalNetworkInterfacesBuilder_.clear(); + } + name_ = ""; + + interfaceIndex_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_LogicalInterface_descriptor; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.LogicalInterface getDefaultInstanceForType() { + return com.google.cloud.baremetalsolution.v2.LogicalInterface.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.LogicalInterface build() { + com.google.cloud.baremetalsolution.v2.LogicalInterface result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.LogicalInterface buildPartial() { + com.google.cloud.baremetalsolution.v2.LogicalInterface result = + new com.google.cloud.baremetalsolution.v2.LogicalInterface(this); + int from_bitField0_ = bitField0_; + if (logicalNetworkInterfacesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + logicalNetworkInterfaces_ = + java.util.Collections.unmodifiableList(logicalNetworkInterfaces_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.logicalNetworkInterfaces_ = logicalNetworkInterfaces_; + } else { + result.logicalNetworkInterfaces_ = logicalNetworkInterfacesBuilder_.build(); + } + result.name_ = name_; + result.interfaceIndex_ = interfaceIndex_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.baremetalsolution.v2.LogicalInterface) { + return mergeFrom((com.google.cloud.baremetalsolution.v2.LogicalInterface) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.LogicalInterface other) { + if (other == com.google.cloud.baremetalsolution.v2.LogicalInterface.getDefaultInstance()) + return this; + if (logicalNetworkInterfacesBuilder_ == null) { + if (!other.logicalNetworkInterfaces_.isEmpty()) { + if (logicalNetworkInterfaces_.isEmpty()) { + logicalNetworkInterfaces_ = other.logicalNetworkInterfaces_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLogicalNetworkInterfacesIsMutable(); + logicalNetworkInterfaces_.addAll(other.logicalNetworkInterfaces_); + } + onChanged(); + } + } else { + if (!other.logicalNetworkInterfaces_.isEmpty()) { + if (logicalNetworkInterfacesBuilder_.isEmpty()) { + logicalNetworkInterfacesBuilder_.dispose(); + logicalNetworkInterfacesBuilder_ = null; + logicalNetworkInterfaces_ = other.logicalNetworkInterfaces_; + bitField0_ = (bitField0_ & ~0x00000001); + logicalNetworkInterfacesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getLogicalNetworkInterfacesFieldBuilder() + : null; + } else { + logicalNetworkInterfacesBuilder_.addAllMessages(other.logicalNetworkInterfaces_); + } + } + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getInterfaceIndex() != 0) { + setInterfaceIndex(other.getInterfaceIndex()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.baremetalsolution.v2.LogicalInterface parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.baremetalsolution.v2.LogicalInterface) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface> + logicalNetworkInterfaces_ = java.util.Collections.emptyList(); + + private void ensureLogicalNetworkInterfacesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + logicalNetworkInterfaces_ = + new java.util.ArrayList< + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface>( + logicalNetworkInterfaces_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface, + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface.Builder, + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterfaceOrBuilder> + logicalNetworkInterfacesBuilder_; + + /** + * + * + *
+     * List of logical network interfaces within a logical interface.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; + * + */ + public java.util.List< + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface> + getLogicalNetworkInterfacesList() { + if (logicalNetworkInterfacesBuilder_ == null) { + return java.util.Collections.unmodifiableList(logicalNetworkInterfaces_); + } else { + return logicalNetworkInterfacesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of logical network interfaces within a logical interface.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; + * + */ + public int getLogicalNetworkInterfacesCount() { + if (logicalNetworkInterfacesBuilder_ == null) { + return logicalNetworkInterfaces_.size(); + } else { + return logicalNetworkInterfacesBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of logical network interfaces within a logical interface.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; + * + */ + public com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface + getLogicalNetworkInterfaces(int index) { + if (logicalNetworkInterfacesBuilder_ == null) { + return logicalNetworkInterfaces_.get(index); + } else { + return logicalNetworkInterfacesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of logical network interfaces within a logical interface.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; + * + */ + public Builder setLogicalNetworkInterfaces( + int index, + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface value) { + if (logicalNetworkInterfacesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogicalNetworkInterfacesIsMutable(); + logicalNetworkInterfaces_.set(index, value); + onChanged(); + } else { + logicalNetworkInterfacesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of logical network interfaces within a logical interface.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; + * + */ + public Builder setLogicalNetworkInterfaces( + int index, + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface.Builder + builderForValue) { + if (logicalNetworkInterfacesBuilder_ == null) { + ensureLogicalNetworkInterfacesIsMutable(); + logicalNetworkInterfaces_.set(index, builderForValue.build()); + onChanged(); + } else { + logicalNetworkInterfacesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of logical network interfaces within a logical interface.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; + * + */ + public Builder addLogicalNetworkInterfaces( + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface value) { + if (logicalNetworkInterfacesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogicalNetworkInterfacesIsMutable(); + logicalNetworkInterfaces_.add(value); + onChanged(); + } else { + logicalNetworkInterfacesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of logical network interfaces within a logical interface.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; + * + */ + public Builder addLogicalNetworkInterfaces( + int index, + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface value) { + if (logicalNetworkInterfacesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogicalNetworkInterfacesIsMutable(); + logicalNetworkInterfaces_.add(index, value); + onChanged(); + } else { + logicalNetworkInterfacesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of logical network interfaces within a logical interface.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; + * + */ + public Builder addLogicalNetworkInterfaces( + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface.Builder + builderForValue) { + if (logicalNetworkInterfacesBuilder_ == null) { + ensureLogicalNetworkInterfacesIsMutable(); + logicalNetworkInterfaces_.add(builderForValue.build()); + onChanged(); + } else { + logicalNetworkInterfacesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of logical network interfaces within a logical interface.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; + * + */ + public Builder addLogicalNetworkInterfaces( + int index, + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface.Builder + builderForValue) { + if (logicalNetworkInterfacesBuilder_ == null) { + ensureLogicalNetworkInterfacesIsMutable(); + logicalNetworkInterfaces_.add(index, builderForValue.build()); + onChanged(); + } else { + logicalNetworkInterfacesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of logical network interfaces within a logical interface.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; + * + */ + public Builder addAllLogicalNetworkInterfaces( + java.lang.Iterable< + ? extends + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface> + values) { + if (logicalNetworkInterfacesBuilder_ == null) { + ensureLogicalNetworkInterfacesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, logicalNetworkInterfaces_); + onChanged(); + } else { + logicalNetworkInterfacesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of logical network interfaces within a logical interface.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; + * + */ + public Builder clearLogicalNetworkInterfaces() { + if (logicalNetworkInterfacesBuilder_ == null) { + logicalNetworkInterfaces_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + logicalNetworkInterfacesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of logical network interfaces within a logical interface.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; + * + */ + public Builder removeLogicalNetworkInterfaces(int index) { + if (logicalNetworkInterfacesBuilder_ == null) { + ensureLogicalNetworkInterfacesIsMutable(); + logicalNetworkInterfaces_.remove(index); + onChanged(); + } else { + logicalNetworkInterfacesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of logical network interfaces within a logical interface.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; + * + */ + public com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface.Builder + getLogicalNetworkInterfacesBuilder(int index) { + return getLogicalNetworkInterfacesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of logical network interfaces within a logical interface.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; + * + */ + public com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterfaceOrBuilder + getLogicalNetworkInterfacesOrBuilder(int index) { + if (logicalNetworkInterfacesBuilder_ == null) { + return logicalNetworkInterfaces_.get(index); + } else { + return logicalNetworkInterfacesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of logical network interfaces within a logical interface.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.baremetalsolution.v2.LogicalInterface + .LogicalNetworkInterfaceOrBuilder> + getLogicalNetworkInterfacesOrBuilderList() { + if (logicalNetworkInterfacesBuilder_ != null) { + return logicalNetworkInterfacesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(logicalNetworkInterfaces_); + } + } + /** + * + * + *
+     * List of logical network interfaces within a logical interface.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; + * + */ + public com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface.Builder + addLogicalNetworkInterfacesBuilder() { + return getLogicalNetworkInterfacesFieldBuilder() + .addBuilder( + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface + .getDefaultInstance()); + } + /** + * + * + *
+     * List of logical network interfaces within a logical interface.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; + * + */ + public com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface.Builder + addLogicalNetworkInterfacesBuilder(int index) { + return getLogicalNetworkInterfacesFieldBuilder() + .addBuilder( + index, + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface + .getDefaultInstance()); + } + /** + * + * + *
+     * List of logical network interfaces within a logical interface.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; + * + */ + public java.util.List< + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface.Builder> + getLogicalNetworkInterfacesBuilderList() { + return getLogicalNetworkInterfacesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface, + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface.Builder, + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterfaceOrBuilder> + getLogicalNetworkInterfacesFieldBuilder() { + if (logicalNetworkInterfacesBuilder_ == null) { + logicalNetworkInterfacesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface, + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface + .Builder, + com.google.cloud.baremetalsolution.v2.LogicalInterface + .LogicalNetworkInterfaceOrBuilder>( + logicalNetworkInterfaces_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + logicalNetworkInterfaces_ = null; + } + return logicalNetworkInterfacesBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Interface name. This is of syntax <bond><bond_mode> or <nic> and
+     * forms part of the network template name.
+     * 
+ * + * string name = 2; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Interface name. This is of syntax <bond><bond_mode> or <nic> and
+     * forms part of the network template name.
+     * 
+ * + * string name = 2; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Interface name. This is of syntax <bond><bond_mode> or <nic> and
+     * forms part of the network template name.
+     * 
+ * + * string name = 2; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Interface name. This is of syntax <bond><bond_mode> or <nic> and
+     * forms part of the network template name.
+     * 
+ * + * string name = 2; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Interface name. This is of syntax <bond><bond_mode> or <nic> and
+     * forms part of the network template name.
+     * 
+ * + * string name = 2; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private int interfaceIndex_; + /** + * + * + *
+     * The index of the logical interface mapping to the index of the hardware
+     * bond or nic on the chosen network template.
+     * 
+ * + * int32 interface_index = 3; + * + * @return The interfaceIndex. + */ + @java.lang.Override + public int getInterfaceIndex() { + return interfaceIndex_; + } + /** + * + * + *
+     * The index of the logical interface mapping to the index of the hardware
+     * bond or nic on the chosen network template.
+     * 
+ * + * int32 interface_index = 3; + * + * @param value The interfaceIndex to set. + * @return This builder for chaining. + */ + public Builder setInterfaceIndex(int value) { + + interfaceIndex_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The index of the logical interface mapping to the index of the hardware
+     * bond or nic on the chosen network template.
+     * 
+ * + * int32 interface_index = 3; + * + * @return This builder for chaining. + */ + public Builder clearInterfaceIndex() { + + interfaceIndex_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.LogicalInterface) + } + + // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.LogicalInterface) + private static final com.google.cloud.baremetalsolution.v2.LogicalInterface DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.LogicalInterface(); + } + + public static com.google.cloud.baremetalsolution.v2.LogicalInterface getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LogicalInterface parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LogicalInterface(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.LogicalInterface getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/LogicalInterfaceOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/LogicalInterfaceOrBuilder.java new file mode 100644 index 000000000000..f3faf3f8af38 --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/LogicalInterfaceOrBuilder.java @@ -0,0 +1,134 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/baremetalsolution/v2/network.proto + +package com.google.cloud.baremetalsolution.v2; + +public interface LogicalInterfaceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.LogicalInterface) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of logical network interfaces within a logical interface.
+   * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; + * + */ + java.util.List + getLogicalNetworkInterfacesList(); + /** + * + * + *
+   * List of logical network interfaces within a logical interface.
+   * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; + * + */ + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface + getLogicalNetworkInterfaces(int index); + /** + * + * + *
+   * List of logical network interfaces within a logical interface.
+   * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; + * + */ + int getLogicalNetworkInterfacesCount(); + /** + * + * + *
+   * List of logical network interfaces within a logical interface.
+   * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.baremetalsolution.v2.LogicalInterface + .LogicalNetworkInterfaceOrBuilder> + getLogicalNetworkInterfacesOrBuilderList(); + /** + * + * + *
+   * List of logical network interfaces within a logical interface.
+   * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1; + * + */ + com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterfaceOrBuilder + getLogicalNetworkInterfacesOrBuilder(int index); + + /** + * + * + *
+   * Interface name. This is of syntax <bond><bond_mode> or <nic> and
+   * forms part of the network template name.
+   * 
+ * + * string name = 2; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Interface name. This is of syntax <bond><bond_mode> or <nic> and
+   * forms part of the network template name.
+   * 
+ * + * string name = 2; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The index of the logical interface mapping to the index of the hardware
+   * bond or nic on the chosen network template.
+   * 
+ * + * int32 interface_index = 3; + * + * @return The interfaceIndex. + */ + int getInterfaceIndex(); +} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/Lun.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/Lun.java index bdaad8b0d397..cbd6146c418c 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/Lun.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/Lun.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/lun.proto package com.google.cloud.baremetalsolution.v2; @@ -39,6 +39,7 @@ private Lun(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Lun() { name_ = ""; + id_ = ""; state_ = 0; multiprotocolType_ = 0; storageVolume_ = ""; @@ -132,6 +133,13 @@ private Lun( wwid_ = s; break; } + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + + id_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -154,14 +162,14 @@ private Lun( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.LunProto .internal_static_google_cloud_baremetalsolution_v2_Lun_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.LunProto .internal_static_google_cloud_baremetalsolution_v2_Lun_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.Lun.class, @@ -713,6 +721,55 @@ public com.google.protobuf.ByteString getNameBytes() { } } + public static final int ID_FIELD_NUMBER = 10; + private volatile java.lang.Object id_; + /** + * + * + *
+   * An identifier for the LUN, generated by the backend.
+   * 
+ * + * string id = 10; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * + * + *
+   * An identifier for the LUN, generated by the backend.
+   * 
+ * + * string id = 10; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int STATE_FIELD_NUMBER = 2; private int state_; /** @@ -1025,6 +1082,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(wwid_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, wwid_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, id_); + } unknownFields.writeTo(output); } @@ -1066,6 +1126,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(wwid_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, wwid_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, id_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1083,6 +1146,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.baremetalsolution.v2.Lun) obj; if (!getName().equals(other.getName())) return false; + if (!getId().equals(other.getId())) return false; if (state_ != other.state_) return false; if (getSizeGb() != other.getSizeGb()) return false; if (multiprotocolType_ != other.multiprotocolType_) return false; @@ -1104,6 +1168,8 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); hash = (37 * hash) + STATE_FIELD_NUMBER; hash = (53 * hash) + state_; hash = (37 * hash) + SIZE_GB_FIELD_NUMBER; @@ -1234,14 +1300,14 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.Lun) com.google.cloud.baremetalsolution.v2.LunOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.LunProto .internal_static_google_cloud_baremetalsolution_v2_Lun_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.LunProto .internal_static_google_cloud_baremetalsolution_v2_Lun_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.Lun.class, @@ -1267,6 +1333,8 @@ public Builder clear() { super.clear(); name_ = ""; + id_ = ""; + state_ = 0; sizeGb_ = 0L; @@ -1288,7 +1356,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.LunProto .internal_static_google_cloud_baremetalsolution_v2_Lun_descriptor; } @@ -1311,6 +1379,7 @@ public com.google.cloud.baremetalsolution.v2.Lun buildPartial() { com.google.cloud.baremetalsolution.v2.Lun result = new com.google.cloud.baremetalsolution.v2.Lun(this); result.name_ = name_; + result.id_ = id_; result.state_ = state_; result.sizeGb_ = sizeGb_; result.multiprotocolType_ = multiprotocolType_; @@ -1372,6 +1441,10 @@ public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.Lun other) { name_ = other.name_; onChanged(); } + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } if (other.state_ != 0) { setStateValue(other.getStateValue()); } @@ -1533,6 +1606,112 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object id_ = ""; + /** + * + * + *
+     * An identifier for the LUN, generated by the backend.
+     * 
+ * + * string id = 10; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * An identifier for the LUN, generated by the backend.
+     * 
+ * + * string id = 10; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * An identifier for the LUN, generated by the backend.
+     * 
+ * + * string id = 10; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * An identifier for the LUN, generated by the backend.
+     * 
+ * + * string id = 10; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * + * + *
+     * An identifier for the LUN, generated by the backend.
+     * 
+ * + * string id = 10; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + private int state_ = 0; /** * diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/LunOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/LunOrBuilder.java index e4d596c00e3b..df63068a4498 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/LunOrBuilder.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/LunOrBuilder.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/lun.proto package com.google.cloud.baremetalsolution.v2; @@ -48,6 +48,31 @@ public interface LunOrBuilder */ com.google.protobuf.ByteString getNameBytes(); + /** + * + * + *
+   * An identifier for the LUN, generated by the backend.
+   * 
+ * + * string id = 10; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * An identifier for the LUN, generated by the backend.
+   * 
+ * + * string id = 10; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + /** * * diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/LunProto.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/LunProto.java new file mode 100644 index 000000000000..94372e2d62ab --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/LunProto.java @@ -0,0 +1,153 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/baremetalsolution/v2/lun.proto + +package com.google.cloud.baremetalsolution.v2; + +public final class LunProto { + private LunProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_Lun_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_Lun_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_GetLunRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_GetLunRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_ListLunsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_ListLunsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_ListLunsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_ListLunsResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n+google/cloud/baremetalsolution/v2/lun." + + "proto\022!google.cloud.baremetalsolution.v2" + + "\032\037google/api/field_behavior.proto\032\031googl" + + "e/api/resource.proto\"\323\005\n\003Lun\022\021\n\004name\030\001 \001" + + "(\tB\003\340A\003\022\n\n\002id\030\n \001(\t\022;\n\005state\030\002 \001(\0162,.goo" + + "gle.cloud.baremetalsolution.v2.Lun.State" + + "\022\017\n\007size_gb\030\003 \001(\003\022T\n\022multiprotocol_type\030" + + "\004 \001(\01628.google.cloud.baremetalsolution.v" + + "2.Lun.MultiprotocolType\022D\n\016storage_volum" + + "e\030\005 \001(\tB,\372A)\n\'baremetalsolution.googleap" + + "is.com/Volume\022\021\n\tshareable\030\006 \001(\010\022\020\n\010boot" + + "_lun\030\007 \001(\010\022H\n\014storage_type\030\010 \001(\01622.googl" + + "e.cloud.baremetalsolution.v2.Lun.Storage" + + "Type\022\014\n\004wwid\030\t \001(\t\"S\n\005State\022\025\n\021STATE_UNS" + + "PECIFIED\020\000\022\014\n\010CREATING\020\001\022\014\n\010UPDATING\020\002\022\t" + + "\n\005READY\020\003\022\014\n\010DELETING\020\004\"B\n\021Multiprotocol" + + "Type\022\"\n\036MULTIPROTOCOL_TYPE_UNSPECIFIED\020\000" + + "\022\t\n\005LINUX\020\001\"=\n\013StorageType\022\034\n\030STORAGE_TY" + + "PE_UNSPECIFIED\020\000\022\007\n\003SSD\020\001\022\007\n\003HDD\020\002:n\352Ak\n" + + "$baremetalsolution.googleapis.com/Lun\022Cp" + + "rojects/{project}/locations/{location}/v" + + "olumes/{volume}/luns/{lun}\"K\n\rGetLunRequ" + + "est\022:\n\004name\030\001 \001(\tB,\340A\002\372A&\n$baremetalsolu" + + "tion.googleapis.com/Lun\"y\n\017ListLunsReque" + + "st\022?\n\006parent\030\001 \001(\tB/\340A\002\372A)\n\'baremetalsol" + + "ution.googleapis.com/Volume\022\021\n\tpage_size" + + "\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"v\n\020ListLunsRe" + + "sponse\0224\n\004luns\030\001 \003(\0132&.google.cloud.bare" + + "metalsolution.v2.Lun\022\027\n\017next_page_token\030" + + "\002 \001(\t\022\023\n\013unreachable\030\003 \003(\tB\366\001\n%com.googl" + + "e.cloud.baremetalsolution.v2B\010LunProtoP\001" + + "ZRgoogle.golang.org/genproto/googleapis/" + + "cloud/baremetalsolution/v2;baremetalsolu" + + "tion\252\002!Google.Cloud.BareMetalSolution.V2" + + "\312\002!Google\\Cloud\\BareMetalSolution\\V2\352\002$G" + + "oogle::Cloud::BareMetalSolution::V2b\006pro" + + "to3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + }); + internal_static_google_cloud_baremetalsolution_v2_Lun_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_baremetalsolution_v2_Lun_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_Lun_descriptor, + new java.lang.String[] { + "Name", + "Id", + "State", + "SizeGb", + "MultiprotocolType", + "StorageVolume", + "Shareable", + "BootLun", + "StorageType", + "Wwid", + }); + internal_static_google_cloud_baremetalsolution_v2_GetLunRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_baremetalsolution_v2_GetLunRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_GetLunRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_baremetalsolution_v2_ListLunsRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_baremetalsolution_v2_ListLunsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_ListLunsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_baremetalsolution_v2_ListLunsResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_baremetalsolution_v2_ListLunsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_ListLunsResponse_descriptor, + new java.lang.String[] { + "Luns", "NextPageToken", "Unreachable", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/SnapshotSchedulePolicyName.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/NFSShareName.java similarity index 56% rename from java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/SnapshotSchedulePolicyName.java rename to java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/NFSShareName.java index a55cbe2b732c..fc54dd817fa5 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/SnapshotSchedulePolicyName.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/NFSShareName.java @@ -28,26 +28,26 @@ // AUTO-GENERATED DOCUMENTATION AND CLASS. @Generated("by gapic-generator-java") -public class SnapshotSchedulePolicyName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_SNAPSHOT_SCHEDULE_POLICY = +public class NFSShareName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_NFS_SHARE = PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/snapshotSchedulePolicies/{snapshot_schedule_policy}"); + "projects/{project}/locations/{location}/nfsShares/{nfs_share}"); private volatile Map fieldValuesMap; private final String project; private final String location; - private final String snapshotSchedulePolicy; + private final String nfsShare; @Deprecated - protected SnapshotSchedulePolicyName() { + protected NFSShareName() { project = null; location = null; - snapshotSchedulePolicy = null; + nfsShare = null; } - private SnapshotSchedulePolicyName(Builder builder) { + private NFSShareName(Builder builder) { project = Preconditions.checkNotNull(builder.getProject()); location = Preconditions.checkNotNull(builder.getLocation()); - snapshotSchedulePolicy = Preconditions.checkNotNull(builder.getSnapshotSchedulePolicy()); + nfsShare = Preconditions.checkNotNull(builder.getNfsShare()); } public String getProject() { @@ -58,8 +58,8 @@ public String getLocation() { return location; } - public String getSnapshotSchedulePolicy() { - return snapshotSchedulePolicy; + public String getNfsShare() { + return nfsShare; } public static Builder newBuilder() { @@ -70,49 +70,40 @@ public Builder toBuilder() { return new Builder(this); } - public static SnapshotSchedulePolicyName of( - String project, String location, String snapshotSchedulePolicy) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setSnapshotSchedulePolicy(snapshotSchedulePolicy) - .build(); + public static NFSShareName of(String project, String location, String nfsShare) { + return newBuilder().setProject(project).setLocation(location).setNfsShare(nfsShare).build(); } - public static String format(String project, String location, String snapshotSchedulePolicy) { + public static String format(String project, String location, String nfsShare) { return newBuilder() .setProject(project) .setLocation(location) - .setSnapshotSchedulePolicy(snapshotSchedulePolicy) + .setNfsShare(nfsShare) .build() .toString(); } - public static SnapshotSchedulePolicyName parse(String formattedString) { + public static NFSShareName parse(String formattedString) { if (formattedString.isEmpty()) { return null; } Map matchMap = - PROJECT_LOCATION_SNAPSHOT_SCHEDULE_POLICY.validatedMatch( - formattedString, - "SnapshotSchedulePolicyName.parse: formattedString not in valid format"); - return of( - matchMap.get("project"), - matchMap.get("location"), - matchMap.get("snapshot_schedule_policy")); + PROJECT_LOCATION_NFS_SHARE.validatedMatch( + formattedString, "NFSShareName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("nfs_share")); } - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); for (String formattedString : formattedStrings) { list.add(parse(formattedString)); } return list; } - public static List toStringList(List values) { + public static List toStringList(List values) { List list = new ArrayList<>(values.size()); - for (SnapshotSchedulePolicyName value : values) { + for (NFSShareName value : values) { if (value == null) { list.add(""); } else { @@ -123,7 +114,7 @@ public static List toStringList(List values) } public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_SNAPSHOT_SCHEDULE_POLICY.matches(formattedString); + return PROJECT_LOCATION_NFS_SHARE.matches(formattedString); } @Override @@ -138,8 +129,8 @@ public Map getFieldValuesMap() { if (location != null) { fieldMapBuilder.put("location", location); } - if (snapshotSchedulePolicy != null) { - fieldMapBuilder.put("snapshot_schedule_policy", snapshotSchedulePolicy); + if (nfsShare != null) { + fieldMapBuilder.put("nfs_share", nfsShare); } fieldValuesMap = fieldMapBuilder.build(); } @@ -154,13 +145,8 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PROJECT_LOCATION_SNAPSHOT_SCHEDULE_POLICY.instantiate( - "project", - project, - "location", - location, - "snapshot_schedule_policy", - snapshotSchedulePolicy); + return PROJECT_LOCATION_NFS_SHARE.instantiate( + "project", project, "location", location, "nfs_share", nfsShare); } @Override @@ -169,10 +155,10 @@ public boolean equals(Object o) { return true; } if (o != null || getClass() == o.getClass()) { - SnapshotSchedulePolicyName that = ((SnapshotSchedulePolicyName) o); + NFSShareName that = ((NFSShareName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.location, that.location) - && Objects.equals(this.snapshotSchedulePolicy, that.snapshotSchedulePolicy); + && Objects.equals(this.nfsShare, that.nfsShare); } return false; } @@ -185,18 +171,15 @@ public int hashCode() { h *= 1000003; h ^= Objects.hashCode(location); h *= 1000003; - h ^= Objects.hashCode(snapshotSchedulePolicy); + h ^= Objects.hashCode(nfsShare); return h; } - /** - * Builder for - * projects/{project}/locations/{location}/snapshotSchedulePolicies/{snapshot_schedule_policy}. - */ + /** Builder for projects/{project}/locations/{location}/nfsShares/{nfs_share}. */ public static class Builder { private String project; private String location; - private String snapshotSchedulePolicy; + private String nfsShare; protected Builder() {} @@ -208,8 +191,8 @@ public String getLocation() { return location; } - public String getSnapshotSchedulePolicy() { - return snapshotSchedulePolicy; + public String getNfsShare() { + return nfsShare; } public Builder setProject(String project) { @@ -222,19 +205,19 @@ public Builder setLocation(String location) { return this; } - public Builder setSnapshotSchedulePolicy(String snapshotSchedulePolicy) { - this.snapshotSchedulePolicy = snapshotSchedulePolicy; + public Builder setNfsShare(String nfsShare) { + this.nfsShare = nfsShare; return this; } - private Builder(SnapshotSchedulePolicyName snapshotSchedulePolicyName) { - this.project = snapshotSchedulePolicyName.project; - this.location = snapshotSchedulePolicyName.location; - this.snapshotSchedulePolicy = snapshotSchedulePolicyName.snapshotSchedulePolicy; + private Builder(NFSShareName nFSShareName) { + this.project = nFSShareName.project; + this.location = nFSShareName.location; + this.nfsShare = nFSShareName.nfsShare; } - public SnapshotSchedulePolicyName build() { - return new SnapshotSchedulePolicyName(this); + public NFSShareName build() { + return new NFSShareName(this); } } } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/Network.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/Network.java index 449af713613c..3977086cce93 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/Network.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/Network.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/network.proto package com.google.cloud.baremetalsolution.v2; @@ -39,13 +39,15 @@ private Network(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Network() { name_ = ""; - network_ = ""; + id_ = ""; type_ = 0; ipAddress_ = ""; macAddress_ = com.google.protobuf.LazyStringArrayList.EMPTY; state_ = 0; vlanId_ = ""; cidr_ = ""; + servicesCidr_ = ""; + reservations_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -78,13 +80,6 @@ private Network( case 0: done = true; break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - network_ = s; - break; - } case 16: { int rawValue = input.readEnum(); @@ -153,6 +148,47 @@ private Network( break; } + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + + id_ = s; + break; + } + case 90: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 98: + { + java.lang.String s = input.readStringRequireUtf8(); + + servicesCidr_ = s; + break; + } + case 106: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + reservations_ = + new java.util.ArrayList< + com.google.cloud.baremetalsolution.v2.NetworkAddressReservation>(); + mutable_bitField0_ |= 0x00000004; + } + reservations_.add( + input.readMessage( + com.google.cloud.baremetalsolution.v2.NetworkAddressReservation.parser(), + extensionRegistry)); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -172,20 +208,34 @@ private Network( if (((mutable_bitField0_ & 0x00000001) != 0)) { macAddress_ = macAddress_.getUnmodifiableView(); } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + reservations_ = java.util.Collections.unmodifiableList(reservations_); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_Network_descriptor; } + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 11: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_Network_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.Network.class, @@ -517,9 +567,6 @@ private State(int value) { * https://cloud.google.com/apis/design/resource_names. * Format: * `projects/{project}/locations/{location}/networks/{network}` - * This field will contain the same value as field "network", which will soon - * be deprecated. Please use this field to reference the name of the network - * resource. * * * string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -547,9 +594,6 @@ public java.lang.String getName() { * https://cloud.google.com/apis/design/resource_names. * Format: * `projects/{project}/locations/{location}/networks/{network}` - * This field will contain the same value as field "network", which will soon - * be deprecated. Please use this field to reference the name of the network - * resource. * * * string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -569,28 +613,28 @@ public com.google.protobuf.ByteString getNameBytes() { } } - public static final int NETWORK_FIELD_NUMBER = 1; - private volatile java.lang.Object network_; + public static final int ID_FIELD_NUMBER = 10; + private volatile java.lang.Object id_; /** * * *
-   * Name of the network.
+   * An identifier for the `Network`, generated by the backend.
    * 
* - * string network = 1; + * string id = 10; * - * @return The network. + * @return The id. */ @java.lang.Override - public java.lang.String getNetwork() { - java.lang.Object ref = network_; + public java.lang.String getId() { + java.lang.Object ref = id_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - network_ = s; + id_ = s; return s; } } @@ -598,20 +642,20 @@ public java.lang.String getNetwork() { * * *
-   * Name of the network.
+   * An identifier for the `Network`, generated by the backend.
    * 
* - * string network = 1; + * string id = 10; * - * @return The bytes for network. + * @return The bytes for id. */ @java.lang.Override - public com.google.protobuf.ByteString getNetworkBytes() { - java.lang.Object ref = network_; + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - network_ = b; + id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -948,6 +992,242 @@ public com.google.cloud.baremetalsolution.v2.VRFOrBuilder getVrfOrBuilder() { return getVrf(); } + public static final int LABELS_FIELD_NUMBER = 11; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_Network_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 11; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 11; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 11; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 11; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int SERVICES_CIDR_FIELD_NUMBER = 12; + private volatile java.lang.Object servicesCidr_; + /** + * + * + *
+   * IP range for reserved for services (e.g. NFS).
+   * 
+ * + * string services_cidr = 12; + * + * @return The servicesCidr. + */ + @java.lang.Override + public java.lang.String getServicesCidr() { + java.lang.Object ref = servicesCidr_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + servicesCidr_ = s; + return s; + } + } + /** + * + * + *
+   * IP range for reserved for services (e.g. NFS).
+   * 
+ * + * string services_cidr = 12; + * + * @return The bytes for servicesCidr. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServicesCidrBytes() { + java.lang.Object ref = servicesCidr_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + servicesCidr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESERVATIONS_FIELD_NUMBER = 13; + private java.util.List + reservations_; + /** + * + * + *
+   * List of IP address reservations in this network.
+   * When updating this field, an error will be generated if a reservation
+   * conflicts with an IP address already allocated to a physical server.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; + * + */ + @java.lang.Override + public java.util.List + getReservationsList() { + return reservations_; + } + /** + * + * + *
+   * List of IP address reservations in this network.
+   * When updating this field, an error will be generated if a reservation
+   * conflicts with an IP address already allocated to a physical server.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.baremetalsolution.v2.NetworkAddressReservationOrBuilder> + getReservationsOrBuilderList() { + return reservations_; + } + /** + * + * + *
+   * List of IP address reservations in this network.
+   * When updating this field, an error will be generated if a reservation
+   * conflicts with an IP address already allocated to a physical server.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; + * + */ + @java.lang.Override + public int getReservationsCount() { + return reservations_.size(); + } + /** + * + * + *
+   * List of IP address reservations in this network.
+   * When updating this field, an error will be generated if a reservation
+   * conflicts with an IP address already allocated to a physical server.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; + * + */ + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.NetworkAddressReservation getReservations( + int index) { + return reservations_.get(index); + } + /** + * + * + *
+   * List of IP address reservations in this network.
+   * When updating this field, an error will be generated if a reservation
+   * conflicts with an IP address already allocated to a physical server.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; + * + */ + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.NetworkAddressReservationOrBuilder + getReservationsOrBuilder(int index) { + return reservations_.get(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -962,9 +1242,6 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, network_); - } if (type_ != com.google.cloud.baremetalsolution.v2.Network.Type.TYPE_UNSPECIFIED.getNumber()) { output.writeEnum(2, type_); } @@ -990,6 +1267,17 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (vrf_ != null) { output.writeMessage(9, getVrf()); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, id_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 11); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(servicesCidr_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, servicesCidr_); + } + for (int i = 0; i < reservations_.size(); i++) { + output.writeMessage(13, reservations_.get(i)); + } unknownFields.writeTo(output); } @@ -999,9 +1287,6 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, network_); - } if (type_ != com.google.cloud.baremetalsolution.v2.Network.Type.TYPE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, type_); } @@ -1032,6 +1317,25 @@ public int getSerializedSize() { if (vrf_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getVrf()); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, id_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(servicesCidr_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, servicesCidr_); + } + for (int i = 0; i < reservations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, reservations_.get(i)); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1049,7 +1353,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.baremetalsolution.v2.Network) obj; if (!getName().equals(other.getName())) return false; - if (!getNetwork().equals(other.getNetwork())) return false; + if (!getId().equals(other.getId())) return false; if (type_ != other.type_) return false; if (!getIpAddress().equals(other.getIpAddress())) return false; if (!getMacAddressList().equals(other.getMacAddressList())) return false; @@ -1060,6 +1364,9 @@ public boolean equals(final java.lang.Object obj) { if (hasVrf()) { if (!getVrf().equals(other.getVrf())) return false; } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getServicesCidr().equals(other.getServicesCidr())) return false; + if (!getReservationsList().equals(other.getReservationsList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -1073,8 +1380,8 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + NETWORK_FIELD_NUMBER; - hash = (53 * hash) + getNetwork().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + type_; hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER; @@ -1093,6 +1400,16 @@ public int hashCode() { hash = (37 * hash) + VRF_FIELD_NUMBER; hash = (53 * hash) + getVrf().hashCode(); } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + SERVICES_CIDR_FIELD_NUMBER; + hash = (53 * hash) + getServicesCidr().hashCode(); + if (getReservationsCount() > 0) { + hash = (37 * hash) + RESERVATIONS_FIELD_NUMBER; + hash = (53 * hash) + getReservationsList().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -1207,14 +1524,34 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.Network) com.google.cloud.baremetalsolution.v2.NetworkOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_Network_descriptor; } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 11: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 11: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_Network_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.Network.class, @@ -1232,7 +1569,9 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getReservationsFieldBuilder(); + } } @java.lang.Override @@ -1240,7 +1579,7 @@ public Builder clear() { super.clear(); name_ = ""; - network_ = ""; + id_ = ""; type_ = 0; @@ -1260,12 +1599,21 @@ public Builder clear() { vrf_ = null; vrfBuilder_ = null; } + internalGetMutableLabels().clear(); + servicesCidr_ = ""; + + if (reservationsBuilder_ == null) { + reservations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + reservationsBuilder_.clear(); + } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_Network_descriptor; } @@ -1289,7 +1637,7 @@ public com.google.cloud.baremetalsolution.v2.Network buildPartial() { new com.google.cloud.baremetalsolution.v2.Network(this); int from_bitField0_ = bitField0_; result.name_ = name_; - result.network_ = network_; + result.id_ = id_; result.type_ = type_; result.ipAddress_ = ipAddress_; if (((bitField0_ & 0x00000001) != 0)) { @@ -1305,6 +1653,18 @@ public com.google.cloud.baremetalsolution.v2.Network buildPartial() { } else { result.vrf_ = vrfBuilder_.build(); } + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + result.servicesCidr_ = servicesCidr_; + if (reservationsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + reservations_ = java.util.Collections.unmodifiableList(reservations_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.reservations_ = reservations_; + } else { + result.reservations_ = reservationsBuilder_.build(); + } onBuilt(); return result; } @@ -1358,8 +1718,8 @@ public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.Network other) { name_ = other.name_; onChanged(); } - if (!other.getNetwork().isEmpty()) { - network_ = other.network_; + if (!other.getId().isEmpty()) { + id_ = other.id_; onChanged(); } if (other.type_ != 0) { @@ -1393,6 +1753,38 @@ public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.Network other) { if (other.hasVrf()) { mergeVrf(other.getVrf()); } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (!other.getServicesCidr().isEmpty()) { + servicesCidr_ = other.servicesCidr_; + onChanged(); + } + if (reservationsBuilder_ == null) { + if (!other.reservations_.isEmpty()) { + if (reservations_.isEmpty()) { + reservations_ = other.reservations_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureReservationsIsMutable(); + reservations_.addAll(other.reservations_); + } + onChanged(); + } + } else { + if (!other.reservations_.isEmpty()) { + if (reservationsBuilder_.isEmpty()) { + reservationsBuilder_.dispose(); + reservationsBuilder_ = null; + reservations_ = other.reservations_; + bitField0_ = (bitField0_ & ~0x00000004); + reservationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getReservationsFieldBuilder() + : null; + } else { + reservationsBuilder_.addAllMessages(other.reservations_); + } + } + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -1434,9 +1826,6 @@ public Builder mergeFrom( * https://cloud.google.com/apis/design/resource_names. * Format: * `projects/{project}/locations/{location}/networks/{network}` - * This field will contain the same value as field "network", which will soon - * be deprecated. Please use this field to reference the name of the network - * resource. * * * string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1463,9 +1852,6 @@ public java.lang.String getName() { * https://cloud.google.com/apis/design/resource_names. * Format: * `projects/{project}/locations/{location}/networks/{network}` - * This field will contain the same value as field "network", which will soon - * be deprecated. Please use this field to reference the name of the network - * resource. * * * string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1492,9 +1878,6 @@ public com.google.protobuf.ByteString getNameBytes() { * https://cloud.google.com/apis/design/resource_names. * Format: * `projects/{project}/locations/{location}/networks/{network}` - * This field will contain the same value as field "network", which will soon - * be deprecated. Please use this field to reference the name of the network - * resource. * * * string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1520,9 +1903,6 @@ public Builder setName(java.lang.String value) { * https://cloud.google.com/apis/design/resource_names. * Format: * `projects/{project}/locations/{location}/networks/{network}` - * This field will contain the same value as field "network", which will soon - * be deprecated. Please use this field to reference the name of the network - * resource. * * * string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1544,9 +1924,6 @@ public Builder clearName() { * https://cloud.google.com/apis/design/resource_names. * Format: * `projects/{project}/locations/{location}/networks/{network}` - * This field will contain the same value as field "network", which will soon - * be deprecated. Please use this field to reference the name of the network - * resource. * * * string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1565,24 +1942,24 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { return this; } - private java.lang.Object network_ = ""; + private java.lang.Object id_ = ""; /** * * *
-     * Name of the network.
+     * An identifier for the `Network`, generated by the backend.
      * 
* - * string network = 1; + * string id = 10; * - * @return The network. + * @return The id. */ - public java.lang.String getNetwork() { - java.lang.Object ref = network_; + public java.lang.String getId() { + java.lang.Object ref = id_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - network_ = s; + id_ = s; return s; } else { return (java.lang.String) ref; @@ -1592,19 +1969,19 @@ public java.lang.String getNetwork() { * * *
-     * Name of the network.
+     * An identifier for the `Network`, generated by the backend.
      * 
* - * string network = 1; + * string id = 10; * - * @return The bytes for network. + * @return The bytes for id. */ - public com.google.protobuf.ByteString getNetworkBytes() { - java.lang.Object ref = network_; + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - network_ = b; + id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -1614,20 +1991,20 @@ public com.google.protobuf.ByteString getNetworkBytes() { * * *
-     * Name of the network.
+     * An identifier for the `Network`, generated by the backend.
      * 
* - * string network = 1; + * string id = 10; * - * @param value The network to set. + * @param value The id to set. * @return This builder for chaining. */ - public Builder setNetwork(java.lang.String value) { + public Builder setId(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - network_ = value; + id_ = value; onChanged(); return this; } @@ -1635,16 +2012,16 @@ public Builder setNetwork(java.lang.String value) { * * *
-     * Name of the network.
+     * An identifier for the `Network`, generated by the backend.
      * 
* - * string network = 1; + * string id = 10; * * @return This builder for chaining. */ - public Builder clearNetwork() { + public Builder clearId() { - network_ = getDefaultInstance().getNetwork(); + id_ = getDefaultInstance().getId(); onChanged(); return this; } @@ -1652,21 +2029,21 @@ public Builder clearNetwork() { * * *
-     * Name of the network.
+     * An identifier for the `Network`, generated by the backend.
      * 
* - * string network = 1; + * string id = 10; * - * @param value The bytes for network to set. + * @param value The bytes for id to set. * @return This builder for chaining. */ - public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + public Builder setIdBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - network_ = value; + id_ = value; onChanged(); return this; } @@ -2529,6 +2906,711 @@ public com.google.cloud.baremetalsolution.v2.VRFOrBuilder getVrfOrBuilder() { return vrfBuilder_; } + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 11; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 11; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 11; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 11; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 11; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 11; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 11; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private java.lang.Object servicesCidr_ = ""; + /** + * + * + *
+     * IP range for reserved for services (e.g. NFS).
+     * 
+ * + * string services_cidr = 12; + * + * @return The servicesCidr. + */ + public java.lang.String getServicesCidr() { + java.lang.Object ref = servicesCidr_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + servicesCidr_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * IP range for reserved for services (e.g. NFS).
+     * 
+ * + * string services_cidr = 12; + * + * @return The bytes for servicesCidr. + */ + public com.google.protobuf.ByteString getServicesCidrBytes() { + java.lang.Object ref = servicesCidr_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + servicesCidr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * IP range for reserved for services (e.g. NFS).
+     * 
+ * + * string services_cidr = 12; + * + * @param value The servicesCidr to set. + * @return This builder for chaining. + */ + public Builder setServicesCidr(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + servicesCidr_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * IP range for reserved for services (e.g. NFS).
+     * 
+ * + * string services_cidr = 12; + * + * @return This builder for chaining. + */ + public Builder clearServicesCidr() { + + servicesCidr_ = getDefaultInstance().getServicesCidr(); + onChanged(); + return this; + } + /** + * + * + *
+     * IP range for reserved for services (e.g. NFS).
+     * 
+ * + * string services_cidr = 12; + * + * @param value The bytes for servicesCidr to set. + * @return This builder for chaining. + */ + public Builder setServicesCidrBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + servicesCidr_ = value; + onChanged(); + return this; + } + + private java.util.List + reservations_ = java.util.Collections.emptyList(); + + private void ensureReservationsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + reservations_ = + new java.util.ArrayList< + com.google.cloud.baremetalsolution.v2.NetworkAddressReservation>(reservations_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.baremetalsolution.v2.NetworkAddressReservation, + com.google.cloud.baremetalsolution.v2.NetworkAddressReservation.Builder, + com.google.cloud.baremetalsolution.v2.NetworkAddressReservationOrBuilder> + reservationsBuilder_; + + /** + * + * + *
+     * List of IP address reservations in this network.
+     * When updating this field, an error will be generated if a reservation
+     * conflicts with an IP address already allocated to a physical server.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; + * + */ + public java.util.List + getReservationsList() { + if (reservationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(reservations_); + } else { + return reservationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of IP address reservations in this network.
+     * When updating this field, an error will be generated if a reservation
+     * conflicts with an IP address already allocated to a physical server.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; + * + */ + public int getReservationsCount() { + if (reservationsBuilder_ == null) { + return reservations_.size(); + } else { + return reservationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of IP address reservations in this network.
+     * When updating this field, an error will be generated if a reservation
+     * conflicts with an IP address already allocated to a physical server.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; + * + */ + public com.google.cloud.baremetalsolution.v2.NetworkAddressReservation getReservations( + int index) { + if (reservationsBuilder_ == null) { + return reservations_.get(index); + } else { + return reservationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of IP address reservations in this network.
+     * When updating this field, an error will be generated if a reservation
+     * conflicts with an IP address already allocated to a physical server.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; + * + */ + public Builder setReservations( + int index, com.google.cloud.baremetalsolution.v2.NetworkAddressReservation value) { + if (reservationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReservationsIsMutable(); + reservations_.set(index, value); + onChanged(); + } else { + reservationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of IP address reservations in this network.
+     * When updating this field, an error will be generated if a reservation
+     * conflicts with an IP address already allocated to a physical server.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; + * + */ + public Builder setReservations( + int index, + com.google.cloud.baremetalsolution.v2.NetworkAddressReservation.Builder builderForValue) { + if (reservationsBuilder_ == null) { + ensureReservationsIsMutable(); + reservations_.set(index, builderForValue.build()); + onChanged(); + } else { + reservationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of IP address reservations in this network.
+     * When updating this field, an error will be generated if a reservation
+     * conflicts with an IP address already allocated to a physical server.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; + * + */ + public Builder addReservations( + com.google.cloud.baremetalsolution.v2.NetworkAddressReservation value) { + if (reservationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReservationsIsMutable(); + reservations_.add(value); + onChanged(); + } else { + reservationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of IP address reservations in this network.
+     * When updating this field, an error will be generated if a reservation
+     * conflicts with an IP address already allocated to a physical server.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; + * + */ + public Builder addReservations( + int index, com.google.cloud.baremetalsolution.v2.NetworkAddressReservation value) { + if (reservationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReservationsIsMutable(); + reservations_.add(index, value); + onChanged(); + } else { + reservationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of IP address reservations in this network.
+     * When updating this field, an error will be generated if a reservation
+     * conflicts with an IP address already allocated to a physical server.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; + * + */ + public Builder addReservations( + com.google.cloud.baremetalsolution.v2.NetworkAddressReservation.Builder builderForValue) { + if (reservationsBuilder_ == null) { + ensureReservationsIsMutable(); + reservations_.add(builderForValue.build()); + onChanged(); + } else { + reservationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of IP address reservations in this network.
+     * When updating this field, an error will be generated if a reservation
+     * conflicts with an IP address already allocated to a physical server.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; + * + */ + public Builder addReservations( + int index, + com.google.cloud.baremetalsolution.v2.NetworkAddressReservation.Builder builderForValue) { + if (reservationsBuilder_ == null) { + ensureReservationsIsMutable(); + reservations_.add(index, builderForValue.build()); + onChanged(); + } else { + reservationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of IP address reservations in this network.
+     * When updating this field, an error will be generated if a reservation
+     * conflicts with an IP address already allocated to a physical server.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; + * + */ + public Builder addAllReservations( + java.lang.Iterable< + ? extends com.google.cloud.baremetalsolution.v2.NetworkAddressReservation> + values) { + if (reservationsBuilder_ == null) { + ensureReservationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, reservations_); + onChanged(); + } else { + reservationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of IP address reservations in this network.
+     * When updating this field, an error will be generated if a reservation
+     * conflicts with an IP address already allocated to a physical server.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; + * + */ + public Builder clearReservations() { + if (reservationsBuilder_ == null) { + reservations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + reservationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of IP address reservations in this network.
+     * When updating this field, an error will be generated if a reservation
+     * conflicts with an IP address already allocated to a physical server.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; + * + */ + public Builder removeReservations(int index) { + if (reservationsBuilder_ == null) { + ensureReservationsIsMutable(); + reservations_.remove(index); + onChanged(); + } else { + reservationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of IP address reservations in this network.
+     * When updating this field, an error will be generated if a reservation
+     * conflicts with an IP address already allocated to a physical server.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; + * + */ + public com.google.cloud.baremetalsolution.v2.NetworkAddressReservation.Builder + getReservationsBuilder(int index) { + return getReservationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of IP address reservations in this network.
+     * When updating this field, an error will be generated if a reservation
+     * conflicts with an IP address already allocated to a physical server.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; + * + */ + public com.google.cloud.baremetalsolution.v2.NetworkAddressReservationOrBuilder + getReservationsOrBuilder(int index) { + if (reservationsBuilder_ == null) { + return reservations_.get(index); + } else { + return reservationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of IP address reservations in this network.
+     * When updating this field, an error will be generated if a reservation
+     * conflicts with an IP address already allocated to a physical server.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; + * + */ + public java.util.List< + ? extends com.google.cloud.baremetalsolution.v2.NetworkAddressReservationOrBuilder> + getReservationsOrBuilderList() { + if (reservationsBuilder_ != null) { + return reservationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(reservations_); + } + } + /** + * + * + *
+     * List of IP address reservations in this network.
+     * When updating this field, an error will be generated if a reservation
+     * conflicts with an IP address already allocated to a physical server.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; + * + */ + public com.google.cloud.baremetalsolution.v2.NetworkAddressReservation.Builder + addReservationsBuilder() { + return getReservationsFieldBuilder() + .addBuilder( + com.google.cloud.baremetalsolution.v2.NetworkAddressReservation.getDefaultInstance()); + } + /** + * + * + *
+     * List of IP address reservations in this network.
+     * When updating this field, an error will be generated if a reservation
+     * conflicts with an IP address already allocated to a physical server.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; + * + */ + public com.google.cloud.baremetalsolution.v2.NetworkAddressReservation.Builder + addReservationsBuilder(int index) { + return getReservationsFieldBuilder() + .addBuilder( + index, + com.google.cloud.baremetalsolution.v2.NetworkAddressReservation.getDefaultInstance()); + } + /** + * + * + *
+     * List of IP address reservations in this network.
+     * When updating this field, an error will be generated if a reservation
+     * conflicts with an IP address already allocated to a physical server.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; + * + */ + public java.util.List + getReservationsBuilderList() { + return getReservationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.baremetalsolution.v2.NetworkAddressReservation, + com.google.cloud.baremetalsolution.v2.NetworkAddressReservation.Builder, + com.google.cloud.baremetalsolution.v2.NetworkAddressReservationOrBuilder> + getReservationsFieldBuilder() { + if (reservationsBuilder_ == null) { + reservationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.baremetalsolution.v2.NetworkAddressReservation, + com.google.cloud.baremetalsolution.v2.NetworkAddressReservation.Builder, + com.google.cloud.baremetalsolution.v2.NetworkAddressReservationOrBuilder>( + reservations_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + reservations_ = null; + } + return reservationsBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/NetworkAddressReservation.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/NetworkAddressReservation.java new file mode 100644 index 000000000000..fa6c9b0fed81 --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/NetworkAddressReservation.java @@ -0,0 +1,1032 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/baremetalsolution/v2/network.proto + +package com.google.cloud.baremetalsolution.v2; + +/** + * + * + *
+ * A reservation of one or more addresses in a network.
+ * 
+ * + * Protobuf type {@code google.cloud.baremetalsolution.v2.NetworkAddressReservation} + */ +public final class NetworkAddressReservation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.NetworkAddressReservation) + NetworkAddressReservationOrBuilder { + private static final long serialVersionUID = 0L; + // Use NetworkAddressReservation.newBuilder() to construct. + private NetworkAddressReservation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NetworkAddressReservation() { + startAddress_ = ""; + endAddress_ = ""; + note_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NetworkAddressReservation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private NetworkAddressReservation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + startAddress_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + endAddress_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + note_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_NetworkAddressReservation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_NetworkAddressReservation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.baremetalsolution.v2.NetworkAddressReservation.class, + com.google.cloud.baremetalsolution.v2.NetworkAddressReservation.Builder.class); + } + + public static final int START_ADDRESS_FIELD_NUMBER = 1; + private volatile java.lang.Object startAddress_; + /** + * + * + *
+   * The first address of this reservation block.
+   * Must be specified as a single IPv4 address, e.g. 10.1.2.2.
+   * 
+ * + * string start_address = 1; + * + * @return The startAddress. + */ + @java.lang.Override + public java.lang.String getStartAddress() { + java.lang.Object ref = startAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + startAddress_ = s; + return s; + } + } + /** + * + * + *
+   * The first address of this reservation block.
+   * Must be specified as a single IPv4 address, e.g. 10.1.2.2.
+   * 
+ * + * string start_address = 1; + * + * @return The bytes for startAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStartAddressBytes() { + java.lang.Object ref = startAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + startAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int END_ADDRESS_FIELD_NUMBER = 2; + private volatile java.lang.Object endAddress_; + /** + * + * + *
+   * The last address of this reservation block, inclusive. I.e., for cases when
+   * reservations are only single addresses, end_address and start_address will
+   * be the same.
+   * Must be specified as a single IPv4 address, e.g. 10.1.2.2.
+   * 
+ * + * string end_address = 2; + * + * @return The endAddress. + */ + @java.lang.Override + public java.lang.String getEndAddress() { + java.lang.Object ref = endAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endAddress_ = s; + return s; + } + } + /** + * + * + *
+   * The last address of this reservation block, inclusive. I.e., for cases when
+   * reservations are only single addresses, end_address and start_address will
+   * be the same.
+   * Must be specified as a single IPv4 address, e.g. 10.1.2.2.
+   * 
+ * + * string end_address = 2; + * + * @return The bytes for endAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEndAddressBytes() { + java.lang.Object ref = endAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NOTE_FIELD_NUMBER = 3; + private volatile java.lang.Object note_; + /** + * + * + *
+   * A note about this reservation, intended for human consumption.
+   * 
+ * + * string note = 3; + * + * @return The note. + */ + @java.lang.Override + public java.lang.String getNote() { + java.lang.Object ref = note_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + note_ = s; + return s; + } + } + /** + * + * + *
+   * A note about this reservation, intended for human consumption.
+   * 
+ * + * string note = 3; + * + * @return The bytes for note. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNoteBytes() { + java.lang.Object ref = note_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + note_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(startAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, startAddress_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, endAddress_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(note_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, note_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(startAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, startAddress_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, endAddress_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(note_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, note_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.baremetalsolution.v2.NetworkAddressReservation)) { + return super.equals(obj); + } + com.google.cloud.baremetalsolution.v2.NetworkAddressReservation other = + (com.google.cloud.baremetalsolution.v2.NetworkAddressReservation) obj; + + if (!getStartAddress().equals(other.getStartAddress())) return false; + if (!getEndAddress().equals(other.getEndAddress())) return false; + if (!getNote().equals(other.getNote())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + START_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getStartAddress().hashCode(); + hash = (37 * hash) + END_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getEndAddress().hashCode(); + hash = (37 * hash) + NOTE_FIELD_NUMBER; + hash = (53 * hash) + getNote().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.baremetalsolution.v2.NetworkAddressReservation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.NetworkAddressReservation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.NetworkAddressReservation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.NetworkAddressReservation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.NetworkAddressReservation parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.NetworkAddressReservation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.NetworkAddressReservation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.NetworkAddressReservation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.NetworkAddressReservation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.NetworkAddressReservation parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.NetworkAddressReservation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.NetworkAddressReservation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.baremetalsolution.v2.NetworkAddressReservation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A reservation of one or more addresses in a network.
+   * 
+ * + * Protobuf type {@code google.cloud.baremetalsolution.v2.NetworkAddressReservation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.NetworkAddressReservation) + com.google.cloud.baremetalsolution.v2.NetworkAddressReservationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_NetworkAddressReservation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_NetworkAddressReservation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.baremetalsolution.v2.NetworkAddressReservation.class, + com.google.cloud.baremetalsolution.v2.NetworkAddressReservation.Builder.class); + } + + // Construct using com.google.cloud.baremetalsolution.v2.NetworkAddressReservation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + startAddress_ = ""; + + endAddress_ = ""; + + note_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_NetworkAddressReservation_descriptor; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.NetworkAddressReservation + getDefaultInstanceForType() { + return com.google.cloud.baremetalsolution.v2.NetworkAddressReservation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.NetworkAddressReservation build() { + com.google.cloud.baremetalsolution.v2.NetworkAddressReservation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.NetworkAddressReservation buildPartial() { + com.google.cloud.baremetalsolution.v2.NetworkAddressReservation result = + new com.google.cloud.baremetalsolution.v2.NetworkAddressReservation(this); + result.startAddress_ = startAddress_; + result.endAddress_ = endAddress_; + result.note_ = note_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.baremetalsolution.v2.NetworkAddressReservation) { + return mergeFrom((com.google.cloud.baremetalsolution.v2.NetworkAddressReservation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.baremetalsolution.v2.NetworkAddressReservation other) { + if (other + == com.google.cloud.baremetalsolution.v2.NetworkAddressReservation.getDefaultInstance()) + return this; + if (!other.getStartAddress().isEmpty()) { + startAddress_ = other.startAddress_; + onChanged(); + } + if (!other.getEndAddress().isEmpty()) { + endAddress_ = other.endAddress_; + onChanged(); + } + if (!other.getNote().isEmpty()) { + note_ = other.note_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.baremetalsolution.v2.NetworkAddressReservation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.baremetalsolution.v2.NetworkAddressReservation) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object startAddress_ = ""; + /** + * + * + *
+     * The first address of this reservation block.
+     * Must be specified as a single IPv4 address, e.g. 10.1.2.2.
+     * 
+ * + * string start_address = 1; + * + * @return The startAddress. + */ + public java.lang.String getStartAddress() { + java.lang.Object ref = startAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + startAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The first address of this reservation block.
+     * Must be specified as a single IPv4 address, e.g. 10.1.2.2.
+     * 
+ * + * string start_address = 1; + * + * @return The bytes for startAddress. + */ + public com.google.protobuf.ByteString getStartAddressBytes() { + java.lang.Object ref = startAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + startAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The first address of this reservation block.
+     * Must be specified as a single IPv4 address, e.g. 10.1.2.2.
+     * 
+ * + * string start_address = 1; + * + * @param value The startAddress to set. + * @return This builder for chaining. + */ + public Builder setStartAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + startAddress_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The first address of this reservation block.
+     * Must be specified as a single IPv4 address, e.g. 10.1.2.2.
+     * 
+ * + * string start_address = 1; + * + * @return This builder for chaining. + */ + public Builder clearStartAddress() { + + startAddress_ = getDefaultInstance().getStartAddress(); + onChanged(); + return this; + } + /** + * + * + *
+     * The first address of this reservation block.
+     * Must be specified as a single IPv4 address, e.g. 10.1.2.2.
+     * 
+ * + * string start_address = 1; + * + * @param value The bytes for startAddress to set. + * @return This builder for chaining. + */ + public Builder setStartAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + startAddress_ = value; + onChanged(); + return this; + } + + private java.lang.Object endAddress_ = ""; + /** + * + * + *
+     * The last address of this reservation block, inclusive. I.e., for cases when
+     * reservations are only single addresses, end_address and start_address will
+     * be the same.
+     * Must be specified as a single IPv4 address, e.g. 10.1.2.2.
+     * 
+ * + * string end_address = 2; + * + * @return The endAddress. + */ + public java.lang.String getEndAddress() { + java.lang.Object ref = endAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The last address of this reservation block, inclusive. I.e., for cases when
+     * reservations are only single addresses, end_address and start_address will
+     * be the same.
+     * Must be specified as a single IPv4 address, e.g. 10.1.2.2.
+     * 
+ * + * string end_address = 2; + * + * @return The bytes for endAddress. + */ + public com.google.protobuf.ByteString getEndAddressBytes() { + java.lang.Object ref = endAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The last address of this reservation block, inclusive. I.e., for cases when
+     * reservations are only single addresses, end_address and start_address will
+     * be the same.
+     * Must be specified as a single IPv4 address, e.g. 10.1.2.2.
+     * 
+ * + * string end_address = 2; + * + * @param value The endAddress to set. + * @return This builder for chaining. + */ + public Builder setEndAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + endAddress_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The last address of this reservation block, inclusive. I.e., for cases when
+     * reservations are only single addresses, end_address and start_address will
+     * be the same.
+     * Must be specified as a single IPv4 address, e.g. 10.1.2.2.
+     * 
+ * + * string end_address = 2; + * + * @return This builder for chaining. + */ + public Builder clearEndAddress() { + + endAddress_ = getDefaultInstance().getEndAddress(); + onChanged(); + return this; + } + /** + * + * + *
+     * The last address of this reservation block, inclusive. I.e., for cases when
+     * reservations are only single addresses, end_address and start_address will
+     * be the same.
+     * Must be specified as a single IPv4 address, e.g. 10.1.2.2.
+     * 
+ * + * string end_address = 2; + * + * @param value The bytes for endAddress to set. + * @return This builder for chaining. + */ + public Builder setEndAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + endAddress_ = value; + onChanged(); + return this; + } + + private java.lang.Object note_ = ""; + /** + * + * + *
+     * A note about this reservation, intended for human consumption.
+     * 
+ * + * string note = 3; + * + * @return The note. + */ + public java.lang.String getNote() { + java.lang.Object ref = note_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + note_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A note about this reservation, intended for human consumption.
+     * 
+ * + * string note = 3; + * + * @return The bytes for note. + */ + public com.google.protobuf.ByteString getNoteBytes() { + java.lang.Object ref = note_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + note_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A note about this reservation, intended for human consumption.
+     * 
+ * + * string note = 3; + * + * @param value The note to set. + * @return This builder for chaining. + */ + public Builder setNote(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + note_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A note about this reservation, intended for human consumption.
+     * 
+ * + * string note = 3; + * + * @return This builder for chaining. + */ + public Builder clearNote() { + + note_ = getDefaultInstance().getNote(); + onChanged(); + return this; + } + /** + * + * + *
+     * A note about this reservation, intended for human consumption.
+     * 
+ * + * string note = 3; + * + * @param value The bytes for note to set. + * @return This builder for chaining. + */ + public Builder setNoteBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + note_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.NetworkAddressReservation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.NetworkAddressReservation) + private static final com.google.cloud.baremetalsolution.v2.NetworkAddressReservation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.NetworkAddressReservation(); + } + + public static com.google.cloud.baremetalsolution.v2.NetworkAddressReservation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NetworkAddressReservation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NetworkAddressReservation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.NetworkAddressReservation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/NetworkAddressReservationOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/NetworkAddressReservationOrBuilder.java new file mode 100644 index 000000000000..a9839c9b32a1 --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/NetworkAddressReservationOrBuilder.java @@ -0,0 +1,108 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/baremetalsolution/v2/network.proto + +package com.google.cloud.baremetalsolution.v2; + +public interface NetworkAddressReservationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.NetworkAddressReservation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The first address of this reservation block.
+   * Must be specified as a single IPv4 address, e.g. 10.1.2.2.
+   * 
+ * + * string start_address = 1; + * + * @return The startAddress. + */ + java.lang.String getStartAddress(); + /** + * + * + *
+   * The first address of this reservation block.
+   * Must be specified as a single IPv4 address, e.g. 10.1.2.2.
+   * 
+ * + * string start_address = 1; + * + * @return The bytes for startAddress. + */ + com.google.protobuf.ByteString getStartAddressBytes(); + + /** + * + * + *
+   * The last address of this reservation block, inclusive. I.e., for cases when
+   * reservations are only single addresses, end_address and start_address will
+   * be the same.
+   * Must be specified as a single IPv4 address, e.g. 10.1.2.2.
+   * 
+ * + * string end_address = 2; + * + * @return The endAddress. + */ + java.lang.String getEndAddress(); + /** + * + * + *
+   * The last address of this reservation block, inclusive. I.e., for cases when
+   * reservations are only single addresses, end_address and start_address will
+   * be the same.
+   * Must be specified as a single IPv4 address, e.g. 10.1.2.2.
+   * 
+ * + * string end_address = 2; + * + * @return The bytes for endAddress. + */ + com.google.protobuf.ByteString getEndAddressBytes(); + + /** + * + * + *
+   * A note about this reservation, intended for human consumption.
+   * 
+ * + * string note = 3; + * + * @return The note. + */ + java.lang.String getNote(); + /** + * + * + *
+   * A note about this reservation, intended for human consumption.
+   * 
+ * + * string note = 3; + * + * @return The bytes for note. + */ + com.google.protobuf.ByteString getNoteBytes(); +} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/NetworkOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/NetworkOrBuilder.java index ebc518823009..8f4c764c4940 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/NetworkOrBuilder.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/NetworkOrBuilder.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/network.proto package com.google.cloud.baremetalsolution.v2; @@ -32,9 +32,6 @@ public interface NetworkOrBuilder * https://cloud.google.com/apis/design/resource_names. * Format: * `projects/{project}/locations/{location}/networks/{network}` - * This field will contain the same value as field "network", which will soon - * be deprecated. Please use this field to reference the name of the network - * resource. * * * string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -51,9 +48,6 @@ public interface NetworkOrBuilder * https://cloud.google.com/apis/design/resource_names. * Format: * `projects/{project}/locations/{location}/networks/{network}` - * This field will contain the same value as field "network", which will soon - * be deprecated. Please use this field to reference the name of the network - * resource. * * * string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -66,26 +60,26 @@ public interface NetworkOrBuilder * * *
-   * Name of the network.
+   * An identifier for the `Network`, generated by the backend.
    * 
* - * string network = 1; + * string id = 10; * - * @return The network. + * @return The id. */ - java.lang.String getNetwork(); + java.lang.String getId(); /** * * *
-   * Name of the network.
+   * An identifier for the `Network`, generated by the backend.
    * 
* - * string network = 1; + * string id = 10; * - * @return The bytes for network. + * @return The bytes for id. */ - com.google.protobuf.ByteString getNetworkBytes(); + com.google.protobuf.ByteString getIdBytes(); /** * @@ -297,4 +291,157 @@ public interface NetworkOrBuilder * .google.cloud.baremetalsolution.v2.VRF vrf = 9; */ com.google.cloud.baremetalsolution.v2.VRFOrBuilder getVrfOrBuilder(); + + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 11; + */ + int getLabelsCount(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 11; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 11; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 11; + */ + + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 11; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * IP range for reserved for services (e.g. NFS).
+   * 
+ * + * string services_cidr = 12; + * + * @return The servicesCidr. + */ + java.lang.String getServicesCidr(); + /** + * + * + *
+   * IP range for reserved for services (e.g. NFS).
+   * 
+ * + * string services_cidr = 12; + * + * @return The bytes for servicesCidr. + */ + com.google.protobuf.ByteString getServicesCidrBytes(); + + /** + * + * + *
+   * List of IP address reservations in this network.
+   * When updating this field, an error will be generated if a reservation
+   * conflicts with an IP address already allocated to a physical server.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; + * + */ + java.util.List + getReservationsList(); + /** + * + * + *
+   * List of IP address reservations in this network.
+   * When updating this field, an error will be generated if a reservation
+   * conflicts with an IP address already allocated to a physical server.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; + * + */ + com.google.cloud.baremetalsolution.v2.NetworkAddressReservation getReservations(int index); + /** + * + * + *
+   * List of IP address reservations in this network.
+   * When updating this field, an error will be generated if a reservation
+   * conflicts with an IP address already allocated to a physical server.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; + * + */ + int getReservationsCount(); + /** + * + * + *
+   * List of IP address reservations in this network.
+   * When updating this field, an error will be generated if a reservation
+   * conflicts with an IP address already allocated to a physical server.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; + * + */ + java.util.List + getReservationsOrBuilderList(); + /** + * + * + *
+   * List of IP address reservations in this network.
+   * When updating this field, an error will be generated if a reservation
+   * conflicts with an IP address already allocated to a physical server.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13; + * + */ + com.google.cloud.baremetalsolution.v2.NetworkAddressReservationOrBuilder getReservationsOrBuilder( + int index); } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/NetworkProto.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/NetworkProto.java new file mode 100644 index 000000000000..06274bd3d6b9 --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/NetworkProto.java @@ -0,0 +1,327 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/baremetalsolution/v2/network.proto + +package com.google.cloud.baremetalsolution.v2; + +public final class NetworkProto { + private NetworkProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_Network_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_Network_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_Network_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_Network_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_NetworkAddressReservation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_NetworkAddressReservation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_VRF_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_VRF_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_VRF_QosPolicy_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_VRF_QosPolicy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_VRF_VlanAttachment_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_VRF_VlanAttachment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_LogicalInterface_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_LogicalInterface_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_LogicalInterface_LogicalNetworkInterface_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_LogicalInterface_LogicalNetworkInterface_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_GetNetworkRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_GetNetworkRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_ListNetworksRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_ListNetworksRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_ListNetworksResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_ListNetworksResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_UpdateNetworkRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_UpdateNetworkRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_NetworkUsage_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_NetworkUsage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_ListNetworkUsageRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_ListNetworkUsageRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_ListNetworkUsageResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_ListNetworkUsageResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n/google/cloud/baremetalsolution/v2/netw" + + "ork.proto\022!google.cloud.baremetalsolutio" + + "n.v2\032\037google/api/field_behavior.proto\032\031g" + + "oogle/api/resource.proto\032 google/protobu" + + "f/field_mask.proto\"\354\005\n\007Network\022\021\n\004name\030\005" + + " \001(\tB\003\340A\003\022\n\n\002id\030\n \001(\t\022=\n\004type\030\002 \001(\0162/.go" + + "ogle.cloud.baremetalsolution.v2.Network." + + "Type\022\022\n\nip_address\030\003 \001(\t\022\023\n\013mac_address\030" + + "\004 \003(\t\022?\n\005state\030\006 \001(\01620.google.cloud.bare" + + "metalsolution.v2.Network.State\022\017\n\007vlan_i" + + "d\030\007 \001(\t\022\014\n\004cidr\030\010 \001(\t\0223\n\003vrf\030\t \001(\0132&.goo" + + "gle.cloud.baremetalsolution.v2.VRF\022F\n\006la" + + "bels\030\013 \003(\01326.google.cloud.baremetalsolut" + + "ion.v2.Network.LabelsEntry\022\025\n\rservices_c" + + "idr\030\014 \001(\t\022R\n\014reservations\030\r \003(\0132<.google" + + ".cloud.baremetalsolution.v2.NetworkAddre" + + "ssReservation\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(" + + "\t\022\r\n\005value\030\002 \001(\t:\0028\001\"5\n\004Type\022\024\n\020TYPE_UNS" + + "PECIFIED\020\000\022\n\n\006CLIENT\020\001\022\013\n\007PRIVATE\020\002\"A\n\005S" + + "tate\022\025\n\021STATE_UNSPECIFIED\020\000\022\020\n\014PROVISION" + + "ING\020\001\022\017\n\013PROVISIONED\020\002:i\352Af\n(baremetalso" + + "lution.googleapis.com/Network\022:projects/" + + "{project}/locations/{location}/networks/" + + "{network}\"U\n\031NetworkAddressReservation\022\025" + + "\n\rstart_address\030\001 \001(\t\022\023\n\013end_address\030\002 \001" + + "(\t\022\014\n\004note\030\003 \001(\t\"\233\003\n\003VRF\022\014\n\004name\030\001 \001(\t\022;" + + "\n\005state\030\005 \001(\0162,.google.cloud.baremetalso" + + "lution.v2.VRF.State\022D\n\nqos_policy\030\006 \001(\0132" + + "0.google.cloud.baremetalsolution.v2.VRF." + + "QosPolicy\022O\n\020vlan_attachments\030\007 \003(\01325.go" + + "ogle.cloud.baremetalsolution.v2.VRF.Vlan" + + "Attachment\032#\n\tQosPolicy\022\026\n\016bandwidth_gbp" + + "s\030\001 \001(\001\032J\n\016VlanAttachment\022\024\n\014peer_vlan_i" + + "d\030\001 \001(\003\022\017\n\007peer_ip\030\002 \001(\t\022\021\n\trouter_ip\030\003 " + + "\001(\t\"A\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\020\n\014P" + + "ROVISIONING\020\001\022\017\n\013PROVISIONED\020\002\"\327\002\n\020Logic" + + "alInterface\022o\n\032logical_network_interface" + + "s\030\001 \003(\0132K.google.cloud.baremetalsolution" + + ".v2.LogicalInterface.LogicalNetworkInter" + + "face\022\014\n\004name\030\002 \001(\t\022\027\n\017interface_index\030\003 " + + "\001(\005\032\252\001\n\027LogicalNetworkInterface\022\017\n\007netwo" + + "rk\030\001 \001(\t\022\022\n\nip_address\030\002 \001(\t\022\027\n\017default_" + + "gateway\030\003 \001(\010\022E\n\014network_type\030\004 \001(\0162/.go" + + "ogle.cloud.baremetalsolution.v2.Network." + + "Type\022\n\n\002id\030\005 \001(\t\"S\n\021GetNetworkRequest\022>\n" + + "\004name\030\001 \001(\tB0\340A\002\372A*\n(baremetalsolution.g" + + "oogleapis.com/Network\"\207\001\n\023ListNetworksRe" + + "quest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations" + + ".googleapis.com/Location\022\021\n\tpage_size\030\002 " + + "\001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t\"" + + "\202\001\n\024ListNetworksResponse\022<\n\010networks\030\001 \003" + + "(\0132*.google.cloud.baremetalsolution.v2.N" + + "etwork\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unrea" + + "chable\030\003 \003(\t\"\211\001\n\024UpdateNetworkRequest\022@\n" + + "\007network\030\001 \001(\0132*.google.cloud.baremetals" + + "olution.v2.NetworkB\003\340A\002\022/\n\013update_mask\030\002" + + " \001(\0132\032.google.protobuf.FieldMask\"]\n\014Netw" + + "orkUsage\022;\n\007network\030\001 \001(\0132*.google.cloud" + + ".baremetalsolution.v2.Network\022\020\n\010used_ip" + + "s\030\002 \003(\t\"V\n\027ListNetworkUsageRequest\022;\n\010lo" + + "cation\030\001 \001(\tB)\340A\002\372A#\n!locations.googleap" + + "is.com/Location\"]\n\030ListNetworkUsageRespo" + + "nse\022A\n\010networks\030\001 \003(\0132/.google.cloud.bar" + + "emetalsolution.v2.NetworkUsageB\372\001\n%com.g" + + "oogle.cloud.baremetalsolution.v2B\014Networ" + + "kProtoP\001ZRgoogle.golang.org/genproto/goo" + + "gleapis/cloud/baremetalsolution/v2;barem" + + "etalsolution\252\002!Google.Cloud.BareMetalSol" + + "ution.V2\312\002!Google\\Cloud\\BareMetalSolutio" + + "n\\V2\352\002$Google::Cloud::BareMetalSolution:" + + ":V2b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_cloud_baremetalsolution_v2_Network_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_baremetalsolution_v2_Network_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_Network_descriptor, + new java.lang.String[] { + "Name", + "Id", + "Type", + "IpAddress", + "MacAddress", + "State", + "VlanId", + "Cidr", + "Vrf", + "Labels", + "ServicesCidr", + "Reservations", + }); + internal_static_google_cloud_baremetalsolution_v2_Network_LabelsEntry_descriptor = + internal_static_google_cloud_baremetalsolution_v2_Network_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_baremetalsolution_v2_Network_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_Network_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_baremetalsolution_v2_NetworkAddressReservation_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_baremetalsolution_v2_NetworkAddressReservation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_NetworkAddressReservation_descriptor, + new java.lang.String[] { + "StartAddress", "EndAddress", "Note", + }); + internal_static_google_cloud_baremetalsolution_v2_VRF_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_baremetalsolution_v2_VRF_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_VRF_descriptor, + new java.lang.String[] { + "Name", "State", "QosPolicy", "VlanAttachments", + }); + internal_static_google_cloud_baremetalsolution_v2_VRF_QosPolicy_descriptor = + internal_static_google_cloud_baremetalsolution_v2_VRF_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_baremetalsolution_v2_VRF_QosPolicy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_VRF_QosPolicy_descriptor, + new java.lang.String[] { + "BandwidthGbps", + }); + internal_static_google_cloud_baremetalsolution_v2_VRF_VlanAttachment_descriptor = + internal_static_google_cloud_baremetalsolution_v2_VRF_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_baremetalsolution_v2_VRF_VlanAttachment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_VRF_VlanAttachment_descriptor, + new java.lang.String[] { + "PeerVlanId", "PeerIp", "RouterIp", + }); + internal_static_google_cloud_baremetalsolution_v2_LogicalInterface_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_baremetalsolution_v2_LogicalInterface_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_LogicalInterface_descriptor, + new java.lang.String[] { + "LogicalNetworkInterfaces", "Name", "InterfaceIndex", + }); + internal_static_google_cloud_baremetalsolution_v2_LogicalInterface_LogicalNetworkInterface_descriptor = + internal_static_google_cloud_baremetalsolution_v2_LogicalInterface_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_baremetalsolution_v2_LogicalInterface_LogicalNetworkInterface_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_LogicalInterface_LogicalNetworkInterface_descriptor, + new java.lang.String[] { + "Network", "IpAddress", "DefaultGateway", "NetworkType", "Id", + }); + internal_static_google_cloud_baremetalsolution_v2_GetNetworkRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_baremetalsolution_v2_GetNetworkRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_GetNetworkRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_baremetalsolution_v2_ListNetworksRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_baremetalsolution_v2_ListNetworksRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_ListNetworksRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", + }); + internal_static_google_cloud_baremetalsolution_v2_ListNetworksResponse_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_baremetalsolution_v2_ListNetworksResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_ListNetworksResponse_descriptor, + new java.lang.String[] { + "Networks", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_baremetalsolution_v2_UpdateNetworkRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_baremetalsolution_v2_UpdateNetworkRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_UpdateNetworkRequest_descriptor, + new java.lang.String[] { + "Network", "UpdateMask", + }); + internal_static_google_cloud_baremetalsolution_v2_NetworkUsage_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_baremetalsolution_v2_NetworkUsage_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_NetworkUsage_descriptor, + new java.lang.String[] { + "Network", "UsedIps", + }); + internal_static_google_cloud_baremetalsolution_v2_ListNetworkUsageRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_baremetalsolution_v2_ListNetworkUsageRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_ListNetworkUsageRequest_descriptor, + new java.lang.String[] { + "Location", + }); + internal_static_google_cloud_baremetalsolution_v2_ListNetworkUsageResponse_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_baremetalsolution_v2_ListNetworkUsageResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_ListNetworkUsageResponse_descriptor, + new java.lang.String[] { + "Networks", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/NetworkUsage.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/NetworkUsage.java new file mode 100644 index 000000000000..19550dde5d47 --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/NetworkUsage.java @@ -0,0 +1,1017 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/baremetalsolution/v2/network.proto + +package com.google.cloud.baremetalsolution.v2; + +/** + * + * + *
+ * Network with all used IP addresses.
+ * 
+ * + * Protobuf type {@code google.cloud.baremetalsolution.v2.NetworkUsage} + */ +public final class NetworkUsage extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.NetworkUsage) + NetworkUsageOrBuilder { + private static final long serialVersionUID = 0L; + // Use NetworkUsage.newBuilder() to construct. + private NetworkUsage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NetworkUsage() { + usedIps_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NetworkUsage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private NetworkUsage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.baremetalsolution.v2.Network.Builder subBuilder = null; + if (network_ != null) { + subBuilder = network_.toBuilder(); + } + network_ = + input.readMessage( + com.google.cloud.baremetalsolution.v2.Network.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(network_); + network_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + usedIps_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + usedIps_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + usedIps_ = usedIps_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_NetworkUsage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_NetworkUsage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.baremetalsolution.v2.NetworkUsage.class, + com.google.cloud.baremetalsolution.v2.NetworkUsage.Builder.class); + } + + public static final int NETWORK_FIELD_NUMBER = 1; + private com.google.cloud.baremetalsolution.v2.Network network_; + /** + * + * + *
+   * Network.
+   * 
+ * + * .google.cloud.baremetalsolution.v2.Network network = 1; + * + * @return Whether the network field is set. + */ + @java.lang.Override + public boolean hasNetwork() { + return network_ != null; + } + /** + * + * + *
+   * Network.
+   * 
+ * + * .google.cloud.baremetalsolution.v2.Network network = 1; + * + * @return The network. + */ + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.Network getNetwork() { + return network_ == null + ? com.google.cloud.baremetalsolution.v2.Network.getDefaultInstance() + : network_; + } + /** + * + * + *
+   * Network.
+   * 
+ * + * .google.cloud.baremetalsolution.v2.Network network = 1; + */ + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.NetworkOrBuilder getNetworkOrBuilder() { + return getNetwork(); + } + + public static final int USED_IPS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList usedIps_; + /** + * + * + *
+   * All used IP addresses in this network.
+   * 
+ * + * repeated string used_ips = 2; + * + * @return A list containing the usedIps. + */ + public com.google.protobuf.ProtocolStringList getUsedIpsList() { + return usedIps_; + } + /** + * + * + *
+   * All used IP addresses in this network.
+   * 
+ * + * repeated string used_ips = 2; + * + * @return The count of usedIps. + */ + public int getUsedIpsCount() { + return usedIps_.size(); + } + /** + * + * + *
+   * All used IP addresses in this network.
+   * 
+ * + * repeated string used_ips = 2; + * + * @param index The index of the element to return. + * @return The usedIps at the given index. + */ + public java.lang.String getUsedIps(int index) { + return usedIps_.get(index); + } + /** + * + * + *
+   * All used IP addresses in this network.
+   * 
+ * + * repeated string used_ips = 2; + * + * @param index The index of the value to return. + * @return The bytes of the usedIps at the given index. + */ + public com.google.protobuf.ByteString getUsedIpsBytes(int index) { + return usedIps_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (network_ != null) { + output.writeMessage(1, getNetwork()); + } + for (int i = 0; i < usedIps_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, usedIps_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (network_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getNetwork()); + } + { + int dataSize = 0; + for (int i = 0; i < usedIps_.size(); i++) { + dataSize += computeStringSizeNoTag(usedIps_.getRaw(i)); + } + size += dataSize; + size += 1 * getUsedIpsList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.baremetalsolution.v2.NetworkUsage)) { + return super.equals(obj); + } + com.google.cloud.baremetalsolution.v2.NetworkUsage other = + (com.google.cloud.baremetalsolution.v2.NetworkUsage) obj; + + if (hasNetwork() != other.hasNetwork()) return false; + if (hasNetwork()) { + if (!getNetwork().equals(other.getNetwork())) return false; + } + if (!getUsedIpsList().equals(other.getUsedIpsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasNetwork()) { + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + } + if (getUsedIpsCount() > 0) { + hash = (37 * hash) + USED_IPS_FIELD_NUMBER; + hash = (53 * hash) + getUsedIpsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.baremetalsolution.v2.NetworkUsage parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.NetworkUsage parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.NetworkUsage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.NetworkUsage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.NetworkUsage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.NetworkUsage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.NetworkUsage parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.NetworkUsage parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.NetworkUsage parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.NetworkUsage parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.NetworkUsage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.NetworkUsage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.baremetalsolution.v2.NetworkUsage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Network with all used IP addresses.
+   * 
+ * + * Protobuf type {@code google.cloud.baremetalsolution.v2.NetworkUsage} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.NetworkUsage) + com.google.cloud.baremetalsolution.v2.NetworkUsageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_NetworkUsage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_NetworkUsage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.baremetalsolution.v2.NetworkUsage.class, + com.google.cloud.baremetalsolution.v2.NetworkUsage.Builder.class); + } + + // Construct using com.google.cloud.baremetalsolution.v2.NetworkUsage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (networkBuilder_ == null) { + network_ = null; + } else { + network_ = null; + networkBuilder_ = null; + } + usedIps_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_NetworkUsage_descriptor; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.NetworkUsage getDefaultInstanceForType() { + return com.google.cloud.baremetalsolution.v2.NetworkUsage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.NetworkUsage build() { + com.google.cloud.baremetalsolution.v2.NetworkUsage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.NetworkUsage buildPartial() { + com.google.cloud.baremetalsolution.v2.NetworkUsage result = + new com.google.cloud.baremetalsolution.v2.NetworkUsage(this); + int from_bitField0_ = bitField0_; + if (networkBuilder_ == null) { + result.network_ = network_; + } else { + result.network_ = networkBuilder_.build(); + } + if (((bitField0_ & 0x00000001) != 0)) { + usedIps_ = usedIps_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.usedIps_ = usedIps_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.baremetalsolution.v2.NetworkUsage) { + return mergeFrom((com.google.cloud.baremetalsolution.v2.NetworkUsage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.NetworkUsage other) { + if (other == com.google.cloud.baremetalsolution.v2.NetworkUsage.getDefaultInstance()) + return this; + if (other.hasNetwork()) { + mergeNetwork(other.getNetwork()); + } + if (!other.usedIps_.isEmpty()) { + if (usedIps_.isEmpty()) { + usedIps_ = other.usedIps_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureUsedIpsIsMutable(); + usedIps_.addAll(other.usedIps_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.baremetalsolution.v2.NetworkUsage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.baremetalsolution.v2.NetworkUsage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.cloud.baremetalsolution.v2.Network network_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.baremetalsolution.v2.Network, + com.google.cloud.baremetalsolution.v2.Network.Builder, + com.google.cloud.baremetalsolution.v2.NetworkOrBuilder> + networkBuilder_; + /** + * + * + *
+     * Network.
+     * 
+ * + * .google.cloud.baremetalsolution.v2.Network network = 1; + * + * @return Whether the network field is set. + */ + public boolean hasNetwork() { + return networkBuilder_ != null || network_ != null; + } + /** + * + * + *
+     * Network.
+     * 
+ * + * .google.cloud.baremetalsolution.v2.Network network = 1; + * + * @return The network. + */ + public com.google.cloud.baremetalsolution.v2.Network getNetwork() { + if (networkBuilder_ == null) { + return network_ == null + ? com.google.cloud.baremetalsolution.v2.Network.getDefaultInstance() + : network_; + } else { + return networkBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Network.
+     * 
+ * + * .google.cloud.baremetalsolution.v2.Network network = 1; + */ + public Builder setNetwork(com.google.cloud.baremetalsolution.v2.Network value) { + if (networkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + network_ = value; + onChanged(); + } else { + networkBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Network.
+     * 
+ * + * .google.cloud.baremetalsolution.v2.Network network = 1; + */ + public Builder setNetwork( + com.google.cloud.baremetalsolution.v2.Network.Builder builderForValue) { + if (networkBuilder_ == null) { + network_ = builderForValue.build(); + onChanged(); + } else { + networkBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Network.
+     * 
+ * + * .google.cloud.baremetalsolution.v2.Network network = 1; + */ + public Builder mergeNetwork(com.google.cloud.baremetalsolution.v2.Network value) { + if (networkBuilder_ == null) { + if (network_ != null) { + network_ = + com.google.cloud.baremetalsolution.v2.Network.newBuilder(network_) + .mergeFrom(value) + .buildPartial(); + } else { + network_ = value; + } + onChanged(); + } else { + networkBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Network.
+     * 
+ * + * .google.cloud.baremetalsolution.v2.Network network = 1; + */ + public Builder clearNetwork() { + if (networkBuilder_ == null) { + network_ = null; + onChanged(); + } else { + network_ = null; + networkBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Network.
+     * 
+ * + * .google.cloud.baremetalsolution.v2.Network network = 1; + */ + public com.google.cloud.baremetalsolution.v2.Network.Builder getNetworkBuilder() { + + onChanged(); + return getNetworkFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Network.
+     * 
+ * + * .google.cloud.baremetalsolution.v2.Network network = 1; + */ + public com.google.cloud.baremetalsolution.v2.NetworkOrBuilder getNetworkOrBuilder() { + if (networkBuilder_ != null) { + return networkBuilder_.getMessageOrBuilder(); + } else { + return network_ == null + ? com.google.cloud.baremetalsolution.v2.Network.getDefaultInstance() + : network_; + } + } + /** + * + * + *
+     * Network.
+     * 
+ * + * .google.cloud.baremetalsolution.v2.Network network = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.baremetalsolution.v2.Network, + com.google.cloud.baremetalsolution.v2.Network.Builder, + com.google.cloud.baremetalsolution.v2.NetworkOrBuilder> + getNetworkFieldBuilder() { + if (networkBuilder_ == null) { + networkBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.baremetalsolution.v2.Network, + com.google.cloud.baremetalsolution.v2.Network.Builder, + com.google.cloud.baremetalsolution.v2.NetworkOrBuilder>( + getNetwork(), getParentForChildren(), isClean()); + network_ = null; + } + return networkBuilder_; + } + + private com.google.protobuf.LazyStringList usedIps_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureUsedIpsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + usedIps_ = new com.google.protobuf.LazyStringArrayList(usedIps_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * All used IP addresses in this network.
+     * 
+ * + * repeated string used_ips = 2; + * + * @return A list containing the usedIps. + */ + public com.google.protobuf.ProtocolStringList getUsedIpsList() { + return usedIps_.getUnmodifiableView(); + } + /** + * + * + *
+     * All used IP addresses in this network.
+     * 
+ * + * repeated string used_ips = 2; + * + * @return The count of usedIps. + */ + public int getUsedIpsCount() { + return usedIps_.size(); + } + /** + * + * + *
+     * All used IP addresses in this network.
+     * 
+ * + * repeated string used_ips = 2; + * + * @param index The index of the element to return. + * @return The usedIps at the given index. + */ + public java.lang.String getUsedIps(int index) { + return usedIps_.get(index); + } + /** + * + * + *
+     * All used IP addresses in this network.
+     * 
+ * + * repeated string used_ips = 2; + * + * @param index The index of the value to return. + * @return The bytes of the usedIps at the given index. + */ + public com.google.protobuf.ByteString getUsedIpsBytes(int index) { + return usedIps_.getByteString(index); + } + /** + * + * + *
+     * All used IP addresses in this network.
+     * 
+ * + * repeated string used_ips = 2; + * + * @param index The index to set the value at. + * @param value The usedIps to set. + * @return This builder for chaining. + */ + public Builder setUsedIps(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUsedIpsIsMutable(); + usedIps_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * All used IP addresses in this network.
+     * 
+ * + * repeated string used_ips = 2; + * + * @param value The usedIps to add. + * @return This builder for chaining. + */ + public Builder addUsedIps(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUsedIpsIsMutable(); + usedIps_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * All used IP addresses in this network.
+     * 
+ * + * repeated string used_ips = 2; + * + * @param values The usedIps to add. + * @return This builder for chaining. + */ + public Builder addAllUsedIps(java.lang.Iterable values) { + ensureUsedIpsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, usedIps_); + onChanged(); + return this; + } + /** + * + * + *
+     * All used IP addresses in this network.
+     * 
+ * + * repeated string used_ips = 2; + * + * @return This builder for chaining. + */ + public Builder clearUsedIps() { + usedIps_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * All used IP addresses in this network.
+     * 
+ * + * repeated string used_ips = 2; + * + * @param value The bytes of the usedIps to add. + * @return This builder for chaining. + */ + public Builder addUsedIpsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUsedIpsIsMutable(); + usedIps_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.NetworkUsage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.NetworkUsage) + private static final com.google.cloud.baremetalsolution.v2.NetworkUsage DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.NetworkUsage(); + } + + public static com.google.cloud.baremetalsolution.v2.NetworkUsage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NetworkUsage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NetworkUsage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.NetworkUsage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/NetworkUsageOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/NetworkUsageOrBuilder.java new file mode 100644 index 000000000000..60acf99415b6 --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/NetworkUsageOrBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/baremetalsolution/v2/network.proto + +package com.google.cloud.baremetalsolution.v2; + +public interface NetworkUsageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.NetworkUsage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Network.
+   * 
+ * + * .google.cloud.baremetalsolution.v2.Network network = 1; + * + * @return Whether the network field is set. + */ + boolean hasNetwork(); + /** + * + * + *
+   * Network.
+   * 
+ * + * .google.cloud.baremetalsolution.v2.Network network = 1; + * + * @return The network. + */ + com.google.cloud.baremetalsolution.v2.Network getNetwork(); + /** + * + * + *
+   * Network.
+   * 
+ * + * .google.cloud.baremetalsolution.v2.Network network = 1; + */ + com.google.cloud.baremetalsolution.v2.NetworkOrBuilder getNetworkOrBuilder(); + + /** + * + * + *
+   * All used IP addresses in this network.
+   * 
+ * + * repeated string used_ips = 2; + * + * @return A list containing the usedIps. + */ + java.util.List getUsedIpsList(); + /** + * + * + *
+   * All used IP addresses in this network.
+   * 
+ * + * repeated string used_ips = 2; + * + * @return The count of usedIps. + */ + int getUsedIpsCount(); + /** + * + * + *
+   * All used IP addresses in this network.
+   * 
+ * + * repeated string used_ips = 2; + * + * @param index The index of the element to return. + * @return The usedIps at the given index. + */ + java.lang.String getUsedIps(int index); + /** + * + * + *
+   * All used IP addresses in this network.
+   * 
+ * + * repeated string used_ips = 2; + * + * @param index The index of the value to return. + * @return The bytes of the usedIps at the given index. + */ + com.google.protobuf.ByteString getUsedIpsBytes(int index); +} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/NfsShare.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/NfsShare.java new file mode 100644 index 000000000000..b8bb184b762d --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/NfsShare.java @@ -0,0 +1,3894 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/baremetalsolution/v2/nfs_share.proto + +package com.google.cloud.baremetalsolution.v2; + +/** + * + * + *
+ * An NFS share.
+ * 
+ * + * Protobuf type {@code google.cloud.baremetalsolution.v2.NfsShare} + */ +public final class NfsShare extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.NfsShare) + NfsShareOrBuilder { + private static final long serialVersionUID = 0L; + // Use NfsShare.newBuilder() to construct. + private NfsShare(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NfsShare() { + name_ = ""; + nfsShareId_ = ""; + state_ = 0; + volume_ = ""; + allowedClients_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NfsShare(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private NfsShare( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nfsShareId_ = s; + break; + } + case 24: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + volume_ = s; + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + allowedClients_ = + new java.util.ArrayList< + com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient>(); + mutable_bitField0_ |= 0x00000001; + } + allowedClients_.add( + input.readMessage( + com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.parser(), + extensionRegistry)); + break; + } + case 50: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + allowedClients_ = java.util.Collections.unmodifiableList(allowedClients_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.baremetalsolution.v2.NfsShareProto + .internal_static_google_cloud_baremetalsolution_v2_NfsShare_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 6: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.baremetalsolution.v2.NfsShareProto + .internal_static_google_cloud_baremetalsolution_v2_NfsShare_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.baremetalsolution.v2.NfsShare.class, + com.google.cloud.baremetalsolution.v2.NfsShare.Builder.class); + } + + /** + * + * + *
+   * The possible states for this NFS share.
+   * 
+ * + * Protobuf enum {@code google.cloud.baremetalsolution.v2.NfsShare.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The share is in an unknown state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The share has been provisioned.
+     * 
+ * + * PROVISIONED = 1; + */ + PROVISIONED(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The share is in an unknown state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The share has been provisioned.
+     * 
+ * + * PROVISIONED = 1; + */ + public static final int PROVISIONED_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return PROVISIONED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.baremetalsolution.v2.NfsShare.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.baremetalsolution.v2.NfsShare.State) + } + + /** + * + * + *
+   * The possible mount permissions.
+   * 
+ * + * Protobuf enum {@code google.cloud.baremetalsolution.v2.NfsShare.MountPermissions} + */ + public enum MountPermissions implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Permissions were not specified.
+     * 
+ * + * MOUNT_PERMISSIONS_UNSPECIFIED = 0; + */ + MOUNT_PERMISSIONS_UNSPECIFIED(0), + /** + * + * + *
+     * NFS share can be mount with read-only permissions.
+     * 
+ * + * READ = 1; + */ + READ(1), + /** + * + * + *
+     * NFS share can be mount with read-write permissions.
+     * 
+ * + * READ_WRITE = 2; + */ + READ_WRITE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Permissions were not specified.
+     * 
+ * + * MOUNT_PERMISSIONS_UNSPECIFIED = 0; + */ + public static final int MOUNT_PERMISSIONS_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * NFS share can be mount with read-only permissions.
+     * 
+ * + * READ = 1; + */ + public static final int READ_VALUE = 1; + /** + * + * + *
+     * NFS share can be mount with read-write permissions.
+     * 
+ * + * READ_WRITE = 2; + */ + public static final int READ_WRITE_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MountPermissions valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static MountPermissions forNumber(int value) { + switch (value) { + case 0: + return MOUNT_PERMISSIONS_UNSPECIFIED; + case 1: + return READ; + case 2: + return READ_WRITE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MountPermissions findValueByNumber(int number) { + return MountPermissions.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.baremetalsolution.v2.NfsShare.getDescriptor().getEnumTypes().get(1); + } + + private static final MountPermissions[] VALUES = values(); + + public static MountPermissions valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private MountPermissions(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.baremetalsolution.v2.NfsShare.MountPermissions) + } + + public interface AllowedClientOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.NfsShare.AllowedClient) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The network the access point sits on.
+     * 
+ * + * string network = 1 [(.google.api.resource_reference) = { ... } + * + * @return The network. + */ + java.lang.String getNetwork(); + /** + * + * + *
+     * The network the access point sits on.
+     * 
+ * + * string network = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); + + /** + * + * + *
+     * The IP address of the share on this network.
+     * 
+ * + * string share_ip = 2; + * + * @return The shareIp. + */ + java.lang.String getShareIp(); + /** + * + * + *
+     * The IP address of the share on this network.
+     * 
+ * + * string share_ip = 2; + * + * @return The bytes for shareIp. + */ + com.google.protobuf.ByteString getShareIpBytes(); + + /** + * + * + *
+     * The subnet of IP addresses permitted to access the share.
+     * 
+ * + * string allowed_clients_cidr = 3; + * + * @return The allowedClientsCidr. + */ + java.lang.String getAllowedClientsCidr(); + /** + * + * + *
+     * The subnet of IP addresses permitted to access the share.
+     * 
+ * + * string allowed_clients_cidr = 3; + * + * @return The bytes for allowedClientsCidr. + */ + com.google.protobuf.ByteString getAllowedClientsCidrBytes(); + + /** + * + * + *
+     * Mount permissions.
+     * 
+ * + * .google.cloud.baremetalsolution.v2.NfsShare.MountPermissions mount_permissions = 4; + * + * + * @return The enum numeric value on the wire for mountPermissions. + */ + int getMountPermissionsValue(); + /** + * + * + *
+     * Mount permissions.
+     * 
+ * + * .google.cloud.baremetalsolution.v2.NfsShare.MountPermissions mount_permissions = 4; + * + * + * @return The mountPermissions. + */ + com.google.cloud.baremetalsolution.v2.NfsShare.MountPermissions getMountPermissions(); + + /** + * + * + *
+     * Allow dev flag.  Which controls whether to allow creation of devices.
+     * 
+ * + * bool allow_dev = 5; + * + * @return The allowDev. + */ + boolean getAllowDev(); + + /** + * + * + *
+     * Allow the setuid flag.
+     * 
+ * + * bool allow_suid = 6; + * + * @return The allowSuid. + */ + boolean getAllowSuid(); + + /** + * + * + *
+     * Disable root squashing, which is a feature of NFS.
+     * Root squash is a special mapping of the remote superuser (root) identity
+     * when using identity authentication.
+     * 
+ * + * bool no_root_squash = 7; + * + * @return The noRootSquash. + */ + boolean getNoRootSquash(); + } + /** + * + * + *
+   * Represents an 'access point' for the share.
+   * 
+ * + * Protobuf type {@code google.cloud.baremetalsolution.v2.NfsShare.AllowedClient} + */ + public static final class AllowedClient extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.NfsShare.AllowedClient) + AllowedClientOrBuilder { + private static final long serialVersionUID = 0L; + // Use AllowedClient.newBuilder() to construct. + private AllowedClient(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AllowedClient() { + network_ = ""; + shareIp_ = ""; + allowedClientsCidr_ = ""; + mountPermissions_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AllowedClient(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AllowedClient( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + network_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + shareIp_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + allowedClientsCidr_ = s; + break; + } + case 32: + { + int rawValue = input.readEnum(); + + mountPermissions_ = rawValue; + break; + } + case 40: + { + allowDev_ = input.readBool(); + break; + } + case 48: + { + allowSuid_ = input.readBool(); + break; + } + case 56: + { + noRootSquash_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.baremetalsolution.v2.NfsShareProto + .internal_static_google_cloud_baremetalsolution_v2_NfsShare_AllowedClient_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.baremetalsolution.v2.NfsShareProto + .internal_static_google_cloud_baremetalsolution_v2_NfsShare_AllowedClient_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.class, + com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.Builder.class); + } + + public static final int NETWORK_FIELD_NUMBER = 1; + private volatile java.lang.Object network_; + /** + * + * + *
+     * The network the access point sits on.
+     * 
+ * + * string network = 1 [(.google.api.resource_reference) = { ... } + * + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } + } + /** + * + * + *
+     * The network the access point sits on.
+     * 
+ * + * string network = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SHARE_IP_FIELD_NUMBER = 2; + private volatile java.lang.Object shareIp_; + /** + * + * + *
+     * The IP address of the share on this network.
+     * 
+ * + * string share_ip = 2; + * + * @return The shareIp. + */ + @java.lang.Override + public java.lang.String getShareIp() { + java.lang.Object ref = shareIp_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shareIp_ = s; + return s; + } + } + /** + * + * + *
+     * The IP address of the share on this network.
+     * 
+ * + * string share_ip = 2; + * + * @return The bytes for shareIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getShareIpBytes() { + java.lang.Object ref = shareIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + shareIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALLOWED_CLIENTS_CIDR_FIELD_NUMBER = 3; + private volatile java.lang.Object allowedClientsCidr_; + /** + * + * + *
+     * The subnet of IP addresses permitted to access the share.
+     * 
+ * + * string allowed_clients_cidr = 3; + * + * @return The allowedClientsCidr. + */ + @java.lang.Override + public java.lang.String getAllowedClientsCidr() { + java.lang.Object ref = allowedClientsCidr_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + allowedClientsCidr_ = s; + return s; + } + } + /** + * + * + *
+     * The subnet of IP addresses permitted to access the share.
+     * 
+ * + * string allowed_clients_cidr = 3; + * + * @return The bytes for allowedClientsCidr. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAllowedClientsCidrBytes() { + java.lang.Object ref = allowedClientsCidr_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + allowedClientsCidr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MOUNT_PERMISSIONS_FIELD_NUMBER = 4; + private int mountPermissions_; + /** + * + * + *
+     * Mount permissions.
+     * 
+ * + * .google.cloud.baremetalsolution.v2.NfsShare.MountPermissions mount_permissions = 4; + * + * + * @return The enum numeric value on the wire for mountPermissions. + */ + @java.lang.Override + public int getMountPermissionsValue() { + return mountPermissions_; + } + /** + * + * + *
+     * Mount permissions.
+     * 
+ * + * .google.cloud.baremetalsolution.v2.NfsShare.MountPermissions mount_permissions = 4; + * + * + * @return The mountPermissions. + */ + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.NfsShare.MountPermissions getMountPermissions() { + @SuppressWarnings("deprecation") + com.google.cloud.baremetalsolution.v2.NfsShare.MountPermissions result = + com.google.cloud.baremetalsolution.v2.NfsShare.MountPermissions.valueOf( + mountPermissions_); + return result == null + ? com.google.cloud.baremetalsolution.v2.NfsShare.MountPermissions.UNRECOGNIZED + : result; + } + + public static final int ALLOW_DEV_FIELD_NUMBER = 5; + private boolean allowDev_; + /** + * + * + *
+     * Allow dev flag.  Which controls whether to allow creation of devices.
+     * 
+ * + * bool allow_dev = 5; + * + * @return The allowDev. + */ + @java.lang.Override + public boolean getAllowDev() { + return allowDev_; + } + + public static final int ALLOW_SUID_FIELD_NUMBER = 6; + private boolean allowSuid_; + /** + * + * + *
+     * Allow the setuid flag.
+     * 
+ * + * bool allow_suid = 6; + * + * @return The allowSuid. + */ + @java.lang.Override + public boolean getAllowSuid() { + return allowSuid_; + } + + public static final int NO_ROOT_SQUASH_FIELD_NUMBER = 7; + private boolean noRootSquash_; + /** + * + * + *
+     * Disable root squashing, which is a feature of NFS.
+     * Root squash is a special mapping of the remote superuser (root) identity
+     * when using identity authentication.
+     * 
+ * + * bool no_root_squash = 7; + * + * @return The noRootSquash. + */ + @java.lang.Override + public boolean getNoRootSquash() { + return noRootSquash_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, network_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shareIp_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, shareIp_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(allowedClientsCidr_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, allowedClientsCidr_); + } + if (mountPermissions_ + != com.google.cloud.baremetalsolution.v2.NfsShare.MountPermissions + .MOUNT_PERMISSIONS_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, mountPermissions_); + } + if (allowDev_ != false) { + output.writeBool(5, allowDev_); + } + if (allowSuid_ != false) { + output.writeBool(6, allowSuid_); + } + if (noRootSquash_ != false) { + output.writeBool(7, noRootSquash_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, network_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shareIp_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, shareIp_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(allowedClientsCidr_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, allowedClientsCidr_); + } + if (mountPermissions_ + != com.google.cloud.baremetalsolution.v2.NfsShare.MountPermissions + .MOUNT_PERMISSIONS_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, mountPermissions_); + } + if (allowDev_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, allowDev_); + } + if (allowSuid_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, allowSuid_); + } + if (noRootSquash_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, noRootSquash_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient)) { + return super.equals(obj); + } + com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient other = + (com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient) obj; + + if (!getNetwork().equals(other.getNetwork())) return false; + if (!getShareIp().equals(other.getShareIp())) return false; + if (!getAllowedClientsCidr().equals(other.getAllowedClientsCidr())) return false; + if (mountPermissions_ != other.mountPermissions_) return false; + if (getAllowDev() != other.getAllowDev()) return false; + if (getAllowSuid() != other.getAllowSuid()) return false; + if (getNoRootSquash() != other.getNoRootSquash()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + hash = (37 * hash) + SHARE_IP_FIELD_NUMBER; + hash = (53 * hash) + getShareIp().hashCode(); + hash = (37 * hash) + ALLOWED_CLIENTS_CIDR_FIELD_NUMBER; + hash = (53 * hash) + getAllowedClientsCidr().hashCode(); + hash = (37 * hash) + MOUNT_PERMISSIONS_FIELD_NUMBER; + hash = (53 * hash) + mountPermissions_; + hash = (37 * hash) + ALLOW_DEV_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowDev()); + hash = (37 * hash) + ALLOW_SUID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowSuid()); + hash = (37 * hash) + NO_ROOT_SQUASH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getNoRootSquash()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Represents an 'access point' for the share.
+     * 
+ * + * Protobuf type {@code google.cloud.baremetalsolution.v2.NfsShare.AllowedClient} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.NfsShare.AllowedClient) + com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClientOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.baremetalsolution.v2.NfsShareProto + .internal_static_google_cloud_baremetalsolution_v2_NfsShare_AllowedClient_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.baremetalsolution.v2.NfsShareProto + .internal_static_google_cloud_baremetalsolution_v2_NfsShare_AllowedClient_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.class, + com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.Builder.class); + } + + // Construct using com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + network_ = ""; + + shareIp_ = ""; + + allowedClientsCidr_ = ""; + + mountPermissions_ = 0; + + allowDev_ = false; + + allowSuid_ = false; + + noRootSquash_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.baremetalsolution.v2.NfsShareProto + .internal_static_google_cloud_baremetalsolution_v2_NfsShare_AllowedClient_descriptor; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient + getDefaultInstanceForType() { + return com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient build() { + com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient buildPartial() { + com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient result = + new com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient(this); + result.network_ = network_; + result.shareIp_ = shareIp_; + result.allowedClientsCidr_ = allowedClientsCidr_; + result.mountPermissions_ = mountPermissions_; + result.allowDev_ = allowDev_; + result.allowSuid_ = allowSuid_; + result.noRootSquash_ = noRootSquash_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient) { + return mergeFrom((com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient other) { + if (other + == com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.getDefaultInstance()) + return this; + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; + onChanged(); + } + if (!other.getShareIp().isEmpty()) { + shareIp_ = other.shareIp_; + onChanged(); + } + if (!other.getAllowedClientsCidr().isEmpty()) { + allowedClientsCidr_ = other.allowedClientsCidr_; + onChanged(); + } + if (other.mountPermissions_ != 0) { + setMountPermissionsValue(other.getMountPermissionsValue()); + } + if (other.getAllowDev() != false) { + setAllowDev(other.getAllowDev()); + } + if (other.getAllowSuid() != false) { + setAllowSuid(other.getAllowSuid()); + } + if (other.getNoRootSquash() != false) { + setNoRootSquash(other.getNoRootSquash()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object network_ = ""; + /** + * + * + *
+       * The network the access point sits on.
+       * 
+ * + * string network = 1 [(.google.api.resource_reference) = { ... } + * + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The network the access point sits on.
+       * 
+ * + * string network = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for network. + */ + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The network the access point sits on.
+       * 
+ * + * string network = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + network_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The network the access point sits on.
+       * 
+ * + * string network = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearNetwork() { + + network_ = getDefaultInstance().getNetwork(); + onChanged(); + return this; + } + /** + * + * + *
+       * The network the access point sits on.
+       * 
+ * + * string network = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + network_ = value; + onChanged(); + return this; + } + + private java.lang.Object shareIp_ = ""; + /** + * + * + *
+       * The IP address of the share on this network.
+       * 
+ * + * string share_ip = 2; + * + * @return The shareIp. + */ + public java.lang.String getShareIp() { + java.lang.Object ref = shareIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shareIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The IP address of the share on this network.
+       * 
+ * + * string share_ip = 2; + * + * @return The bytes for shareIp. + */ + public com.google.protobuf.ByteString getShareIpBytes() { + java.lang.Object ref = shareIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + shareIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The IP address of the share on this network.
+       * 
+ * + * string share_ip = 2; + * + * @param value The shareIp to set. + * @return This builder for chaining. + */ + public Builder setShareIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + shareIp_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The IP address of the share on this network.
+       * 
+ * + * string share_ip = 2; + * + * @return This builder for chaining. + */ + public Builder clearShareIp() { + + shareIp_ = getDefaultInstance().getShareIp(); + onChanged(); + return this; + } + /** + * + * + *
+       * The IP address of the share on this network.
+       * 
+ * + * string share_ip = 2; + * + * @param value The bytes for shareIp to set. + * @return This builder for chaining. + */ + public Builder setShareIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + shareIp_ = value; + onChanged(); + return this; + } + + private java.lang.Object allowedClientsCidr_ = ""; + /** + * + * + *
+       * The subnet of IP addresses permitted to access the share.
+       * 
+ * + * string allowed_clients_cidr = 3; + * + * @return The allowedClientsCidr. + */ + public java.lang.String getAllowedClientsCidr() { + java.lang.Object ref = allowedClientsCidr_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + allowedClientsCidr_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The subnet of IP addresses permitted to access the share.
+       * 
+ * + * string allowed_clients_cidr = 3; + * + * @return The bytes for allowedClientsCidr. + */ + public com.google.protobuf.ByteString getAllowedClientsCidrBytes() { + java.lang.Object ref = allowedClientsCidr_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + allowedClientsCidr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The subnet of IP addresses permitted to access the share.
+       * 
+ * + * string allowed_clients_cidr = 3; + * + * @param value The allowedClientsCidr to set. + * @return This builder for chaining. + */ + public Builder setAllowedClientsCidr(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + allowedClientsCidr_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The subnet of IP addresses permitted to access the share.
+       * 
+ * + * string allowed_clients_cidr = 3; + * + * @return This builder for chaining. + */ + public Builder clearAllowedClientsCidr() { + + allowedClientsCidr_ = getDefaultInstance().getAllowedClientsCidr(); + onChanged(); + return this; + } + /** + * + * + *
+       * The subnet of IP addresses permitted to access the share.
+       * 
+ * + * string allowed_clients_cidr = 3; + * + * @param value The bytes for allowedClientsCidr to set. + * @return This builder for chaining. + */ + public Builder setAllowedClientsCidrBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + allowedClientsCidr_ = value; + onChanged(); + return this; + } + + private int mountPermissions_ = 0; + /** + * + * + *
+       * Mount permissions.
+       * 
+ * + * .google.cloud.baremetalsolution.v2.NfsShare.MountPermissions mount_permissions = 4; + * + * + * @return The enum numeric value on the wire for mountPermissions. + */ + @java.lang.Override + public int getMountPermissionsValue() { + return mountPermissions_; + } + /** + * + * + *
+       * Mount permissions.
+       * 
+ * + * .google.cloud.baremetalsolution.v2.NfsShare.MountPermissions mount_permissions = 4; + * + * + * @param value The enum numeric value on the wire for mountPermissions to set. + * @return This builder for chaining. + */ + public Builder setMountPermissionsValue(int value) { + + mountPermissions_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Mount permissions.
+       * 
+ * + * .google.cloud.baremetalsolution.v2.NfsShare.MountPermissions mount_permissions = 4; + * + * + * @return The mountPermissions. + */ + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.NfsShare.MountPermissions getMountPermissions() { + @SuppressWarnings("deprecation") + com.google.cloud.baremetalsolution.v2.NfsShare.MountPermissions result = + com.google.cloud.baremetalsolution.v2.NfsShare.MountPermissions.valueOf( + mountPermissions_); + return result == null + ? com.google.cloud.baremetalsolution.v2.NfsShare.MountPermissions.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Mount permissions.
+       * 
+ * + * .google.cloud.baremetalsolution.v2.NfsShare.MountPermissions mount_permissions = 4; + * + * + * @param value The mountPermissions to set. + * @return This builder for chaining. + */ + public Builder setMountPermissions( + com.google.cloud.baremetalsolution.v2.NfsShare.MountPermissions value) { + if (value == null) { + throw new NullPointerException(); + } + + mountPermissions_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Mount permissions.
+       * 
+ * + * .google.cloud.baremetalsolution.v2.NfsShare.MountPermissions mount_permissions = 4; + * + * + * @return This builder for chaining. + */ + public Builder clearMountPermissions() { + + mountPermissions_ = 0; + onChanged(); + return this; + } + + private boolean allowDev_; + /** + * + * + *
+       * Allow dev flag.  Which controls whether to allow creation of devices.
+       * 
+ * + * bool allow_dev = 5; + * + * @return The allowDev. + */ + @java.lang.Override + public boolean getAllowDev() { + return allowDev_; + } + /** + * + * + *
+       * Allow dev flag.  Which controls whether to allow creation of devices.
+       * 
+ * + * bool allow_dev = 5; + * + * @param value The allowDev to set. + * @return This builder for chaining. + */ + public Builder setAllowDev(boolean value) { + + allowDev_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Allow dev flag.  Which controls whether to allow creation of devices.
+       * 
+ * + * bool allow_dev = 5; + * + * @return This builder for chaining. + */ + public Builder clearAllowDev() { + + allowDev_ = false; + onChanged(); + return this; + } + + private boolean allowSuid_; + /** + * + * + *
+       * Allow the setuid flag.
+       * 
+ * + * bool allow_suid = 6; + * + * @return The allowSuid. + */ + @java.lang.Override + public boolean getAllowSuid() { + return allowSuid_; + } + /** + * + * + *
+       * Allow the setuid flag.
+       * 
+ * + * bool allow_suid = 6; + * + * @param value The allowSuid to set. + * @return This builder for chaining. + */ + public Builder setAllowSuid(boolean value) { + + allowSuid_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Allow the setuid flag.
+       * 
+ * + * bool allow_suid = 6; + * + * @return This builder for chaining. + */ + public Builder clearAllowSuid() { + + allowSuid_ = false; + onChanged(); + return this; + } + + private boolean noRootSquash_; + /** + * + * + *
+       * Disable root squashing, which is a feature of NFS.
+       * Root squash is a special mapping of the remote superuser (root) identity
+       * when using identity authentication.
+       * 
+ * + * bool no_root_squash = 7; + * + * @return The noRootSquash. + */ + @java.lang.Override + public boolean getNoRootSquash() { + return noRootSquash_; + } + /** + * + * + *
+       * Disable root squashing, which is a feature of NFS.
+       * Root squash is a special mapping of the remote superuser (root) identity
+       * when using identity authentication.
+       * 
+ * + * bool no_root_squash = 7; + * + * @param value The noRootSquash to set. + * @return This builder for chaining. + */ + public Builder setNoRootSquash(boolean value) { + + noRootSquash_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Disable root squashing, which is a feature of NFS.
+       * Root squash is a special mapping of the remote superuser (root) identity
+       * when using identity authentication.
+       * 
+ * + * bool no_root_squash = 7; + * + * @return This builder for chaining. + */ + public Builder clearNoRootSquash() { + + noRootSquash_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.NfsShare.AllowedClient) + } + + // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.NfsShare.AllowedClient) + private static final com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient(); + } + + public static com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AllowedClient parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AllowedClient(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. The name of the NFS share.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The name of the NFS share.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NFS_SHARE_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object nfsShareId_; + /** + * + * + *
+   * Output only. An identifier for the NFS share, generated by the backend.
+   * 
+ * + * string nfs_share_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The nfsShareId. + */ + @java.lang.Override + public java.lang.String getNfsShareId() { + java.lang.Object ref = nfsShareId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nfsShareId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. An identifier for the NFS share, generated by the backend.
+   * 
+ * + * string nfs_share_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for nfsShareId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNfsShareIdBytes() { + java.lang.Object ref = nfsShareId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nfsShareId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 3; + private int state_; + /** + * + * + *
+   * The state of the NFS share.
+   * 
+ * + * .google.cloud.baremetalsolution.v2.NfsShare.State state = 3; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * The state of the NFS share.
+   * 
+ * + * .google.cloud.baremetalsolution.v2.NfsShare.State state = 3; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.NfsShare.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.baremetalsolution.v2.NfsShare.State result = + com.google.cloud.baremetalsolution.v2.NfsShare.State.valueOf(state_); + return result == null + ? com.google.cloud.baremetalsolution.v2.NfsShare.State.UNRECOGNIZED + : result; + } + + public static final int VOLUME_FIELD_NUMBER = 4; + private volatile java.lang.Object volume_; + /** + * + * + *
+   * The volume containing the share.
+   * 
+ * + * string volume = 4 [(.google.api.resource_reference) = { ... } + * + * @return The volume. + */ + @java.lang.Override + public java.lang.String getVolume() { + java.lang.Object ref = volume_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + volume_ = s; + return s; + } + } + /** + * + * + *
+   * The volume containing the share.
+   * 
+ * + * string volume = 4 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for volume. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVolumeBytes() { + java.lang.Object ref = volume_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + volume_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALLOWED_CLIENTS_FIELD_NUMBER = 5; + private java.util.List + allowedClients_; + /** + * + * + *
+   * List of allowed access points.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; + * + */ + @java.lang.Override + public java.util.List + getAllowedClientsList() { + return allowedClients_; + } + /** + * + * + *
+   * List of allowed access points.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClientOrBuilder> + getAllowedClientsOrBuilderList() { + return allowedClients_; + } + /** + * + * + *
+   * List of allowed access points.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; + * + */ + @java.lang.Override + public int getAllowedClientsCount() { + return allowedClients_.size(); + } + /** + * + * + *
+   * List of allowed access points.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; + * + */ + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient getAllowedClients(int index) { + return allowedClients_.get(index); + } + /** + * + * + *
+   * List of allowed access points.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; + * + */ + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClientOrBuilder + getAllowedClientsOrBuilder(int index) { + return allowedClients_.get(index); + } + + public static final int LABELS_FIELD_NUMBER = 6; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.baremetalsolution.v2.NfsShareProto + .internal_static_google_cloud_baremetalsolution_v2_NfsShare_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 6; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 6; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 6; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 6; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nfsShareId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nfsShareId_); + } + if (state_ + != com.google.cloud.baremetalsolution.v2.NfsShare.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(volume_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, volume_); + } + for (int i = 0; i < allowedClients_.size(); i++) { + output.writeMessage(5, allowedClients_.get(i)); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 6); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nfsShareId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nfsShareId_); + } + if (state_ + != com.google.cloud.baremetalsolution.v2.NfsShare.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(volume_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, volume_); + } + for (int i = 0; i < allowedClients_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, allowedClients_.get(i)); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, labels__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.baremetalsolution.v2.NfsShare)) { + return super.equals(obj); + } + com.google.cloud.baremetalsolution.v2.NfsShare other = + (com.google.cloud.baremetalsolution.v2.NfsShare) obj; + + if (!getName().equals(other.getName())) return false; + if (!getNfsShareId().equals(other.getNfsShareId())) return false; + if (state_ != other.state_) return false; + if (!getVolume().equals(other.getVolume())) return false; + if (!getAllowedClientsList().equals(other.getAllowedClientsList())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + NFS_SHARE_ID_FIELD_NUMBER; + hash = (53 * hash) + getNfsShareId().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + VOLUME_FIELD_NUMBER; + hash = (53 * hash) + getVolume().hashCode(); + if (getAllowedClientsCount() > 0) { + hash = (37 * hash) + ALLOWED_CLIENTS_FIELD_NUMBER; + hash = (53 * hash) + getAllowedClientsList().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.baremetalsolution.v2.NfsShare parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.NfsShare parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.NfsShare parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.NfsShare parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.NfsShare parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.NfsShare parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.NfsShare parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.NfsShare parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.NfsShare parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.NfsShare parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.NfsShare parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.NfsShare parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.baremetalsolution.v2.NfsShare prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An NFS share.
+   * 
+ * + * Protobuf type {@code google.cloud.baremetalsolution.v2.NfsShare} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.NfsShare) + com.google.cloud.baremetalsolution.v2.NfsShareOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.baremetalsolution.v2.NfsShareProto + .internal_static_google_cloud_baremetalsolution_v2_NfsShare_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 6: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 6: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.baremetalsolution.v2.NfsShareProto + .internal_static_google_cloud_baremetalsolution_v2_NfsShare_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.baremetalsolution.v2.NfsShare.class, + com.google.cloud.baremetalsolution.v2.NfsShare.Builder.class); + } + + // Construct using com.google.cloud.baremetalsolution.v2.NfsShare.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAllowedClientsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + nfsShareId_ = ""; + + state_ = 0; + + volume_ = ""; + + if (allowedClientsBuilder_ == null) { + allowedClients_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + allowedClientsBuilder_.clear(); + } + internalGetMutableLabels().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.baremetalsolution.v2.NfsShareProto + .internal_static_google_cloud_baremetalsolution_v2_NfsShare_descriptor; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.NfsShare getDefaultInstanceForType() { + return com.google.cloud.baremetalsolution.v2.NfsShare.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.NfsShare build() { + com.google.cloud.baremetalsolution.v2.NfsShare result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.NfsShare buildPartial() { + com.google.cloud.baremetalsolution.v2.NfsShare result = + new com.google.cloud.baremetalsolution.v2.NfsShare(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.nfsShareId_ = nfsShareId_; + result.state_ = state_; + result.volume_ = volume_; + if (allowedClientsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + allowedClients_ = java.util.Collections.unmodifiableList(allowedClients_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.allowedClients_ = allowedClients_; + } else { + result.allowedClients_ = allowedClientsBuilder_.build(); + } + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.baremetalsolution.v2.NfsShare) { + return mergeFrom((com.google.cloud.baremetalsolution.v2.NfsShare) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.NfsShare other) { + if (other == com.google.cloud.baremetalsolution.v2.NfsShare.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getNfsShareId().isEmpty()) { + nfsShareId_ = other.nfsShareId_; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getVolume().isEmpty()) { + volume_ = other.volume_; + onChanged(); + } + if (allowedClientsBuilder_ == null) { + if (!other.allowedClients_.isEmpty()) { + if (allowedClients_.isEmpty()) { + allowedClients_ = other.allowedClients_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAllowedClientsIsMutable(); + allowedClients_.addAll(other.allowedClients_); + } + onChanged(); + } + } else { + if (!other.allowedClients_.isEmpty()) { + if (allowedClientsBuilder_.isEmpty()) { + allowedClientsBuilder_.dispose(); + allowedClientsBuilder_ = null; + allowedClients_ = other.allowedClients_; + bitField0_ = (bitField0_ & ~0x00000001); + allowedClientsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAllowedClientsFieldBuilder() + : null; + } else { + allowedClientsBuilder_.addAllMessages(other.allowedClients_); + } + } + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.baremetalsolution.v2.NfsShare parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.baremetalsolution.v2.NfsShare) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The name of the NFS share.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The name of the NFS share.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The name of the NFS share.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the NFS share.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the NFS share.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object nfsShareId_ = ""; + /** + * + * + *
+     * Output only. An identifier for the NFS share, generated by the backend.
+     * 
+ * + * string nfs_share_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The nfsShareId. + */ + public java.lang.String getNfsShareId() { + java.lang.Object ref = nfsShareId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nfsShareId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. An identifier for the NFS share, generated by the backend.
+     * 
+ * + * string nfs_share_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for nfsShareId. + */ + public com.google.protobuf.ByteString getNfsShareIdBytes() { + java.lang.Object ref = nfsShareId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nfsShareId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. An identifier for the NFS share, generated by the backend.
+     * 
+ * + * string nfs_share_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The nfsShareId to set. + * @return This builder for chaining. + */ + public Builder setNfsShareId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nfsShareId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. An identifier for the NFS share, generated by the backend.
+     * 
+ * + * string nfs_share_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearNfsShareId() { + + nfsShareId_ = getDefaultInstance().getNfsShareId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. An identifier for the NFS share, generated by the backend.
+     * 
+ * + * string nfs_share_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for nfsShareId to set. + * @return This builder for chaining. + */ + public Builder setNfsShareIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nfsShareId_ = value; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * The state of the NFS share.
+     * 
+ * + * .google.cloud.baremetalsolution.v2.NfsShare.State state = 3; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * The state of the NFS share.
+     * 
+ * + * .google.cloud.baremetalsolution.v2.NfsShare.State state = 3; + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The state of the NFS share.
+     * 
+ * + * .google.cloud.baremetalsolution.v2.NfsShare.State state = 3; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.NfsShare.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.baremetalsolution.v2.NfsShare.State result = + com.google.cloud.baremetalsolution.v2.NfsShare.State.valueOf(state_); + return result == null + ? com.google.cloud.baremetalsolution.v2.NfsShare.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The state of the NFS share.
+     * 
+ * + * .google.cloud.baremetalsolution.v2.NfsShare.State state = 3; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.baremetalsolution.v2.NfsShare.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The state of the NFS share.
+     * 
+ * + * .google.cloud.baremetalsolution.v2.NfsShare.State state = 3; + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object volume_ = ""; + /** + * + * + *
+     * The volume containing the share.
+     * 
+ * + * string volume = 4 [(.google.api.resource_reference) = { ... } + * + * @return The volume. + */ + public java.lang.String getVolume() { + java.lang.Object ref = volume_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + volume_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The volume containing the share.
+     * 
+ * + * string volume = 4 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for volume. + */ + public com.google.protobuf.ByteString getVolumeBytes() { + java.lang.Object ref = volume_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + volume_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The volume containing the share.
+     * 
+ * + * string volume = 4 [(.google.api.resource_reference) = { ... } + * + * @param value The volume to set. + * @return This builder for chaining. + */ + public Builder setVolume(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + volume_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The volume containing the share.
+     * 
+ * + * string volume = 4 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearVolume() { + + volume_ = getDefaultInstance().getVolume(); + onChanged(); + return this; + } + /** + * + * + *
+     * The volume containing the share.
+     * 
+ * + * string volume = 4 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for volume to set. + * @return This builder for chaining. + */ + public Builder setVolumeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + volume_ = value; + onChanged(); + return this; + } + + private java.util.List + allowedClients_ = java.util.Collections.emptyList(); + + private void ensureAllowedClientsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + allowedClients_ = + new java.util.ArrayList( + allowedClients_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient, + com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.Builder, + com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClientOrBuilder> + allowedClientsBuilder_; + + /** + * + * + *
+     * List of allowed access points.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; + * + */ + public java.util.List + getAllowedClientsList() { + if (allowedClientsBuilder_ == null) { + return java.util.Collections.unmodifiableList(allowedClients_); + } else { + return allowedClientsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of allowed access points.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; + * + */ + public int getAllowedClientsCount() { + if (allowedClientsBuilder_ == null) { + return allowedClients_.size(); + } else { + return allowedClientsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of allowed access points.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; + * + */ + public com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient getAllowedClients( + int index) { + if (allowedClientsBuilder_ == null) { + return allowedClients_.get(index); + } else { + return allowedClientsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of allowed access points.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; + * + */ + public Builder setAllowedClients( + int index, com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient value) { + if (allowedClientsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedClientsIsMutable(); + allowedClients_.set(index, value); + onChanged(); + } else { + allowedClientsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of allowed access points.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; + * + */ + public Builder setAllowedClients( + int index, + com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.Builder builderForValue) { + if (allowedClientsBuilder_ == null) { + ensureAllowedClientsIsMutable(); + allowedClients_.set(index, builderForValue.build()); + onChanged(); + } else { + allowedClientsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of allowed access points.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; + * + */ + public Builder addAllowedClients( + com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient value) { + if (allowedClientsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedClientsIsMutable(); + allowedClients_.add(value); + onChanged(); + } else { + allowedClientsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of allowed access points.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; + * + */ + public Builder addAllowedClients( + int index, com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient value) { + if (allowedClientsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedClientsIsMutable(); + allowedClients_.add(index, value); + onChanged(); + } else { + allowedClientsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of allowed access points.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; + * + */ + public Builder addAllowedClients( + com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.Builder builderForValue) { + if (allowedClientsBuilder_ == null) { + ensureAllowedClientsIsMutable(); + allowedClients_.add(builderForValue.build()); + onChanged(); + } else { + allowedClientsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of allowed access points.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; + * + */ + public Builder addAllowedClients( + int index, + com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.Builder builderForValue) { + if (allowedClientsBuilder_ == null) { + ensureAllowedClientsIsMutable(); + allowedClients_.add(index, builderForValue.build()); + onChanged(); + } else { + allowedClientsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of allowed access points.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; + * + */ + public Builder addAllAllowedClients( + java.lang.Iterable + values) { + if (allowedClientsBuilder_ == null) { + ensureAllowedClientsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedClients_); + onChanged(); + } else { + allowedClientsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of allowed access points.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; + * + */ + public Builder clearAllowedClients() { + if (allowedClientsBuilder_ == null) { + allowedClients_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + allowedClientsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of allowed access points.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; + * + */ + public Builder removeAllowedClients(int index) { + if (allowedClientsBuilder_ == null) { + ensureAllowedClientsIsMutable(); + allowedClients_.remove(index); + onChanged(); + } else { + allowedClientsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of allowed access points.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; + * + */ + public com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.Builder + getAllowedClientsBuilder(int index) { + return getAllowedClientsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of allowed access points.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; + * + */ + public com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClientOrBuilder + getAllowedClientsOrBuilder(int index) { + if (allowedClientsBuilder_ == null) { + return allowedClients_.get(index); + } else { + return allowedClientsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of allowed access points.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; + * + */ + public java.util.List< + ? extends com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClientOrBuilder> + getAllowedClientsOrBuilderList() { + if (allowedClientsBuilder_ != null) { + return allowedClientsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(allowedClients_); + } + } + /** + * + * + *
+     * List of allowed access points.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; + * + */ + public com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.Builder + addAllowedClientsBuilder() { + return getAllowedClientsFieldBuilder() + .addBuilder( + com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.getDefaultInstance()); + } + /** + * + * + *
+     * List of allowed access points.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; + * + */ + public com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.Builder + addAllowedClientsBuilder(int index) { + return getAllowedClientsFieldBuilder() + .addBuilder( + index, + com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.getDefaultInstance()); + } + /** + * + * + *
+     * List of allowed access points.
+     * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; + * + */ + public java.util.List + getAllowedClientsBuilderList() { + return getAllowedClientsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient, + com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.Builder, + com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClientOrBuilder> + getAllowedClientsFieldBuilder() { + if (allowedClientsBuilder_ == null) { + allowedClientsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient, + com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.Builder, + com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClientOrBuilder>( + allowedClients_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + allowedClients_ = null; + } + return allowedClientsBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 6; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 6; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 6; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 6; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 6; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 6; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 6; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.NfsShare) + } + + // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.NfsShare) + private static final com.google.cloud.baremetalsolution.v2.NfsShare DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.NfsShare(); + } + + public static com.google.cloud.baremetalsolution.v2.NfsShare getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NfsShare parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NfsShare(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.NfsShare getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/NfsShareOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/NfsShareOrBuilder.java new file mode 100644 index 000000000000..89eba998b3f9 --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/NfsShareOrBuilder.java @@ -0,0 +1,243 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/baremetalsolution/v2/nfs_share.proto + +package com.google.cloud.baremetalsolution.v2; + +public interface NfsShareOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.NfsShare) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The name of the NFS share.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The name of the NFS share.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. An identifier for the NFS share, generated by the backend.
+   * 
+ * + * string nfs_share_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The nfsShareId. + */ + java.lang.String getNfsShareId(); + /** + * + * + *
+   * Output only. An identifier for the NFS share, generated by the backend.
+   * 
+ * + * string nfs_share_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for nfsShareId. + */ + com.google.protobuf.ByteString getNfsShareIdBytes(); + + /** + * + * + *
+   * The state of the NFS share.
+   * 
+ * + * .google.cloud.baremetalsolution.v2.NfsShare.State state = 3; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * The state of the NFS share.
+   * 
+ * + * .google.cloud.baremetalsolution.v2.NfsShare.State state = 3; + * + * @return The state. + */ + com.google.cloud.baremetalsolution.v2.NfsShare.State getState(); + + /** + * + * + *
+   * The volume containing the share.
+   * 
+ * + * string volume = 4 [(.google.api.resource_reference) = { ... } + * + * @return The volume. + */ + java.lang.String getVolume(); + /** + * + * + *
+   * The volume containing the share.
+   * 
+ * + * string volume = 4 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for volume. + */ + com.google.protobuf.ByteString getVolumeBytes(); + + /** + * + * + *
+   * List of allowed access points.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; + * + */ + java.util.List + getAllowedClientsList(); + /** + * + * + *
+   * List of allowed access points.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; + * + */ + com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient getAllowedClients(int index); + /** + * + * + *
+   * List of allowed access points.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; + * + */ + int getAllowedClientsCount(); + /** + * + * + *
+   * List of allowed access points.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; + * + */ + java.util.List + getAllowedClientsOrBuilderList(); + /** + * + * + *
+   * List of allowed access points.
+   * 
+ * + * repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5; + * + */ + com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClientOrBuilder getAllowedClientsOrBuilder( + int index); + + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 6; + */ + int getLabelsCount(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 6; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 6; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 6; + */ + + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 6; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); +} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/NfsShareProto.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/NfsShareProto.java new file mode 100644 index 000000000000..b476bccfc6d1 --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/NfsShareProto.java @@ -0,0 +1,202 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/baremetalsolution/v2/nfs_share.proto + +package com.google.cloud.baremetalsolution.v2; + +public final class NfsShareProto { + private NfsShareProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_NfsShare_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_NfsShare_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_NfsShare_AllowedClient_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_NfsShare_AllowedClient_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_NfsShare_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_NfsShare_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_GetNfsShareRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_GetNfsShareRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_ListNfsSharesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_ListNfsSharesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_ListNfsSharesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_ListNfsSharesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_UpdateNfsShareRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_UpdateNfsShareRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n1google/cloud/baremetalsolution/v2/nfs_" + + "share.proto\022!google.cloud.baremetalsolut" + + "ion.v2\032\037google/api/field_behavior.proto\032" + + "\031google/api/resource.proto\032 google/proto" + + "buf/field_mask.proto\"\217\007\n\010NfsShare\022\021\n\004nam" + + "e\030\001 \001(\tB\003\340A\003\022\031\n\014nfs_share_id\030\002 \001(\tB\003\340A\003\022" + + "@\n\005state\030\003 \001(\01621.google.cloud.baremetals" + + "olution.v2.NfsShare.State\022<\n\006volume\030\004 \001(" + + "\tB,\372A)\n\'baremetalsolution.googleapis.com" + + "/Volume\022R\n\017allowed_clients\030\005 \003(\01329.googl" + + "e.cloud.baremetalsolution.v2.NfsShare.Al" + + "lowedClient\022G\n\006labels\030\006 \003(\01327.google.clo" + + "ud.baremetalsolution.v2.NfsShare.LabelsE" + + "ntry\032\227\002\n\rAllowedClient\022>\n\007network\030\001 \001(\tB" + + "-\372A*\n(baremetalsolution.googleapis.com/N" + + "etwork\022\020\n\010share_ip\030\002 \001(\t\022\034\n\024allowed_clie" + + "nts_cidr\030\003 \001(\t\022W\n\021mount_permissions\030\004 \001(" + + "\0162<.google.cloud.baremetalsolution.v2.Nf" + + "sShare.MountPermissions\022\021\n\tallow_dev\030\005 \001" + + "(\010\022\022\n\nallow_suid\030\006 \001(\010\022\026\n\016no_root_squash" + + "\030\007 \001(\010\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va" + + "lue\030\002 \001(\t:\0028\001\"/\n\005State\022\025\n\021STATE_UNSPECIF" + + "IED\020\000\022\017\n\013PROVISIONED\020\001\"O\n\020MountPermissio" + + "ns\022!\n\035MOUNT_PERMISSIONS_UNSPECIFIED\020\000\022\010\n" + + "\004READ\020\001\022\016\n\nREAD_WRITE\020\002:m\352Aj\n)baremetals" + + "olution.googleapis.com/NFSShare\022=project" + + "s/{project}/locations/{location}/nfsShar" + + "es/{nfs_share}\"U\n\022GetNfsShareRequest\022?\n\004" + + "name\030\001 \001(\tB1\340A\002\372A+\n)baremetalsolution.go" + + "ogleapis.com/NFSShare\"\210\001\n\024ListNfsSharesR" + + "equest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!location" + + "s.googleapis.com/Location\022\021\n\tpage_size\030\002" + + " \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t" + + "\"\206\001\n\025ListNfsSharesResponse\022?\n\nnfs_shares" + + "\030\001 \003(\0132+.google.cloud.baremetalsolution." + + "v2.NfsShare\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013" + + "unreachable\030\003 \003(\t\"\215\001\n\025UpdateNfsShareRequ" + + "est\022C\n\tnfs_share\030\001 \001(\0132+.google.cloud.ba" + + "remetalsolution.v2.NfsShareB\003\340A\002\022/\n\013upda" + + "te_mask\030\002 \001(\0132\032.google.protobuf.FieldMas" + + "kB\373\001\n%com.google.cloud.baremetalsolution" + + ".v2B\rNfsShareProtoP\001ZRgoogle.golang.org/" + + "genproto/googleapis/cloud/baremetalsolut" + + "ion/v2;baremetalsolution\252\002!Google.Cloud." + + "BareMetalSolution.V2\312\002!Google\\Cloud\\Bare" + + "MetalSolution\\V2\352\002$Google::Cloud::BareMe" + + "talSolution::V2b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_cloud_baremetalsolution_v2_NfsShare_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_baremetalsolution_v2_NfsShare_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_NfsShare_descriptor, + new java.lang.String[] { + "Name", "NfsShareId", "State", "Volume", "AllowedClients", "Labels", + }); + internal_static_google_cloud_baremetalsolution_v2_NfsShare_AllowedClient_descriptor = + internal_static_google_cloud_baremetalsolution_v2_NfsShare_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_baremetalsolution_v2_NfsShare_AllowedClient_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_NfsShare_AllowedClient_descriptor, + new java.lang.String[] { + "Network", + "ShareIp", + "AllowedClientsCidr", + "MountPermissions", + "AllowDev", + "AllowSuid", + "NoRootSquash", + }); + internal_static_google_cloud_baremetalsolution_v2_NfsShare_LabelsEntry_descriptor = + internal_static_google_cloud_baremetalsolution_v2_NfsShare_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_baremetalsolution_v2_NfsShare_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_NfsShare_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_baremetalsolution_v2_GetNfsShareRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_baremetalsolution_v2_GetNfsShareRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_GetNfsShareRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_baremetalsolution_v2_ListNfsSharesRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_baremetalsolution_v2_ListNfsSharesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_ListNfsSharesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", + }); + internal_static_google_cloud_baremetalsolution_v2_ListNfsSharesResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_baremetalsolution_v2_ListNfsSharesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_ListNfsSharesResponse_descriptor, + new java.lang.String[] { + "NfsShares", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_baremetalsolution_v2_UpdateNfsShareRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_baremetalsolution_v2_UpdateNfsShareRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_UpdateNfsShareRequest_descriptor, + new java.lang.String[] { + "NfsShare", "UpdateMask", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/OperationMetadata.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/OperationMetadata.java index 4218d2461b33..a5cd60543478 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/OperationMetadata.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/OperationMetadata.java @@ -158,14 +158,14 @@ private OperationMetadata( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.BareMetalSolutionProto .internal_static_google_cloud_baremetalsolution_v2_OperationMetadata_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.BareMetalSolutionProto .internal_static_google_cloud_baremetalsolution_v2_OperationMetadata_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.OperationMetadata.class, @@ -725,14 +725,14 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.OperationMetadata) com.google.cloud.baremetalsolution.v2.OperationMetadataOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.BareMetalSolutionProto .internal_static_google_cloud_baremetalsolution_v2_OperationMetadata_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.BareMetalSolutionProto .internal_static_google_cloud_baremetalsolution_v2_OperationMetadata_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.OperationMetadata.class, @@ -783,7 +783,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.BareMetalSolutionProto .internal_static_google_cloud_baremetalsolution_v2_OperationMetadata_descriptor; } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ResetInstanceRequest.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ResetInstanceRequest.java index 09ca711911d2..bebcfd2c9d18 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ResetInstanceRequest.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ResetInstanceRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/instance.proto package com.google.cloud.baremetalsolution.v2; @@ -99,14 +99,14 @@ private ResetInstanceRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.InstanceProto .internal_static_google_cloud_baremetalsolution_v2_ResetInstanceRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.InstanceProto .internal_static_google_cloud_baremetalsolution_v2_ResetInstanceRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.ResetInstanceRequest.class, @@ -340,14 +340,14 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.ResetInstanceRequest) com.google.cloud.baremetalsolution.v2.ResetInstanceRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.InstanceProto .internal_static_google_cloud_baremetalsolution_v2_ResetInstanceRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.InstanceProto .internal_static_google_cloud_baremetalsolution_v2_ResetInstanceRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.ResetInstanceRequest.class, @@ -378,7 +378,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.InstanceProto .internal_static_google_cloud_baremetalsolution_v2_ResetInstanceRequest_descriptor; } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ResetInstanceRequestOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ResetInstanceRequestOrBuilder.java index 3cdaf1bac9b8..1f953fe5872f 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ResetInstanceRequestOrBuilder.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ResetInstanceRequestOrBuilder.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/instance.proto package com.google.cloud.baremetalsolution.v2; diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ResetInstanceResponse.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ResetInstanceResponse.java index c8c57e7be7a2..8c117cbaf2f7 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ResetInstanceResponse.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ResetInstanceResponse.java @@ -90,14 +90,14 @@ private ResetInstanceResponse( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.BareMetalSolutionProto .internal_static_google_cloud_baremetalsolution_v2_ResetInstanceResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.BareMetalSolutionProto .internal_static_google_cloud_baremetalsolution_v2_ResetInstanceResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.ResetInstanceResponse.class, @@ -269,14 +269,14 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.ResetInstanceResponse) com.google.cloud.baremetalsolution.v2.ResetInstanceResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.BareMetalSolutionProto .internal_static_google_cloud_baremetalsolution_v2_ResetInstanceResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.BareMetalSolutionProto .internal_static_google_cloud_baremetalsolution_v2_ResetInstanceResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.ResetInstanceResponse.class, @@ -305,7 +305,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.BareMetalSolutionProto .internal_static_google_cloud_baremetalsolution_v2_ResetInstanceResponse_descriptor; } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ResizeVolumeRequest.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ResizeVolumeRequest.java new file mode 100644 index 000000000000..44bea73a13c0 --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ResizeVolumeRequest.java @@ -0,0 +1,743 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/baremetalsolution/v2/volume.proto + +package com.google.cloud.baremetalsolution.v2; + +/** + * + * + *
+ * Request for emergency resize Volume.
+ * 
+ * + * Protobuf type {@code google.cloud.baremetalsolution.v2.ResizeVolumeRequest} + */ +public final class ResizeVolumeRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.ResizeVolumeRequest) + ResizeVolumeRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResizeVolumeRequest.newBuilder() to construct. + private ResizeVolumeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ResizeVolumeRequest() { + volume_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ResizeVolumeRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ResizeVolumeRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + volume_ = s; + break; + } + case 16: + { + sizeGib_ = input.readInt64(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.baremetalsolution.v2.VolumeProto + .internal_static_google_cloud_baremetalsolution_v2_ResizeVolumeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.baremetalsolution.v2.VolumeProto + .internal_static_google_cloud_baremetalsolution_v2_ResizeVolumeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest.class, + com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest.Builder.class); + } + + public static final int VOLUME_FIELD_NUMBER = 1; + private volatile java.lang.Object volume_; + /** + * + * + *
+   * Required. Volume to resize.
+   * 
+ * + * + * string volume = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The volume. + */ + @java.lang.Override + public java.lang.String getVolume() { + java.lang.Object ref = volume_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + volume_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Volume to resize.
+   * 
+ * + * + * string volume = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for volume. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVolumeBytes() { + java.lang.Object ref = volume_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + volume_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SIZE_GIB_FIELD_NUMBER = 2; + private long sizeGib_; + /** + * + * + *
+   * New Volume size, in GiB.
+   * 
+ * + * int64 size_gib = 2; + * + * @return The sizeGib. + */ + @java.lang.Override + public long getSizeGib() { + return sizeGib_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(volume_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, volume_); + } + if (sizeGib_ != 0L) { + output.writeInt64(2, sizeGib_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(volume_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, volume_); + } + if (sizeGib_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, sizeGib_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest)) { + return super.equals(obj); + } + com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest other = + (com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest) obj; + + if (!getVolume().equals(other.getVolume())) return false; + if (getSizeGib() != other.getSizeGib()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VOLUME_FIELD_NUMBER; + hash = (53 * hash) + getVolume().hashCode(); + hash = (37 * hash) + SIZE_GIB_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSizeGib()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for emergency resize Volume.
+   * 
+ * + * Protobuf type {@code google.cloud.baremetalsolution.v2.ResizeVolumeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.ResizeVolumeRequest) + com.google.cloud.baremetalsolution.v2.ResizeVolumeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.baremetalsolution.v2.VolumeProto + .internal_static_google_cloud_baremetalsolution_v2_ResizeVolumeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.baremetalsolution.v2.VolumeProto + .internal_static_google_cloud_baremetalsolution_v2_ResizeVolumeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest.class, + com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest.Builder.class); + } + + // Construct using com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + volume_ = ""; + + sizeGib_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.baremetalsolution.v2.VolumeProto + .internal_static_google_cloud_baremetalsolution_v2_ResizeVolumeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest getDefaultInstanceForType() { + return com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest build() { + com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest buildPartial() { + com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest result = + new com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest(this); + result.volume_ = volume_; + result.sizeGib_ = sizeGib_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest) { + return mergeFrom((com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest other) { + if (other == com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest.getDefaultInstance()) + return this; + if (!other.getVolume().isEmpty()) { + volume_ = other.volume_; + onChanged(); + } + if (other.getSizeGib() != 0L) { + setSizeGib(other.getSizeGib()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object volume_ = ""; + /** + * + * + *
+     * Required. Volume to resize.
+     * 
+ * + * + * string volume = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The volume. + */ + public java.lang.String getVolume() { + java.lang.Object ref = volume_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + volume_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Volume to resize.
+     * 
+ * + * + * string volume = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for volume. + */ + public com.google.protobuf.ByteString getVolumeBytes() { + java.lang.Object ref = volume_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + volume_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Volume to resize.
+     * 
+ * + * + * string volume = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The volume to set. + * @return This builder for chaining. + */ + public Builder setVolume(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + volume_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Volume to resize.
+     * 
+ * + * + * string volume = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearVolume() { + + volume_ = getDefaultInstance().getVolume(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Volume to resize.
+     * 
+ * + * + * string volume = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for volume to set. + * @return This builder for chaining. + */ + public Builder setVolumeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + volume_ = value; + onChanged(); + return this; + } + + private long sizeGib_; + /** + * + * + *
+     * New Volume size, in GiB.
+     * 
+ * + * int64 size_gib = 2; + * + * @return The sizeGib. + */ + @java.lang.Override + public long getSizeGib() { + return sizeGib_; + } + /** + * + * + *
+     * New Volume size, in GiB.
+     * 
+ * + * int64 size_gib = 2; + * + * @param value The sizeGib to set. + * @return This builder for chaining. + */ + public Builder setSizeGib(long value) { + + sizeGib_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * New Volume size, in GiB.
+     * 
+ * + * int64 size_gib = 2; + * + * @return This builder for chaining. + */ + public Builder clearSizeGib() { + + sizeGib_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.ResizeVolumeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.ResizeVolumeRequest) + private static final com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest(); + } + + public static com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResizeVolumeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ResizeVolumeRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/DeleteSnapshotSchedulePolicyRequestOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ResizeVolumeRequestOrBuilder.java similarity index 57% rename from java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/DeleteSnapshotSchedulePolicyRequestOrBuilder.java rename to java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ResizeVolumeRequestOrBuilder.java index 15af8af245b9..072aeb8cdf40 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/DeleteSnapshotSchedulePolicyRequestOrBuilder.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ResizeVolumeRequestOrBuilder.java @@ -14,41 +14,54 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/volume.proto package com.google.cloud.baremetalsolution.v2; -public interface DeleteSnapshotSchedulePolicyRequestOrBuilder +public interface ResizeVolumeRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.DeleteSnapshotSchedulePolicyRequest) + // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.ResizeVolumeRequest) com.google.protobuf.MessageOrBuilder { /** * * *
-   * Required. The name of the snapshot schedule policy to delete.
+   * Required. Volume to resize.
    * 
* * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string volume = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * - * @return The name. + * @return The volume. */ - java.lang.String getName(); + java.lang.String getVolume(); /** * * *
-   * Required. The name of the snapshot schedule policy to delete.
+   * Required. Volume to resize.
    * 
* * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string volume = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * - * @return The bytes for name. + * @return The bytes for volume. */ - com.google.protobuf.ByteString getNameBytes(); + com.google.protobuf.ByteString getVolumeBytes(); + + /** + * + * + *
+   * New Volume size, in GiB.
+   * 
+ * + * int64 size_gib = 2; + * + * @return The sizeGib. + */ + long getSizeGib(); } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ServerNetworkTemplate.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ServerNetworkTemplate.java new file mode 100644 index 000000000000..6992d468b6df --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ServerNetworkTemplate.java @@ -0,0 +1,2731 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/baremetalsolution/v2/instance.proto + +package com.google.cloud.baremetalsolution.v2; + +/** + * + * + *
+ * Network template.
+ * 
+ * + * Protobuf type {@code google.cloud.baremetalsolution.v2.ServerNetworkTemplate} + */ +public final class ServerNetworkTemplate extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.ServerNetworkTemplate) + ServerNetworkTemplateOrBuilder { + private static final long serialVersionUID = 0L; + // Use ServerNetworkTemplate.newBuilder() to construct. + private ServerNetworkTemplate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ServerNetworkTemplate() { + name_ = ""; + applicableInstanceTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + logicalInterfaces_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ServerNetworkTemplate(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ServerNetworkTemplate( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + applicableInstanceTypes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + applicableInstanceTypes_.add(s); + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + logicalInterfaces_ = + new java.util.ArrayList< + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate + .LogicalInterface>(); + mutable_bitField0_ |= 0x00000002; + } + logicalInterfaces_.add( + input.readMessage( + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + .parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + applicableInstanceTypes_ = applicableInstanceTypes_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + logicalInterfaces_ = java.util.Collections.unmodifiableList(logicalInterfaces_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_ServerNetworkTemplate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_ServerNetworkTemplate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.class, + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.Builder.class); + } + + public interface LogicalInterfaceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Interface name.
+     * This is not a globally unique identifier.
+     * Name is unique only inside the ServerNetworkTemplate. This is of syntax
+     * <bond><interface_type_index><bond_mode> or <nic><interface_type_index>
+     * and forms part of the network template name.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Interface name.
+     * This is not a globally unique identifier.
+     * Name is unique only inside the ServerNetworkTemplate. This is of syntax
+     * <bond><interface_type_index><bond_mode> or <nic><interface_type_index>
+     * and forms part of the network template name.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+     * Interface type.
+     * 
+ * + * + * .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.InterfaceType type = 2; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+     * Interface type.
+     * 
+ * + * + * .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.InterfaceType type = 2; + * + * + * @return The type. + */ + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.InterfaceType + getType(); + + /** + * + * + *
+     * If true, interface must have network connected.
+     * 
+ * + * bool required = 3; + * + * @return The required. + */ + boolean getRequired(); + } + /** + * + * + *
+   * Logical interface.
+   * 
+ * + * Protobuf type {@code google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface} + */ + public static final class LogicalInterface extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface) + LogicalInterfaceOrBuilder { + private static final long serialVersionUID = 0L; + // Use LogicalInterface.newBuilder() to construct. + private LogicalInterface(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LogicalInterface() { + name_ = ""; + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LogicalInterface(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LogicalInterface( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 24: + { + required_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_ServerNetworkTemplate_LogicalInterface_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_ServerNetworkTemplate_LogicalInterface_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.class, + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.Builder + .class); + } + + /** + * + * + *
+     * Interface type.
+     * 
+ * + * Protobuf enum {@code + * google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.InterfaceType} + */ + public enum InterfaceType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Unspecified value.
+       * 
+ * + * INTERFACE_TYPE_UNSPECIFIED = 0; + */ + INTERFACE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+       * Bond interface type.
+       * 
+ * + * BOND = 1; + */ + BOND(1), + /** + * + * + *
+       * NIC interface type.
+       * 
+ * + * NIC = 2; + */ + NIC(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Unspecified value.
+       * 
+ * + * INTERFACE_TYPE_UNSPECIFIED = 0; + */ + public static final int INTERFACE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Bond interface type.
+       * 
+ * + * BOND = 1; + */ + public static final int BOND_VALUE = 1; + /** + * + * + *
+       * NIC interface type.
+       * 
+ * + * NIC = 2; + */ + public static final int NIC_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static InterfaceType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static InterfaceType forNumber(int value) { + switch (value) { + case 0: + return INTERFACE_TYPE_UNSPECIFIED; + case 1: + return BOND; + case 2: + return NIC; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public InterfaceType findValueByNumber(int number) { + return InterfaceType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final InterfaceType[] VALUES = values(); + + public static InterfaceType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private InterfaceType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.InterfaceType) + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+     * Interface name.
+     * This is not a globally unique identifier.
+     * Name is unique only inside the ServerNetworkTemplate. This is of syntax
+     * <bond><interface_type_index><bond_mode> or <nic><interface_type_index>
+     * and forms part of the network template name.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * Interface name.
+     * This is not a globally unique identifier.
+     * Name is unique only inside the ServerNetworkTemplate. This is of syntax
+     * <bond><interface_type_index><bond_mode> or <nic><interface_type_index>
+     * and forms part of the network template name.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + private int type_; + /** + * + * + *
+     * Interface type.
+     * 
+ * + * + * .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.InterfaceType type = 2; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Interface type.
+     * 
+ * + * + * .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.InterfaceType type = 2; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + .InterfaceType + getType() { + @SuppressWarnings("deprecation") + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.InterfaceType + result = + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + .InterfaceType.valueOf(type_); + return result == null + ? com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + .InterfaceType.UNRECOGNIZED + : result; + } + + public static final int REQUIRED_FIELD_NUMBER = 3; + private boolean required_; + /** + * + * + *
+     * If true, interface must have network connected.
+     * 
+ * + * bool required = 3; + * + * @return The required. + */ + @java.lang.Override + public boolean getRequired() { + return required_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (type_ + != com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + .InterfaceType.INTERFACE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, type_); + } + if (required_ != false) { + output.writeBool(3, required_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (type_ + != com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + .InterfaceType.INTERFACE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, type_); + } + if (required_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, required_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface)) { + return super.equals(obj); + } + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface other = + (com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface) obj; + + if (!getName().equals(other.getName())) return false; + if (type_ != other.type_) return false; + if (getRequired() != other.getRequired()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + REQUIRED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequired()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Logical interface.
+     * 
+ * + * Protobuf type {@code + * google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface) + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterfaceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_ServerNetworkTemplate_LogicalInterface_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_ServerNetworkTemplate_LogicalInterface_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.class, + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.Builder + .class); + } + + // Construct using + // com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + type_ = 0; + + required_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_ServerNetworkTemplate_LogicalInterface_descriptor; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + getDefaultInstanceForType() { + return com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface build() { + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + buildPartial() { + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface result = + new com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface(this); + result.name_ = name_; + result.type_ = type_; + result.required_ = required_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface) { + return mergeFrom( + (com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface other) { + if (other + == com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.getRequired() != false) { + setRequired(other.getRequired()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Interface name.
+       * This is not a globally unique identifier.
+       * Name is unique only inside the ServerNetworkTemplate. This is of syntax
+       * <bond><interface_type_index><bond_mode> or <nic><interface_type_index>
+       * and forms part of the network template name.
+       * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Interface name.
+       * This is not a globally unique identifier.
+       * Name is unique only inside the ServerNetworkTemplate. This is of syntax
+       * <bond><interface_type_index><bond_mode> or <nic><interface_type_index>
+       * and forms part of the network template name.
+       * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Interface name.
+       * This is not a globally unique identifier.
+       * Name is unique only inside the ServerNetworkTemplate. This is of syntax
+       * <bond><interface_type_index><bond_mode> or <nic><interface_type_index>
+       * and forms part of the network template name.
+       * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Interface name.
+       * This is not a globally unique identifier.
+       * Name is unique only inside the ServerNetworkTemplate. This is of syntax
+       * <bond><interface_type_index><bond_mode> or <nic><interface_type_index>
+       * and forms part of the network template name.
+       * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Interface name.
+       * This is not a globally unique identifier.
+       * Name is unique only inside the ServerNetworkTemplate. This is of syntax
+       * <bond><interface_type_index><bond_mode> or <nic><interface_type_index>
+       * and forms part of the network template name.
+       * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+       * Interface type.
+       * 
+ * + * + * .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.InterfaceType type = 2; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+       * Interface type.
+       * 
+ * + * + * .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.InterfaceType type = 2; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Interface type.
+       * 
+ * + * + * .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.InterfaceType type = 2; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + .InterfaceType + getType() { + @SuppressWarnings("deprecation") + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.InterfaceType + result = + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + .InterfaceType.valueOf(type_); + return result == null + ? com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + .InterfaceType.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Interface type.
+       * 
+ * + * + * .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.InterfaceType type = 2; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.InterfaceType + value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Interface type.
+       * 
+ * + * + * .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.InterfaceType type = 2; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private boolean required_; + /** + * + * + *
+       * If true, interface must have network connected.
+       * 
+ * + * bool required = 3; + * + * @return The required. + */ + @java.lang.Override + public boolean getRequired() { + return required_; + } + /** + * + * + *
+       * If true, interface must have network connected.
+       * 
+ * + * bool required = 3; + * + * @param value The required to set. + * @return This builder for chaining. + */ + public Builder setRequired(boolean value) { + + required_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * If true, interface must have network connected.
+       * 
+ * + * bool required = 3; + * + * @return This builder for chaining. + */ + public Builder clearRequired() { + + required_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface) + } + + // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface) + private static final com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate + .LogicalInterface + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface(); + } + + public static com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LogicalInterface parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LogicalInterface(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. Template's unique name. The full resource name follows the pattern:
+   * `projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}`
+   * Generally, the {server_network_template} follows the syntax of
+   * "bond<interface_type_index><bond_mode>" or "nic<interface_type_index>".
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Template's unique name. The full resource name follows the pattern:
+   * `projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}`
+   * Generally, the {server_network_template} follows the syntax of
+   * "bond<interface_type_index><bond_mode>" or "nic<interface_type_index>".
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APPLICABLE_INSTANCE_TYPES_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList applicableInstanceTypes_; + /** + * + * + *
+   * Instance types this template is applicable to.
+   * 
+ * + * repeated string applicable_instance_types = 2; + * + * @return A list containing the applicableInstanceTypes. + */ + public com.google.protobuf.ProtocolStringList getApplicableInstanceTypesList() { + return applicableInstanceTypes_; + } + /** + * + * + *
+   * Instance types this template is applicable to.
+   * 
+ * + * repeated string applicable_instance_types = 2; + * + * @return The count of applicableInstanceTypes. + */ + public int getApplicableInstanceTypesCount() { + return applicableInstanceTypes_.size(); + } + /** + * + * + *
+   * Instance types this template is applicable to.
+   * 
+ * + * repeated string applicable_instance_types = 2; + * + * @param index The index of the element to return. + * @return The applicableInstanceTypes at the given index. + */ + public java.lang.String getApplicableInstanceTypes(int index) { + return applicableInstanceTypes_.get(index); + } + /** + * + * + *
+   * Instance types this template is applicable to.
+   * 
+ * + * repeated string applicable_instance_types = 2; + * + * @param index The index of the value to return. + * @return The bytes of the applicableInstanceTypes at the given index. + */ + public com.google.protobuf.ByteString getApplicableInstanceTypesBytes(int index) { + return applicableInstanceTypes_.getByteString(index); + } + + public static final int LOGICAL_INTERFACES_FIELD_NUMBER = 3; + private java.util.List< + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface> + logicalInterfaces_; + /** + * + * + *
+   * Logical interfaces.
+   * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface> + getLogicalInterfacesList() { + return logicalInterfaces_; + } + /** + * + * + *
+   * Logical interfaces.
+   * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterfaceOrBuilder> + getLogicalInterfacesOrBuilderList() { + return logicalInterfaces_; + } + /** + * + * + *
+   * Logical interfaces.
+   * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; + * + */ + @java.lang.Override + public int getLogicalInterfacesCount() { + return logicalInterfaces_.size(); + } + /** + * + * + *
+   * Logical interfaces.
+   * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; + * + */ + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + getLogicalInterfaces(int index) { + return logicalInterfaces_.get(index); + } + /** + * + * + *
+   * Logical interfaces.
+   * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; + * + */ + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterfaceOrBuilder + getLogicalInterfacesOrBuilder(int index) { + return logicalInterfaces_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < applicableInstanceTypes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 2, applicableInstanceTypes_.getRaw(i)); + } + for (int i = 0; i < logicalInterfaces_.size(); i++) { + output.writeMessage(3, logicalInterfaces_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + { + int dataSize = 0; + for (int i = 0; i < applicableInstanceTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(applicableInstanceTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getApplicableInstanceTypesList().size(); + } + for (int i = 0; i < logicalInterfaces_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, logicalInterfaces_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate)) { + return super.equals(obj); + } + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate other = + (com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate) obj; + + if (!getName().equals(other.getName())) return false; + if (!getApplicableInstanceTypesList().equals(other.getApplicableInstanceTypesList())) + return false; + if (!getLogicalInterfacesList().equals(other.getLogicalInterfacesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getApplicableInstanceTypesCount() > 0) { + hash = (37 * hash) + APPLICABLE_INSTANCE_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getApplicableInstanceTypesList().hashCode(); + } + if (getLogicalInterfacesCount() > 0) { + hash = (37 * hash) + LOGICAL_INTERFACES_FIELD_NUMBER; + hash = (53 * hash) + getLogicalInterfacesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Network template.
+   * 
+ * + * Protobuf type {@code google.cloud.baremetalsolution.v2.ServerNetworkTemplate} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.ServerNetworkTemplate) + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_ServerNetworkTemplate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_ServerNetworkTemplate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.class, + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.Builder.class); + } + + // Construct using com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getLogicalInterfacesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + applicableInstanceTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + if (logicalInterfacesBuilder_ == null) { + logicalInterfaces_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + logicalInterfacesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_ServerNetworkTemplate_descriptor; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate getDefaultInstanceForType() { + return com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate build() { + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate buildPartial() { + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate result = + new com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (((bitField0_ & 0x00000001) != 0)) { + applicableInstanceTypes_ = applicableInstanceTypes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.applicableInstanceTypes_ = applicableInstanceTypes_; + if (logicalInterfacesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + logicalInterfaces_ = java.util.Collections.unmodifiableList(logicalInterfaces_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.logicalInterfaces_ = logicalInterfaces_; + } else { + result.logicalInterfaces_ = logicalInterfacesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate) { + return mergeFrom((com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate other) { + if (other == com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.applicableInstanceTypes_.isEmpty()) { + if (applicableInstanceTypes_.isEmpty()) { + applicableInstanceTypes_ = other.applicableInstanceTypes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureApplicableInstanceTypesIsMutable(); + applicableInstanceTypes_.addAll(other.applicableInstanceTypes_); + } + onChanged(); + } + if (logicalInterfacesBuilder_ == null) { + if (!other.logicalInterfaces_.isEmpty()) { + if (logicalInterfaces_.isEmpty()) { + logicalInterfaces_ = other.logicalInterfaces_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureLogicalInterfacesIsMutable(); + logicalInterfaces_.addAll(other.logicalInterfaces_); + } + onChanged(); + } + } else { + if (!other.logicalInterfaces_.isEmpty()) { + if (logicalInterfacesBuilder_.isEmpty()) { + logicalInterfacesBuilder_.dispose(); + logicalInterfacesBuilder_ = null; + logicalInterfaces_ = other.logicalInterfaces_; + bitField0_ = (bitField0_ & ~0x00000002); + logicalInterfacesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getLogicalInterfacesFieldBuilder() + : null; + } else { + logicalInterfacesBuilder_.addAllMessages(other.logicalInterfaces_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Template's unique name. The full resource name follows the pattern:
+     * `projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}`
+     * Generally, the {server_network_template} follows the syntax of
+     * "bond<interface_type_index><bond_mode>" or "nic<interface_type_index>".
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Template's unique name. The full resource name follows the pattern:
+     * `projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}`
+     * Generally, the {server_network_template} follows the syntax of
+     * "bond<interface_type_index><bond_mode>" or "nic<interface_type_index>".
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Template's unique name. The full resource name follows the pattern:
+     * `projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}`
+     * Generally, the {server_network_template} follows the syntax of
+     * "bond<interface_type_index><bond_mode>" or "nic<interface_type_index>".
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Template's unique name. The full resource name follows the pattern:
+     * `projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}`
+     * Generally, the {server_network_template} follows the syntax of
+     * "bond<interface_type_index><bond_mode>" or "nic<interface_type_index>".
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Template's unique name. The full resource name follows the pattern:
+     * `projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}`
+     * Generally, the {server_network_template} follows the syntax of
+     * "bond<interface_type_index><bond_mode>" or "nic<interface_type_index>".
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList applicableInstanceTypes_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureApplicableInstanceTypesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + applicableInstanceTypes_ = + new com.google.protobuf.LazyStringArrayList(applicableInstanceTypes_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Instance types this template is applicable to.
+     * 
+ * + * repeated string applicable_instance_types = 2; + * + * @return A list containing the applicableInstanceTypes. + */ + public com.google.protobuf.ProtocolStringList getApplicableInstanceTypesList() { + return applicableInstanceTypes_.getUnmodifiableView(); + } + /** + * + * + *
+     * Instance types this template is applicable to.
+     * 
+ * + * repeated string applicable_instance_types = 2; + * + * @return The count of applicableInstanceTypes. + */ + public int getApplicableInstanceTypesCount() { + return applicableInstanceTypes_.size(); + } + /** + * + * + *
+     * Instance types this template is applicable to.
+     * 
+ * + * repeated string applicable_instance_types = 2; + * + * @param index The index of the element to return. + * @return The applicableInstanceTypes at the given index. + */ + public java.lang.String getApplicableInstanceTypes(int index) { + return applicableInstanceTypes_.get(index); + } + /** + * + * + *
+     * Instance types this template is applicable to.
+     * 
+ * + * repeated string applicable_instance_types = 2; + * + * @param index The index of the value to return. + * @return The bytes of the applicableInstanceTypes at the given index. + */ + public com.google.protobuf.ByteString getApplicableInstanceTypesBytes(int index) { + return applicableInstanceTypes_.getByteString(index); + } + /** + * + * + *
+     * Instance types this template is applicable to.
+     * 
+ * + * repeated string applicable_instance_types = 2; + * + * @param index The index to set the value at. + * @param value The applicableInstanceTypes to set. + * @return This builder for chaining. + */ + public Builder setApplicableInstanceTypes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureApplicableInstanceTypesIsMutable(); + applicableInstanceTypes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Instance types this template is applicable to.
+     * 
+ * + * repeated string applicable_instance_types = 2; + * + * @param value The applicableInstanceTypes to add. + * @return This builder for chaining. + */ + public Builder addApplicableInstanceTypes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureApplicableInstanceTypesIsMutable(); + applicableInstanceTypes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Instance types this template is applicable to.
+     * 
+ * + * repeated string applicable_instance_types = 2; + * + * @param values The applicableInstanceTypes to add. + * @return This builder for chaining. + */ + public Builder addAllApplicableInstanceTypes(java.lang.Iterable values) { + ensureApplicableInstanceTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, applicableInstanceTypes_); + onChanged(); + return this; + } + /** + * + * + *
+     * Instance types this template is applicable to.
+     * 
+ * + * repeated string applicable_instance_types = 2; + * + * @return This builder for chaining. + */ + public Builder clearApplicableInstanceTypes() { + applicableInstanceTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Instance types this template is applicable to.
+     * 
+ * + * repeated string applicable_instance_types = 2; + * + * @param value The bytes of the applicableInstanceTypes to add. + * @return This builder for chaining. + */ + public Builder addApplicableInstanceTypesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureApplicableInstanceTypesIsMutable(); + applicableInstanceTypes_.add(value); + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface> + logicalInterfaces_ = java.util.Collections.emptyList(); + + private void ensureLogicalInterfacesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + logicalInterfaces_ = + new java.util.ArrayList< + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface>( + logicalInterfaces_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface, + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.Builder, + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterfaceOrBuilder> + logicalInterfacesBuilder_; + + /** + * + * + *
+     * Logical interfaces.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; + * + */ + public java.util.List< + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface> + getLogicalInterfacesList() { + if (logicalInterfacesBuilder_ == null) { + return java.util.Collections.unmodifiableList(logicalInterfaces_); + } else { + return logicalInterfacesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Logical interfaces.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; + * + */ + public int getLogicalInterfacesCount() { + if (logicalInterfacesBuilder_ == null) { + return logicalInterfaces_.size(); + } else { + return logicalInterfacesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Logical interfaces.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; + * + */ + public com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + getLogicalInterfaces(int index) { + if (logicalInterfacesBuilder_ == null) { + return logicalInterfaces_.get(index); + } else { + return logicalInterfacesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Logical interfaces.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; + * + */ + public Builder setLogicalInterfaces( + int index, + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface value) { + if (logicalInterfacesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogicalInterfacesIsMutable(); + logicalInterfaces_.set(index, value); + onChanged(); + } else { + logicalInterfacesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Logical interfaces.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; + * + */ + public Builder setLogicalInterfaces( + int index, + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.Builder + builderForValue) { + if (logicalInterfacesBuilder_ == null) { + ensureLogicalInterfacesIsMutable(); + logicalInterfaces_.set(index, builderForValue.build()); + onChanged(); + } else { + logicalInterfacesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Logical interfaces.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; + * + */ + public Builder addLogicalInterfaces( + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface value) { + if (logicalInterfacesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogicalInterfacesIsMutable(); + logicalInterfaces_.add(value); + onChanged(); + } else { + logicalInterfacesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Logical interfaces.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; + * + */ + public Builder addLogicalInterfaces( + int index, + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface value) { + if (logicalInterfacesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogicalInterfacesIsMutable(); + logicalInterfaces_.add(index, value); + onChanged(); + } else { + logicalInterfacesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Logical interfaces.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; + * + */ + public Builder addLogicalInterfaces( + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.Builder + builderForValue) { + if (logicalInterfacesBuilder_ == null) { + ensureLogicalInterfacesIsMutable(); + logicalInterfaces_.add(builderForValue.build()); + onChanged(); + } else { + logicalInterfacesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Logical interfaces.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; + * + */ + public Builder addLogicalInterfaces( + int index, + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.Builder + builderForValue) { + if (logicalInterfacesBuilder_ == null) { + ensureLogicalInterfacesIsMutable(); + logicalInterfaces_.add(index, builderForValue.build()); + onChanged(); + } else { + logicalInterfacesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Logical interfaces.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; + * + */ + public Builder addAllLogicalInterfaces( + java.lang.Iterable< + ? extends + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface> + values) { + if (logicalInterfacesBuilder_ == null) { + ensureLogicalInterfacesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, logicalInterfaces_); + onChanged(); + } else { + logicalInterfacesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Logical interfaces.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; + * + */ + public Builder clearLogicalInterfaces() { + if (logicalInterfacesBuilder_ == null) { + logicalInterfaces_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + logicalInterfacesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Logical interfaces.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; + * + */ + public Builder removeLogicalInterfaces(int index) { + if (logicalInterfacesBuilder_ == null) { + ensureLogicalInterfacesIsMutable(); + logicalInterfaces_.remove(index); + onChanged(); + } else { + logicalInterfacesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Logical interfaces.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; + * + */ + public com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.Builder + getLogicalInterfacesBuilder(int index) { + return getLogicalInterfacesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Logical interfaces.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; + * + */ + public com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterfaceOrBuilder + getLogicalInterfacesOrBuilder(int index) { + if (logicalInterfacesBuilder_ == null) { + return logicalInterfaces_.get(index); + } else { + return logicalInterfacesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Logical interfaces.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; + * + */ + public java.util.List< + ? extends + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate + .LogicalInterfaceOrBuilder> + getLogicalInterfacesOrBuilderList() { + if (logicalInterfacesBuilder_ != null) { + return logicalInterfacesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(logicalInterfaces_); + } + } + /** + * + * + *
+     * Logical interfaces.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; + * + */ + public com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.Builder + addLogicalInterfacesBuilder() { + return getLogicalInterfacesFieldBuilder() + .addBuilder( + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + .getDefaultInstance()); + } + /** + * + * + *
+     * Logical interfaces.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; + * + */ + public com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.Builder + addLogicalInterfacesBuilder(int index) { + return getLogicalInterfacesFieldBuilder() + .addBuilder( + index, + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + .getDefaultInstance()); + } + /** + * + * + *
+     * Logical interfaces.
+     * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; + * + */ + public java.util.List< + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.Builder> + getLogicalInterfacesBuilderList() { + return getLogicalInterfacesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface, + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface.Builder, + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterfaceOrBuilder> + getLogicalInterfacesFieldBuilder() { + if (logicalInterfacesBuilder_ == null) { + logicalInterfacesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface, + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface + .Builder, + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate + .LogicalInterfaceOrBuilder>( + logicalInterfaces_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + logicalInterfaces_ = null; + } + return logicalInterfacesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.ServerNetworkTemplate) + } + + // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.ServerNetworkTemplate) + private static final com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate(); + } + + public static com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ServerNetworkTemplate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ServerNetworkTemplate(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ServerNetworkTemplateOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ServerNetworkTemplateOrBuilder.java new file mode 100644 index 000000000000..f038bd7df9f5 --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ServerNetworkTemplateOrBuilder.java @@ -0,0 +1,174 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/baremetalsolution/v2/instance.proto + +package com.google.cloud.baremetalsolution.v2; + +public interface ServerNetworkTemplateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.ServerNetworkTemplate) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Template's unique name. The full resource name follows the pattern:
+   * `projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}`
+   * Generally, the {server_network_template} follows the syntax of
+   * "bond<interface_type_index><bond_mode>" or "nic<interface_type_index>".
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Template's unique name. The full resource name follows the pattern:
+   * `projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}`
+   * Generally, the {server_network_template} follows the syntax of
+   * "bond<interface_type_index><bond_mode>" or "nic<interface_type_index>".
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Instance types this template is applicable to.
+   * 
+ * + * repeated string applicable_instance_types = 2; + * + * @return A list containing the applicableInstanceTypes. + */ + java.util.List getApplicableInstanceTypesList(); + /** + * + * + *
+   * Instance types this template is applicable to.
+   * 
+ * + * repeated string applicable_instance_types = 2; + * + * @return The count of applicableInstanceTypes. + */ + int getApplicableInstanceTypesCount(); + /** + * + * + *
+   * Instance types this template is applicable to.
+   * 
+ * + * repeated string applicable_instance_types = 2; + * + * @param index The index of the element to return. + * @return The applicableInstanceTypes at the given index. + */ + java.lang.String getApplicableInstanceTypes(int index); + /** + * + * + *
+   * Instance types this template is applicable to.
+   * 
+ * + * repeated string applicable_instance_types = 2; + * + * @param index The index of the value to return. + * @return The bytes of the applicableInstanceTypes at the given index. + */ + com.google.protobuf.ByteString getApplicableInstanceTypesBytes(int index); + + /** + * + * + *
+   * Logical interfaces.
+   * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; + * + */ + java.util.List + getLogicalInterfacesList(); + /** + * + * + *
+   * Logical interfaces.
+   * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; + * + */ + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface getLogicalInterfaces( + int index); + /** + * + * + *
+   * Logical interfaces.
+   * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; + * + */ + int getLogicalInterfacesCount(); + /** + * + * + *
+   * Logical interfaces.
+   * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; + * + */ + java.util.List< + ? extends + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterfaceOrBuilder> + getLogicalInterfacesOrBuilderList(); + /** + * + * + *
+   * Logical interfaces.
+   * 
+ * + * + * repeated .google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterface logical_interfaces = 3; + * + */ + com.google.cloud.baremetalsolution.v2.ServerNetworkTemplate.LogicalInterfaceOrBuilder + getLogicalInterfacesOrBuilder(int index); +} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/SnapshotSchedulePolicy.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/SnapshotSchedulePolicy.java deleted file mode 100644 index e995464cd78b..000000000000 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/SnapshotSchedulePolicy.java +++ /dev/null @@ -1,2404 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto - -package com.google.cloud.baremetalsolution.v2; - -/** - * - * - *
- * A snapshot schedule policy.
- * 
- * - * Protobuf type {@code google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy} - */ -public final class SnapshotSchedulePolicy extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy) - SnapshotSchedulePolicyOrBuilder { - private static final long serialVersionUID = 0L; - // Use SnapshotSchedulePolicy.newBuilder() to construct. - private SnapshotSchedulePolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private SnapshotSchedulePolicy() { - name_ = ""; - description_ = ""; - schedules_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new SnapshotSchedulePolicy(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private SnapshotSchedulePolicy( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - schedules_ = - new java.util.ArrayList< - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule>(); - mutable_bitField0_ |= 0x00000001; - } - schedules_.add( - input.readMessage( - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule - .parser(), - extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - schedules_ = java.util.Collections.unmodifiableList(schedules_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_SnapshotSchedulePolicy_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_SnapshotSchedulePolicy_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.class, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Builder.class); - } - - public interface ScheduleOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * A crontab-like specification that the schedule uses to take
-     * snapshots.
-     * 
- * - * string crontab_spec = 1; - * - * @return The crontabSpec. - */ - java.lang.String getCrontabSpec(); - /** - * - * - *
-     * A crontab-like specification that the schedule uses to take
-     * snapshots.
-     * 
- * - * string crontab_spec = 1; - * - * @return The bytes for crontabSpec. - */ - com.google.protobuf.ByteString getCrontabSpecBytes(); - - /** - * - * - *
-     * The maximum number of snapshots to retain in this schedule.
-     * 
- * - * int32 retention_count = 2; - * - * @return The retentionCount. - */ - int getRetentionCount(); - - /** - * - * - *
-     * A list of snapshot names created in this schedule.
-     * 
- * - * string prefix = 3; - * - * @return The prefix. - */ - java.lang.String getPrefix(); - /** - * - * - *
-     * A list of snapshot names created in this schedule.
-     * 
- * - * string prefix = 3; - * - * @return The bytes for prefix. - */ - com.google.protobuf.ByteString getPrefixBytes(); - } - /** - * - * - *
-   * A snapshot schedule.
-   * 
- * - * Protobuf type {@code google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule} - */ - public static final class Schedule extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule) - ScheduleOrBuilder { - private static final long serialVersionUID = 0L; - // Use Schedule.newBuilder() to construct. - private Schedule(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Schedule() { - crontabSpec_ = ""; - prefix_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Schedule(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Schedule( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - crontabSpec_ = s; - break; - } - case 16: - { - retentionCount_ = input.readInt32(); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - prefix_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_SnapshotSchedulePolicy_Schedule_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_SnapshotSchedulePolicy_Schedule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule.class, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule.Builder.class); - } - - public static final int CRONTAB_SPEC_FIELD_NUMBER = 1; - private volatile java.lang.Object crontabSpec_; - /** - * - * - *
-     * A crontab-like specification that the schedule uses to take
-     * snapshots.
-     * 
- * - * string crontab_spec = 1; - * - * @return The crontabSpec. - */ - @java.lang.Override - public java.lang.String getCrontabSpec() { - java.lang.Object ref = crontabSpec_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - crontabSpec_ = s; - return s; - } - } - /** - * - * - *
-     * A crontab-like specification that the schedule uses to take
-     * snapshots.
-     * 
- * - * string crontab_spec = 1; - * - * @return The bytes for crontabSpec. - */ - @java.lang.Override - public com.google.protobuf.ByteString getCrontabSpecBytes() { - java.lang.Object ref = crontabSpec_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - crontabSpec_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RETENTION_COUNT_FIELD_NUMBER = 2; - private int retentionCount_; - /** - * - * - *
-     * The maximum number of snapshots to retain in this schedule.
-     * 
- * - * int32 retention_count = 2; - * - * @return The retentionCount. - */ - @java.lang.Override - public int getRetentionCount() { - return retentionCount_; - } - - public static final int PREFIX_FIELD_NUMBER = 3; - private volatile java.lang.Object prefix_; - /** - * - * - *
-     * A list of snapshot names created in this schedule.
-     * 
- * - * string prefix = 3; - * - * @return The prefix. - */ - @java.lang.Override - public java.lang.String getPrefix() { - java.lang.Object ref = prefix_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - prefix_ = s; - return s; - } - } - /** - * - * - *
-     * A list of snapshot names created in this schedule.
-     * 
- * - * string prefix = 3; - * - * @return The bytes for prefix. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPrefixBytes() { - java.lang.Object ref = prefix_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - prefix_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(crontabSpec_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, crontabSpec_); - } - if (retentionCount_ != 0) { - output.writeInt32(2, retentionCount_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(prefix_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, prefix_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(crontabSpec_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, crontabSpec_); - } - if (retentionCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, retentionCount_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(prefix_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, prefix_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule)) { - return super.equals(obj); - } - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule other = - (com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule) obj; - - if (!getCrontabSpec().equals(other.getCrontabSpec())) return false; - if (getRetentionCount() != other.getRetentionCount()) return false; - if (!getPrefix().equals(other.getPrefix())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CRONTAB_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getCrontabSpec().hashCode(); - hash = (37 * hash) + RETENTION_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getRetentionCount(); - hash = (37 * hash) + PREFIX_FIELD_NUMBER; - hash = (53 * hash) + getPrefix().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * A snapshot schedule.
-     * 
- * - * Protobuf type {@code google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule) - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.ScheduleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_SnapshotSchedulePolicy_Schedule_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_SnapshotSchedulePolicy_Schedule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule.class, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule.Builder - .class); - } - - // Construct using - // com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - crontabSpec_ = ""; - - retentionCount_ = 0; - - prefix_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_SnapshotSchedulePolicy_Schedule_descriptor; - } - - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule - getDefaultInstanceForType() { - return com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule build() { - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule buildPartial() { - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule result = - new com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule(this); - result.crontabSpec_ = crontabSpec_; - result.retentionCount_ = retentionCount_; - result.prefix_ = prefix_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule) { - return mergeFrom( - (com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule other) { - if (other - == com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule - .getDefaultInstance()) return this; - if (!other.getCrontabSpec().isEmpty()) { - crontabSpec_ = other.crontabSpec_; - onChanged(); - } - if (other.getRetentionCount() != 0) { - setRetentionCount(other.getRetentionCount()); - } - if (!other.getPrefix().isEmpty()) { - prefix_ = other.prefix_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object crontabSpec_ = ""; - /** - * - * - *
-       * A crontab-like specification that the schedule uses to take
-       * snapshots.
-       * 
- * - * string crontab_spec = 1; - * - * @return The crontabSpec. - */ - public java.lang.String getCrontabSpec() { - java.lang.Object ref = crontabSpec_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - crontabSpec_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * A crontab-like specification that the schedule uses to take
-       * snapshots.
-       * 
- * - * string crontab_spec = 1; - * - * @return The bytes for crontabSpec. - */ - public com.google.protobuf.ByteString getCrontabSpecBytes() { - java.lang.Object ref = crontabSpec_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - crontabSpec_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * A crontab-like specification that the schedule uses to take
-       * snapshots.
-       * 
- * - * string crontab_spec = 1; - * - * @param value The crontabSpec to set. - * @return This builder for chaining. - */ - public Builder setCrontabSpec(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - crontabSpec_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * A crontab-like specification that the schedule uses to take
-       * snapshots.
-       * 
- * - * string crontab_spec = 1; - * - * @return This builder for chaining. - */ - public Builder clearCrontabSpec() { - - crontabSpec_ = getDefaultInstance().getCrontabSpec(); - onChanged(); - return this; - } - /** - * - * - *
-       * A crontab-like specification that the schedule uses to take
-       * snapshots.
-       * 
- * - * string crontab_spec = 1; - * - * @param value The bytes for crontabSpec to set. - * @return This builder for chaining. - */ - public Builder setCrontabSpecBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - crontabSpec_ = value; - onChanged(); - return this; - } - - private int retentionCount_; - /** - * - * - *
-       * The maximum number of snapshots to retain in this schedule.
-       * 
- * - * int32 retention_count = 2; - * - * @return The retentionCount. - */ - @java.lang.Override - public int getRetentionCount() { - return retentionCount_; - } - /** - * - * - *
-       * The maximum number of snapshots to retain in this schedule.
-       * 
- * - * int32 retention_count = 2; - * - * @param value The retentionCount to set. - * @return This builder for chaining. - */ - public Builder setRetentionCount(int value) { - - retentionCount_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * The maximum number of snapshots to retain in this schedule.
-       * 
- * - * int32 retention_count = 2; - * - * @return This builder for chaining. - */ - public Builder clearRetentionCount() { - - retentionCount_ = 0; - onChanged(); - return this; - } - - private java.lang.Object prefix_ = ""; - /** - * - * - *
-       * A list of snapshot names created in this schedule.
-       * 
- * - * string prefix = 3; - * - * @return The prefix. - */ - public java.lang.String getPrefix() { - java.lang.Object ref = prefix_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - prefix_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * A list of snapshot names created in this schedule.
-       * 
- * - * string prefix = 3; - * - * @return The bytes for prefix. - */ - public com.google.protobuf.ByteString getPrefixBytes() { - java.lang.Object ref = prefix_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - prefix_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * A list of snapshot names created in this schedule.
-       * 
- * - * string prefix = 3; - * - * @param value The prefix to set. - * @return This builder for chaining. - */ - public Builder setPrefix(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - prefix_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * A list of snapshot names created in this schedule.
-       * 
- * - * string prefix = 3; - * - * @return This builder for chaining. - */ - public Builder clearPrefix() { - - prefix_ = getDefaultInstance().getPrefix(); - onChanged(); - return this; - } - /** - * - * - *
-       * A list of snapshot names created in this schedule.
-       * 
- * - * string prefix = 3; - * - * @param value The bytes for prefix to set. - * @return This builder for chaining. - */ - public Builder setPrefixBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - prefix_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule) - } - - // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule) - private static final com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule(); - } - - public static com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Schedule parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Schedule(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Output only. The name of the snapshot schedule policy.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The name of the snapshot schedule policy.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 2; - private volatile java.lang.Object description_; - /** - * - * - *
-   * The description of the snapshot schedule policy.
-   * 
- * - * string description = 2; - * - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - * - * - *
-   * The description of the snapshot schedule policy.
-   * 
- * - * string description = 2; - * - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCHEDULES_FIELD_NUMBER = 3; - private java.util.List - schedules_; - /** - * - * - *
-   * The snapshot schedules contained in this policy. You can specify a maximum
-   *  of 5 schedules.
-   * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule schedules = 3; - * - */ - @java.lang.Override - public java.util.List - getSchedulesList() { - return schedules_; - } - /** - * - * - *
-   * The snapshot schedules contained in this policy. You can specify a maximum
-   *  of 5 schedules.
-   * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule schedules = 3; - * - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.ScheduleOrBuilder> - getSchedulesOrBuilderList() { - return schedules_; - } - /** - * - * - *
-   * The snapshot schedules contained in this policy. You can specify a maximum
-   *  of 5 schedules.
-   * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule schedules = 3; - * - */ - @java.lang.Override - public int getSchedulesCount() { - return schedules_.size(); - } - /** - * - * - *
-   * The snapshot schedules contained in this policy. You can specify a maximum
-   *  of 5 schedules.
-   * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule schedules = 3; - * - */ - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule getSchedules( - int index) { - return schedules_.get(index); - } - /** - * - * - *
-   * The snapshot schedules contained in this policy. You can specify a maximum
-   *  of 5 schedules.
-   * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule schedules = 3; - * - */ - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.ScheduleOrBuilder - getSchedulesOrBuilder(int index) { - return schedules_.get(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); - } - for (int i = 0; i < schedules_.size(); i++) { - output.writeMessage(3, schedules_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); - } - for (int i = 0; i < schedules_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, schedules_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy)) { - return super.equals(obj); - } - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy other = - (com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy) obj; - - if (!getName().equals(other.getName())) return false; - if (!getDescription().equals(other.getDescription())) return false; - if (!getSchedulesList().equals(other.getSchedulesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (getSchedulesCount() > 0) { - hash = (37 * hash) + SCHEDULES_FIELD_NUMBER; - hash = (53 * hash) + getSchedulesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A snapshot schedule policy.
-   * 
- * - * Protobuf type {@code google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy) - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_SnapshotSchedulePolicy_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_SnapshotSchedulePolicy_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.class, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Builder.class); - } - - // Construct using com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getSchedulesFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - description_ = ""; - - if (schedulesBuilder_ == null) { - schedules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - schedulesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_SnapshotSchedulePolicy_descriptor; - } - - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy - getDefaultInstanceForType() { - return com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy build() { - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy buildPartial() { - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy result = - new com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.description_ = description_; - if (schedulesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - schedules_ = java.util.Collections.unmodifiableList(schedules_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.schedules_ = schedules_; - } else { - result.schedules_ = schedulesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy) { - return mergeFrom((com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy other) { - if (other - == com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (schedulesBuilder_ == null) { - if (!other.schedules_.isEmpty()) { - if (schedules_.isEmpty()) { - schedules_ = other.schedules_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSchedulesIsMutable(); - schedules_.addAll(other.schedules_); - } - onChanged(); - } - } else { - if (!other.schedules_.isEmpty()) { - if (schedulesBuilder_.isEmpty()) { - schedulesBuilder_.dispose(); - schedulesBuilder_ = null; - schedules_ = other.schedules_; - bitField0_ = (bitField0_ & ~0x00000001); - schedulesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getSchedulesFieldBuilder() - : null; - } else { - schedulesBuilder_.addAllMessages(other.schedules_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Output only. The name of the snapshot schedule policy.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The name of the snapshot schedule policy.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The name of the snapshot schedule policy.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The name of the snapshot schedule policy.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The name of the snapshot schedule policy.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - * - * - *
-     * The description of the snapshot schedule policy.
-     * 
- * - * string description = 2; - * - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The description of the snapshot schedule policy.
-     * 
- * - * string description = 2; - * - * @return The bytes for description. - */ - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The description of the snapshot schedule policy.
-     * 
- * - * string description = 2; - * - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The description of the snapshot schedule policy.
-     * 
- * - * string description = 2; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * - * - *
-     * The description of the snapshot schedule policy.
-     * 
- * - * string description = 2; - * - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private java.util.List - schedules_ = java.util.Collections.emptyList(); - - private void ensureSchedulesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - schedules_ = - new java.util.ArrayList< - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule>(schedules_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule.Builder, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.ScheduleOrBuilder> - schedulesBuilder_; - - /** - * - * - *
-     * The snapshot schedules contained in this policy. You can specify a maximum
-     *  of 5 schedules.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule schedules = 3; - * - */ - public java.util.List - getSchedulesList() { - if (schedulesBuilder_ == null) { - return java.util.Collections.unmodifiableList(schedules_); - } else { - return schedulesBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The snapshot schedules contained in this policy. You can specify a maximum
-     *  of 5 schedules.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule schedules = 3; - * - */ - public int getSchedulesCount() { - if (schedulesBuilder_ == null) { - return schedules_.size(); - } else { - return schedulesBuilder_.getCount(); - } - } - /** - * - * - *
-     * The snapshot schedules contained in this policy. You can specify a maximum
-     *  of 5 schedules.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule schedules = 3; - * - */ - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule getSchedules( - int index) { - if (schedulesBuilder_ == null) { - return schedules_.get(index); - } else { - return schedulesBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The snapshot schedules contained in this policy. You can specify a maximum
-     *  of 5 schedules.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule schedules = 3; - * - */ - public Builder setSchedules( - int index, com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule value) { - if (schedulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSchedulesIsMutable(); - schedules_.set(index, value); - onChanged(); - } else { - schedulesBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The snapshot schedules contained in this policy. You can specify a maximum
-     *  of 5 schedules.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule schedules = 3; - * - */ - public Builder setSchedules( - int index, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule.Builder - builderForValue) { - if (schedulesBuilder_ == null) { - ensureSchedulesIsMutable(); - schedules_.set(index, builderForValue.build()); - onChanged(); - } else { - schedulesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The snapshot schedules contained in this policy. You can specify a maximum
-     *  of 5 schedules.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule schedules = 3; - * - */ - public Builder addSchedules( - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule value) { - if (schedulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSchedulesIsMutable(); - schedules_.add(value); - onChanged(); - } else { - schedulesBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The snapshot schedules contained in this policy. You can specify a maximum
-     *  of 5 schedules.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule schedules = 3; - * - */ - public Builder addSchedules( - int index, com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule value) { - if (schedulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSchedulesIsMutable(); - schedules_.add(index, value); - onChanged(); - } else { - schedulesBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The snapshot schedules contained in this policy. You can specify a maximum
-     *  of 5 schedules.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule schedules = 3; - * - */ - public Builder addSchedules( - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule.Builder - builderForValue) { - if (schedulesBuilder_ == null) { - ensureSchedulesIsMutable(); - schedules_.add(builderForValue.build()); - onChanged(); - } else { - schedulesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The snapshot schedules contained in this policy. You can specify a maximum
-     *  of 5 schedules.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule schedules = 3; - * - */ - public Builder addSchedules( - int index, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule.Builder - builderForValue) { - if (schedulesBuilder_ == null) { - ensureSchedulesIsMutable(); - schedules_.add(index, builderForValue.build()); - onChanged(); - } else { - schedulesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The snapshot schedules contained in this policy. You can specify a maximum
-     *  of 5 schedules.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule schedules = 3; - * - */ - public Builder addAllSchedules( - java.lang.Iterable< - ? extends com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule> - values) { - if (schedulesBuilder_ == null) { - ensureSchedulesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, schedules_); - onChanged(); - } else { - schedulesBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The snapshot schedules contained in this policy. You can specify a maximum
-     *  of 5 schedules.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule schedules = 3; - * - */ - public Builder clearSchedules() { - if (schedulesBuilder_ == null) { - schedules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - schedulesBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The snapshot schedules contained in this policy. You can specify a maximum
-     *  of 5 schedules.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule schedules = 3; - * - */ - public Builder removeSchedules(int index) { - if (schedulesBuilder_ == null) { - ensureSchedulesIsMutable(); - schedules_.remove(index); - onChanged(); - } else { - schedulesBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The snapshot schedules contained in this policy. You can specify a maximum
-     *  of 5 schedules.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule schedules = 3; - * - */ - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule.Builder - getSchedulesBuilder(int index) { - return getSchedulesFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The snapshot schedules contained in this policy. You can specify a maximum
-     *  of 5 schedules.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule schedules = 3; - * - */ - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.ScheduleOrBuilder - getSchedulesOrBuilder(int index) { - if (schedulesBuilder_ == null) { - return schedules_.get(index); - } else { - return schedulesBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The snapshot schedules contained in this policy. You can specify a maximum
-     *  of 5 schedules.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule schedules = 3; - * - */ - public java.util.List< - ? extends - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.ScheduleOrBuilder> - getSchedulesOrBuilderList() { - if (schedulesBuilder_ != null) { - return schedulesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(schedules_); - } - } - /** - * - * - *
-     * The snapshot schedules contained in this policy. You can specify a maximum
-     *  of 5 schedules.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule schedules = 3; - * - */ - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule.Builder - addSchedulesBuilder() { - return getSchedulesFieldBuilder() - .addBuilder( - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule - .getDefaultInstance()); - } - /** - * - * - *
-     * The snapshot schedules contained in this policy. You can specify a maximum
-     *  of 5 schedules.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule schedules = 3; - * - */ - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule.Builder - addSchedulesBuilder(int index) { - return getSchedulesFieldBuilder() - .addBuilder( - index, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule - .getDefaultInstance()); - } - /** - * - * - *
-     * The snapshot schedules contained in this policy. You can specify a maximum
-     *  of 5 schedules.
-     * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule schedules = 3; - * - */ - public java.util.List< - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule.Builder> - getSchedulesBuilderList() { - return getSchedulesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule.Builder, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.ScheduleOrBuilder> - getSchedulesFieldBuilder() { - if (schedulesBuilder_ == null) { - schedulesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule.Builder, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.ScheduleOrBuilder>( - schedules_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - schedules_ = null; - } - return schedulesBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy) - } - - // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy) - private static final com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy(); - } - - public static com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SnapshotSchedulePolicy parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SnapshotSchedulePolicy(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/SnapshotSchedulePolicyOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/SnapshotSchedulePolicyOrBuilder.java deleted file mode 100644 index 39337b6216ce..000000000000 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/SnapshotSchedulePolicyOrBuilder.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto - -package com.google.cloud.baremetalsolution.v2; - -public interface SnapshotSchedulePolicyOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The name of the snapshot schedule policy.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Output only. The name of the snapshot schedule policy.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * The description of the snapshot schedule policy.
-   * 
- * - * string description = 2; - * - * @return The description. - */ - java.lang.String getDescription(); - /** - * - * - *
-   * The description of the snapshot schedule policy.
-   * 
- * - * string description = 2; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); - - /** - * - * - *
-   * The snapshot schedules contained in this policy. You can specify a maximum
-   *  of 5 schedules.
-   * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule schedules = 3; - * - */ - java.util.List - getSchedulesList(); - /** - * - * - *
-   * The snapshot schedules contained in this policy. You can specify a maximum
-   *  of 5 schedules.
-   * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule schedules = 3; - * - */ - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule getSchedules(int index); - /** - * - * - *
-   * The snapshot schedules contained in this policy. You can specify a maximum
-   *  of 5 schedules.
-   * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule schedules = 3; - * - */ - int getSchedulesCount(); - /** - * - * - *
-   * The snapshot schedules contained in this policy. You can specify a maximum
-   *  of 5 schedules.
-   * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule schedules = 3; - * - */ - java.util.List< - ? extends com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.ScheduleOrBuilder> - getSchedulesOrBuilderList(); - /** - * - * - *
-   * The snapshot schedules contained in this policy. You can specify a maximum
-   *  of 5 schedules.
-   * 
- * - * - * repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule schedules = 3; - * - */ - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.ScheduleOrBuilder - getSchedulesOrBuilder(int index); -} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetSnapshotSchedulePolicyRequest.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/StartInstanceRequest.java similarity index 70% rename from java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetSnapshotSchedulePolicyRequest.java rename to java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/StartInstanceRequest.java index 93a14b001b02..bde55372718c 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetSnapshotSchedulePolicyRequest.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/StartInstanceRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/instance.proto package com.google.cloud.baremetalsolution.v2; @@ -22,30 +22,29 @@ * * *
- * Message for requesting snapshot schedule policy information.
+ * Message requesting to start a server.
  * 
* - * Protobuf type {@code google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest} + * Protobuf type {@code google.cloud.baremetalsolution.v2.StartInstanceRequest} */ -public final class GetSnapshotSchedulePolicyRequest extends com.google.protobuf.GeneratedMessageV3 +public final class StartInstanceRequest extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest) - GetSnapshotSchedulePolicyRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.StartInstanceRequest) + StartInstanceRequestOrBuilder { private static final long serialVersionUID = 0L; - // Use GetSnapshotSchedulePolicyRequest.newBuilder() to construct. - private GetSnapshotSchedulePolicyRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use StartInstanceRequest.newBuilder() to construct. + private StartInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private GetSnapshotSchedulePolicyRequest() { + private StartInstanceRequest() { name_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetSnapshotSchedulePolicyRequest(); + return new StartInstanceRequest(); } @java.lang.Override @@ -53,7 +52,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetSnapshotSchedulePolicyRequest( + private StartInstanceRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -100,18 +99,18 @@ private GetSnapshotSchedulePolicyRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_GetSnapshotSchedulePolicyRequest_descriptor; + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_StartInstanceRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_GetSnapshotSchedulePolicyRequest_fieldAccessorTable + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_StartInstanceRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest.class, - com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest.Builder.class); + com.google.cloud.baremetalsolution.v2.StartInstanceRequest.class, + com.google.cloud.baremetalsolution.v2.StartInstanceRequest.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; @@ -206,11 +205,11 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest)) { + if (!(obj instanceof com.google.cloud.baremetalsolution.v2.StartInstanceRequest)) { return super.equals(obj); } - com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest other = - (com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest) obj; + com.google.cloud.baremetalsolution.v2.StartInstanceRequest other = + (com.google.cloud.baremetalsolution.v2.StartInstanceRequest) obj; if (!getName().equals(other.getName())) return false; if (!unknownFields.equals(other.unknownFields)) return false; @@ -231,72 +230,71 @@ public int hashCode() { return hash; } - public static com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.StartInstanceRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.StartInstanceRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.StartInstanceRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.StartInstanceRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.baremetalsolution.v2.StartInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.StartInstanceRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.StartInstanceRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.StartInstanceRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + public static com.google.cloud.baremetalsolution.v2.StartInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + public static com.google.cloud.baremetalsolution.v2.StartInstanceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.StartInstanceRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.StartInstanceRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -314,7 +312,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest prototype) { + com.google.cloud.baremetalsolution.v2.StartInstanceRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -332,32 +330,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Message for requesting snapshot schedule policy information.
+   * Message requesting to start a server.
    * 
* - * Protobuf type {@code google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest} + * Protobuf type {@code google.cloud.baremetalsolution.v2.StartInstanceRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest) - com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.StartInstanceRequest) + com.google.cloud.baremetalsolution.v2.StartInstanceRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_GetSnapshotSchedulePolicyRequest_descriptor; + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_StartInstanceRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_GetSnapshotSchedulePolicyRequest_fieldAccessorTable + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_StartInstanceRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest.class, - com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest.Builder.class); + com.google.cloud.baremetalsolution.v2.StartInstanceRequest.class, + com.google.cloud.baremetalsolution.v2.StartInstanceRequest.Builder.class); } - // Construct using - // com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest.newBuilder() + // Construct using com.google.cloud.baremetalsolution.v2.StartInstanceRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -381,21 +378,18 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_GetSnapshotSchedulePolicyRequest_descriptor; + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_StartInstanceRequest_descriptor; } @java.lang.Override - public com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest - getDefaultInstanceForType() { - return com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest - .getDefaultInstance(); + public com.google.cloud.baremetalsolution.v2.StartInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.baremetalsolution.v2.StartInstanceRequest.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest build() { - com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest result = - buildPartial(); + public com.google.cloud.baremetalsolution.v2.StartInstanceRequest build() { + com.google.cloud.baremetalsolution.v2.StartInstanceRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -403,9 +397,9 @@ public com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest bu } @java.lang.Override - public com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest buildPartial() { - com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest result = - new com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest(this); + public com.google.cloud.baremetalsolution.v2.StartInstanceRequest buildPartial() { + com.google.cloud.baremetalsolution.v2.StartInstanceRequest result = + new com.google.cloud.baremetalsolution.v2.StartInstanceRequest(this); result.name_ = name_; onBuilt(); return result; @@ -446,20 +440,17 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest) { - return mergeFrom( - (com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest) other); + if (other instanceof com.google.cloud.baremetalsolution.v2.StartInstanceRequest) { + return mergeFrom((com.google.cloud.baremetalsolution.v2.StartInstanceRequest) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom( - com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest other) { - if (other - == com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest - .getDefaultInstance()) return this; + public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.StartInstanceRequest other) { + if (other == com.google.cloud.baremetalsolution.v2.StartInstanceRequest.getDefaultInstance()) + return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); @@ -479,13 +470,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest parsedMessage = null; + com.google.cloud.baremetalsolution.v2.StartInstanceRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest) - e.getUnfinishedMessage(); + (com.google.cloud.baremetalsolution.v2.StartInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -622,45 +612,42 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest) + // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.StartInstanceRequest) } - // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest) - private static final com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest - DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.StartInstanceRequest) + private static final com.google.cloud.baremetalsolution.v2.StartInstanceRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest(); + DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.StartInstanceRequest(); } - public static com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest - getDefaultInstance() { + public static com.google.cloud.baremetalsolution.v2.StartInstanceRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public GetSnapshotSchedulePolicyRequest parsePartialFrom( + public StartInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetSnapshotSchedulePolicyRequest(input, extensionRegistry); + return new StartInstanceRequest(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest - getDefaultInstanceForType() { + public com.google.cloud.baremetalsolution.v2.StartInstanceRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetSnapshotSchedulePolicyRequestOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/StartInstanceRequestOrBuilder.java similarity index 88% rename from java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetSnapshotSchedulePolicyRequestOrBuilder.java rename to java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/StartInstanceRequestOrBuilder.java index 29fe11e673b8..4cb55b2dd40a 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/GetSnapshotSchedulePolicyRequestOrBuilder.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/StartInstanceRequestOrBuilder.java @@ -14,13 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/instance.proto package com.google.cloud.baremetalsolution.v2; -public interface GetSnapshotSchedulePolicyRequestOrBuilder +public interface StartInstanceRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.GetSnapshotSchedulePolicyRequest) + // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.StartInstanceRequest) com.google.protobuf.MessageOrBuilder { /** diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/StartInstanceResponse.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/StartInstanceResponse.java new file mode 100644 index 000000000000..c708c7e8cf83 --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/StartInstanceResponse.java @@ -0,0 +1,459 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/baremetalsolution/v2/instance.proto + +package com.google.cloud.baremetalsolution.v2; + +/** + * + * + *
+ * Response message from starting a server.
+ * 
+ * + * Protobuf type {@code google.cloud.baremetalsolution.v2.StartInstanceResponse} + */ +public final class StartInstanceResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.StartInstanceResponse) + StartInstanceResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use StartInstanceResponse.newBuilder() to construct. + private StartInstanceResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StartInstanceResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StartInstanceResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StartInstanceResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_StartInstanceResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_StartInstanceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.baremetalsolution.v2.StartInstanceResponse.class, + com.google.cloud.baremetalsolution.v2.StartInstanceResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.baremetalsolution.v2.StartInstanceResponse)) { + return super.equals(obj); + } + com.google.cloud.baremetalsolution.v2.StartInstanceResponse other = + (com.google.cloud.baremetalsolution.v2.StartInstanceResponse) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.baremetalsolution.v2.StartInstanceResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.StartInstanceResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.StartInstanceResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.StartInstanceResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.StartInstanceResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.StartInstanceResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.StartInstanceResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.StartInstanceResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.StartInstanceResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.StartInstanceResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.StartInstanceResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.StartInstanceResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.baremetalsolution.v2.StartInstanceResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message from starting a server.
+   * 
+ * + * Protobuf type {@code google.cloud.baremetalsolution.v2.StartInstanceResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.StartInstanceResponse) + com.google.cloud.baremetalsolution.v2.StartInstanceResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_StartInstanceResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_StartInstanceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.baremetalsolution.v2.StartInstanceResponse.class, + com.google.cloud.baremetalsolution.v2.StartInstanceResponse.Builder.class); + } + + // Construct using com.google.cloud.baremetalsolution.v2.StartInstanceResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_StartInstanceResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.StartInstanceResponse getDefaultInstanceForType() { + return com.google.cloud.baremetalsolution.v2.StartInstanceResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.StartInstanceResponse build() { + com.google.cloud.baremetalsolution.v2.StartInstanceResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.StartInstanceResponse buildPartial() { + com.google.cloud.baremetalsolution.v2.StartInstanceResponse result = + new com.google.cloud.baremetalsolution.v2.StartInstanceResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.baremetalsolution.v2.StartInstanceResponse) { + return mergeFrom((com.google.cloud.baremetalsolution.v2.StartInstanceResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.StartInstanceResponse other) { + if (other == com.google.cloud.baremetalsolution.v2.StartInstanceResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.baremetalsolution.v2.StartInstanceResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.baremetalsolution.v2.StartInstanceResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.StartInstanceResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.StartInstanceResponse) + private static final com.google.cloud.baremetalsolution.v2.StartInstanceResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.StartInstanceResponse(); + } + + public static com.google.cloud.baremetalsolution.v2.StartInstanceResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StartInstanceResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StartInstanceResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.StartInstanceResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/StartInstanceResponseOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/StartInstanceResponseOrBuilder.java new file mode 100644 index 000000000000..a4673c63a591 --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/StartInstanceResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/baremetalsolution/v2/instance.proto + +package com.google.cloud.baremetalsolution.v2; + +public interface StartInstanceResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.StartInstanceResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/DeleteVolumeSnapshotRequest.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/StopInstanceRequest.java similarity index 70% rename from java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/DeleteVolumeSnapshotRequest.java rename to java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/StopInstanceRequest.java index 9359b72003e9..ca5b555d5120 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/DeleteVolumeSnapshotRequest.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/StopInstanceRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/instance.proto package com.google.cloud.baremetalsolution.v2; @@ -22,29 +22,29 @@ * * *
- * Message for deleting named Volume snapshot.
+ * Message requesting to stop a server.
  * 
* - * Protobuf type {@code google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest} + * Protobuf type {@code google.cloud.baremetalsolution.v2.StopInstanceRequest} */ -public final class DeleteVolumeSnapshotRequest extends com.google.protobuf.GeneratedMessageV3 +public final class StopInstanceRequest extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest) - DeleteVolumeSnapshotRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.StopInstanceRequest) + StopInstanceRequestOrBuilder { private static final long serialVersionUID = 0L; - // Use DeleteVolumeSnapshotRequest.newBuilder() to construct. - private DeleteVolumeSnapshotRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use StopInstanceRequest.newBuilder() to construct. + private StopInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private DeleteVolumeSnapshotRequest() { + private StopInstanceRequest() { name_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteVolumeSnapshotRequest(); + return new StopInstanceRequest(); } @java.lang.Override @@ -52,7 +52,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteVolumeSnapshotRequest( + private StopInstanceRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -99,18 +99,18 @@ private DeleteVolumeSnapshotRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_DeleteVolumeSnapshotRequest_descriptor; + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_StopInstanceRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_DeleteVolumeSnapshotRequest_fieldAccessorTable + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_StopInstanceRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest.class, - com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest.Builder.class); + com.google.cloud.baremetalsolution.v2.StopInstanceRequest.class, + com.google.cloud.baremetalsolution.v2.StopInstanceRequest.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; @@ -119,7 +119,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The name of the snapshot to delete.
+   * Required. Name of the resource.
    * 
* * @@ -144,7 +144,7 @@ public java.lang.String getName() { * * *
-   * Required. The name of the snapshot to delete.
+   * Required. Name of the resource.
    * 
* * @@ -205,11 +205,11 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest)) { + if (!(obj instanceof com.google.cloud.baremetalsolution.v2.StopInstanceRequest)) { return super.equals(obj); } - com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest other = - (com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest) obj; + com.google.cloud.baremetalsolution.v2.StopInstanceRequest other = + (com.google.cloud.baremetalsolution.v2.StopInstanceRequest) obj; if (!getName().equals(other.getName())) return false; if (!unknownFields.equals(other.unknownFields)) return false; @@ -230,72 +230,71 @@ public int hashCode() { return hash; } - public static com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.StopInstanceRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.StopInstanceRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.StopInstanceRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.StopInstanceRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.baremetalsolution.v2.StopInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.StopInstanceRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.StopInstanceRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.StopInstanceRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + public static com.google.cloud.baremetalsolution.v2.StopInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + public static com.google.cloud.baremetalsolution.v2.StopInstanceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.StopInstanceRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.StopInstanceRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -313,7 +312,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest prototype) { + com.google.cloud.baremetalsolution.v2.StopInstanceRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -331,32 +330,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Message for deleting named Volume snapshot.
+   * Message requesting to stop a server.
    * 
* - * Protobuf type {@code google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest} + * Protobuf type {@code google.cloud.baremetalsolution.v2.StopInstanceRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest) - com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.StopInstanceRequest) + com.google.cloud.baremetalsolution.v2.StopInstanceRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_DeleteVolumeSnapshotRequest_descriptor; + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_StopInstanceRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_DeleteVolumeSnapshotRequest_fieldAccessorTable + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_StopInstanceRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest.class, - com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest.Builder.class); + com.google.cloud.baremetalsolution.v2.StopInstanceRequest.class, + com.google.cloud.baremetalsolution.v2.StopInstanceRequest.Builder.class); } - // Construct using - // com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest.newBuilder() + // Construct using com.google.cloud.baremetalsolution.v2.StopInstanceRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -380,19 +378,18 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_DeleteVolumeSnapshotRequest_descriptor; + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_StopInstanceRequest_descriptor; } @java.lang.Override - public com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest - getDefaultInstanceForType() { - return com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest.getDefaultInstance(); + public com.google.cloud.baremetalsolution.v2.StopInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.baremetalsolution.v2.StopInstanceRequest.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest build() { - com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest result = buildPartial(); + public com.google.cloud.baremetalsolution.v2.StopInstanceRequest build() { + com.google.cloud.baremetalsolution.v2.StopInstanceRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -400,9 +397,9 @@ public com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest build() } @java.lang.Override - public com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest buildPartial() { - com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest result = - new com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest(this); + public com.google.cloud.baremetalsolution.v2.StopInstanceRequest buildPartial() { + com.google.cloud.baremetalsolution.v2.StopInstanceRequest result = + new com.google.cloud.baremetalsolution.v2.StopInstanceRequest(this); result.name_ = name_; onBuilt(); return result; @@ -443,18 +440,16 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest) { - return mergeFrom((com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest) other); + if (other instanceof com.google.cloud.baremetalsolution.v2.StopInstanceRequest) { + return mergeFrom((com.google.cloud.baremetalsolution.v2.StopInstanceRequest) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom( - com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest other) { - if (other - == com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.StopInstanceRequest other) { + if (other == com.google.cloud.baremetalsolution.v2.StopInstanceRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; @@ -475,13 +470,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest parsedMessage = null; + com.google.cloud.baremetalsolution.v2.StopInstanceRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest) - e.getUnfinishedMessage(); + (com.google.cloud.baremetalsolution.v2.StopInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -496,7 +490,7 @@ public Builder mergeFrom( * * *
-     * Required. The name of the snapshot to delete.
+     * Required. Name of the resource.
      * 
* * @@ -520,7 +514,7 @@ public java.lang.String getName() { * * *
-     * Required. The name of the snapshot to delete.
+     * Required. Name of the resource.
      * 
* * @@ -544,7 +538,7 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Required. The name of the snapshot to delete.
+     * Required. Name of the resource.
      * 
* * @@ -567,7 +561,7 @@ public Builder setName(java.lang.String value) { * * *
-     * Required. The name of the snapshot to delete.
+     * Required. Name of the resource.
      * 
* * @@ -586,7 +580,7 @@ public Builder clearName() { * * *
-     * Required. The name of the snapshot to delete.
+     * Required. Name of the resource.
      * 
* * @@ -618,45 +612,42 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest) + // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.StopInstanceRequest) } - // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest) - private static final com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest - DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.StopInstanceRequest) + private static final com.google.cloud.baremetalsolution.v2.StopInstanceRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest(); + DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.StopInstanceRequest(); } - public static com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest - getDefaultInstance() { + public static com.google.cloud.baremetalsolution.v2.StopInstanceRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public DeleteVolumeSnapshotRequest parsePartialFrom( + public StopInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteVolumeSnapshotRequest(input, extensionRegistry); + return new StopInstanceRequest(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest - getDefaultInstanceForType() { + public com.google.cloud.baremetalsolution.v2.StopInstanceRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/DeleteVolumeSnapshotRequestOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/StopInstanceRequestOrBuilder.java similarity index 82% rename from java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/DeleteVolumeSnapshotRequestOrBuilder.java rename to java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/StopInstanceRequestOrBuilder.java index 07a218df204d..4b93ef832e1c 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/DeleteVolumeSnapshotRequestOrBuilder.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/StopInstanceRequestOrBuilder.java @@ -14,20 +14,20 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/instance.proto package com.google.cloud.baremetalsolution.v2; -public interface DeleteVolumeSnapshotRequestOrBuilder +public interface StopInstanceRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest) + // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.StopInstanceRequest) com.google.protobuf.MessageOrBuilder { /** * * *
-   * Required. The name of the snapshot to delete.
+   * Required. Name of the resource.
    * 
* * @@ -41,7 +41,7 @@ public interface DeleteVolumeSnapshotRequestOrBuilder * * *
-   * Required. The name of the snapshot to delete.
+   * Required. Name of the resource.
    * 
* * diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/StopInstanceResponse.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/StopInstanceResponse.java new file mode 100644 index 000000000000..182ad2204295 --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/StopInstanceResponse.java @@ -0,0 +1,459 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/baremetalsolution/v2/instance.proto + +package com.google.cloud.baremetalsolution.v2; + +/** + * + * + *
+ * Response message from stopping a server.
+ * 
+ * + * Protobuf type {@code google.cloud.baremetalsolution.v2.StopInstanceResponse} + */ +public final class StopInstanceResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.StopInstanceResponse) + StopInstanceResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use StopInstanceResponse.newBuilder() to construct. + private StopInstanceResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StopInstanceResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StopInstanceResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StopInstanceResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_StopInstanceResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_StopInstanceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.baremetalsolution.v2.StopInstanceResponse.class, + com.google.cloud.baremetalsolution.v2.StopInstanceResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.baremetalsolution.v2.StopInstanceResponse)) { + return super.equals(obj); + } + com.google.cloud.baremetalsolution.v2.StopInstanceResponse other = + (com.google.cloud.baremetalsolution.v2.StopInstanceResponse) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.baremetalsolution.v2.StopInstanceResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.StopInstanceResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.StopInstanceResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.StopInstanceResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.StopInstanceResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.StopInstanceResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.StopInstanceResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.StopInstanceResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.StopInstanceResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.StopInstanceResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.StopInstanceResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.StopInstanceResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.baremetalsolution.v2.StopInstanceResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message from stopping a server.
+   * 
+ * + * Protobuf type {@code google.cloud.baremetalsolution.v2.StopInstanceResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.StopInstanceResponse) + com.google.cloud.baremetalsolution.v2.StopInstanceResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_StopInstanceResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_StopInstanceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.baremetalsolution.v2.StopInstanceResponse.class, + com.google.cloud.baremetalsolution.v2.StopInstanceResponse.Builder.class); + } + + // Construct using com.google.cloud.baremetalsolution.v2.StopInstanceResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_StopInstanceResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.StopInstanceResponse getDefaultInstanceForType() { + return com.google.cloud.baremetalsolution.v2.StopInstanceResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.StopInstanceResponse build() { + com.google.cloud.baremetalsolution.v2.StopInstanceResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.StopInstanceResponse buildPartial() { + com.google.cloud.baremetalsolution.v2.StopInstanceResponse result = + new com.google.cloud.baremetalsolution.v2.StopInstanceResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.baremetalsolution.v2.StopInstanceResponse) { + return mergeFrom((com.google.cloud.baremetalsolution.v2.StopInstanceResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.StopInstanceResponse other) { + if (other == com.google.cloud.baremetalsolution.v2.StopInstanceResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.baremetalsolution.v2.StopInstanceResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.baremetalsolution.v2.StopInstanceResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.StopInstanceResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.StopInstanceResponse) + private static final com.google.cloud.baremetalsolution.v2.StopInstanceResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.StopInstanceResponse(); + } + + public static com.google.cloud.baremetalsolution.v2.StopInstanceResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StopInstanceResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StopInstanceResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.StopInstanceResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/StopInstanceResponseOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/StopInstanceResponseOrBuilder.java new file mode 100644 index 000000000000..0e0f7b9136bb --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/StopInstanceResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/baremetalsolution/v2/instance.proto + +package com.google.cloud.baremetalsolution.v2; + +public interface StopInstanceResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.StopInstanceResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/UpdateInstanceRequest.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/UpdateInstanceRequest.java new file mode 100644 index 000000000000..867bf6534cf5 --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/UpdateInstanceRequest.java @@ -0,0 +1,1105 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/baremetalsolution/v2/instance.proto + +package com.google.cloud.baremetalsolution.v2; + +/** + * + * + *
+ * Message requesting to updating a server.
+ * 
+ * + * Protobuf type {@code google.cloud.baremetalsolution.v2.UpdateInstanceRequest} + */ +public final class UpdateInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.UpdateInstanceRequest) + UpdateInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateInstanceRequest.newBuilder() to construct. + private UpdateInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateInstanceRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateInstanceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateInstanceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.baremetalsolution.v2.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = + input.readMessage( + com.google.cloud.baremetalsolution.v2.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_UpdateInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_UpdateInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest.class, + com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private com.google.cloud.baremetalsolution.v2.Instance instance_; + /** + * + * + *
+   * Required. The server to update.
+   * The `name` field is used to identify the instance to update.
+   * Format: projects/{project}/locations/{location}/instances/{instance}
+   * 
+ * + * + * .google.cloud.baremetalsolution.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the instance field is set. + */ + @java.lang.Override + public boolean hasInstance() { + return instance_ != null; + } + /** + * + * + *
+   * Required. The server to update.
+   * The `name` field is used to identify the instance to update.
+   * Format: projects/{project}/locations/{location}/instances/{instance}
+   * 
+ * + * + * .google.cloud.baremetalsolution.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instance. + */ + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.Instance getInstance() { + return instance_ == null + ? com.google.cloud.baremetalsolution.v2.Instance.getDefaultInstance() + : instance_; + } + /** + * + * + *
+   * Required. The server to update.
+   * The `name` field is used to identify the instance to update.
+   * Format: projects/{project}/locations/{location}/instances/{instance}
+   * 
+ * + * + * .google.cloud.baremetalsolution.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * The list of fields to update.
+   * The currently supported fields are:
+   *   `labels`
+   *   `hyperthreading_enabled`
+   *   `os_image`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * The list of fields to update.
+   * The currently supported fields are:
+   *   `labels`
+   *   `hyperthreading_enabled`
+   *   `os_image`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * The list of fields to update.
+   * The currently supported fields are:
+   *   `labels`
+   *   `hyperthreading_enabled`
+   *   `os_image`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (instance_ != null) { + output.writeMessage(1, getInstance()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInstance()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest other = + (com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest) obj; + + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance().equals(other.getInstance())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Message requesting to updating a server.
+   * 
+ * + * Protobuf type {@code google.cloud.baremetalsolution.v2.UpdateInstanceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.UpdateInstanceRequest) + com.google.cloud.baremetalsolution.v2.UpdateInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_UpdateInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_UpdateInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest.class, + com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.baremetalsolution.v2.InstanceProto + .internal_static_google_cloud_baremetalsolution_v2_UpdateInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest build() { + com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest buildPartial() { + com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest result = + new com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest(this); + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest) { + return mergeFrom((com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest other) { + if (other == com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest.getDefaultInstance()) + return this; + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.baremetalsolution.v2.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.baremetalsolution.v2.Instance, + com.google.cloud.baremetalsolution.v2.Instance.Builder, + com.google.cloud.baremetalsolution.v2.InstanceOrBuilder> + instanceBuilder_; + /** + * + * + *
+     * Required. The server to update.
+     * The `name` field is used to identify the instance to update.
+     * Format: projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * + * .google.cloud.baremetalsolution.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + * + * + *
+     * Required. The server to update.
+     * The `name` field is used to identify the instance to update.
+     * Format: projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * + * .google.cloud.baremetalsolution.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instance. + */ + public com.google.cloud.baremetalsolution.v2.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null + ? com.google.cloud.baremetalsolution.v2.Instance.getDefaultInstance() + : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The server to update.
+     * The `name` field is used to identify the instance to update.
+     * Format: projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * + * .google.cloud.baremetalsolution.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInstance(com.google.cloud.baremetalsolution.v2.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The server to update.
+     * The `name` field is used to identify the instance to update.
+     * Format: projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * + * .google.cloud.baremetalsolution.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInstance( + com.google.cloud.baremetalsolution.v2.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The server to update.
+     * The `name` field is used to identify the instance to update.
+     * Format: projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * + * .google.cloud.baremetalsolution.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeInstance(com.google.cloud.baremetalsolution.v2.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + com.google.cloud.baremetalsolution.v2.Instance.newBuilder(instance_) + .mergeFrom(value) + .buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The server to update.
+     * The `name` field is used to identify the instance to update.
+     * Format: projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * + * .google.cloud.baremetalsolution.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The server to update.
+     * The `name` field is used to identify the instance to update.
+     * Format: projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * + * .google.cloud.baremetalsolution.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.baremetalsolution.v2.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The server to update.
+     * The `name` field is used to identify the instance to update.
+     * Format: projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * + * .google.cloud.baremetalsolution.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.baremetalsolution.v2.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null + ? com.google.cloud.baremetalsolution.v2.Instance.getDefaultInstance() + : instance_; + } + } + /** + * + * + *
+     * Required. The server to update.
+     * The `name` field is used to identify the instance to update.
+     * Format: projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * + * .google.cloud.baremetalsolution.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.baremetalsolution.v2.Instance, + com.google.cloud.baremetalsolution.v2.Instance.Builder, + com.google.cloud.baremetalsolution.v2.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.baremetalsolution.v2.Instance, + com.google.cloud.baremetalsolution.v2.Instance.Builder, + com.google.cloud.baremetalsolution.v2.InstanceOrBuilder>( + getInstance(), getParentForChildren(), isClean()); + instance_ = null; + } + return instanceBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * The list of fields to update.
+     * The currently supported fields are:
+     *   `labels`
+     *   `hyperthreading_enabled`
+     *   `os_image`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * The list of fields to update.
+     * The currently supported fields are:
+     *   `labels`
+     *   `hyperthreading_enabled`
+     *   `os_image`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The list of fields to update.
+     * The currently supported fields are:
+     *   `labels`
+     *   `hyperthreading_enabled`
+     *   `os_image`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The list of fields to update.
+     * The currently supported fields are:
+     *   `labels`
+     *   `hyperthreading_enabled`
+     *   `os_image`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The list of fields to update.
+     * The currently supported fields are:
+     *   `labels`
+     *   `hyperthreading_enabled`
+     *   `os_image`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The list of fields to update.
+     * The currently supported fields are:
+     *   `labels`
+     *   `hyperthreading_enabled`
+     *   `os_image`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The list of fields to update.
+     * The currently supported fields are:
+     *   `labels`
+     *   `hyperthreading_enabled`
+     *   `os_image`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The list of fields to update.
+     * The currently supported fields are:
+     *   `labels`
+     *   `hyperthreading_enabled`
+     *   `os_image`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * The list of fields to update.
+     * The currently supported fields are:
+     *   `labels`
+     *   `hyperthreading_enabled`
+     *   `os_image`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.UpdateInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.UpdateInstanceRequest) + private static final com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest(); + } + + public static com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateInstanceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateInstanceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/UpdateInstanceRequestOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/UpdateInstanceRequestOrBuilder.java new file mode 100644 index 000000000000..90f5ce9aee92 --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/UpdateInstanceRequestOrBuilder.java @@ -0,0 +1,119 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/baremetalsolution/v2/instance.proto + +package com.google.cloud.baremetalsolution.v2; + +public interface UpdateInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.UpdateInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The server to update.
+   * The `name` field is used to identify the instance to update.
+   * Format: projects/{project}/locations/{location}/instances/{instance}
+   * 
+ * + * + * .google.cloud.baremetalsolution.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + * + * + *
+   * Required. The server to update.
+   * The `name` field is used to identify the instance to update.
+   * Format: projects/{project}/locations/{location}/instances/{instance}
+   * 
+ * + * + * .google.cloud.baremetalsolution.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instance. + */ + com.google.cloud.baremetalsolution.v2.Instance getInstance(); + /** + * + * + *
+   * Required. The server to update.
+   * The `name` field is used to identify the instance to update.
+   * Format: projects/{project}/locations/{location}/instances/{instance}
+   * 
+ * + * + * .google.cloud.baremetalsolution.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.baremetalsolution.v2.InstanceOrBuilder getInstanceOrBuilder(); + + /** + * + * + *
+   * The list of fields to update.
+   * The currently supported fields are:
+   *   `labels`
+   *   `hyperthreading_enabled`
+   *   `os_image`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * The list of fields to update.
+   * The currently supported fields are:
+   *   `labels`
+   *   `hyperthreading_enabled`
+   *   `os_image`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * The list of fields to update.
+   * The currently supported fields are:
+   *   `labels`
+   *   `hyperthreading_enabled`
+   *   `os_image`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/UpdateSnapshotSchedulePolicyRequest.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/UpdateNetworkRequest.java similarity index 50% rename from java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/UpdateSnapshotSchedulePolicyRequest.java rename to java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/UpdateNetworkRequest.java index 9a559a1740b6..70529ea56f18 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/UpdateSnapshotSchedulePolicyRequest.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/UpdateNetworkRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/network.proto package com.google.cloud.baremetalsolution.v2; @@ -22,29 +22,27 @@ * * *
- * Message for updating a snapshot schedule policy in a project.
+ * Message requesting to updating a network.
  * 
* - * Protobuf type {@code google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest} + * Protobuf type {@code google.cloud.baremetalsolution.v2.UpdateNetworkRequest} */ -public final class UpdateSnapshotSchedulePolicyRequest - extends com.google.protobuf.GeneratedMessageV3 +public final class UpdateNetworkRequest extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest) - UpdateSnapshotSchedulePolicyRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.UpdateNetworkRequest) + UpdateNetworkRequestOrBuilder { private static final long serialVersionUID = 0L; - // Use UpdateSnapshotSchedulePolicyRequest.newBuilder() to construct. - private UpdateSnapshotSchedulePolicyRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use UpdateNetworkRequest.newBuilder() to construct. + private UpdateNetworkRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private UpdateSnapshotSchedulePolicyRequest() {} + private UpdateNetworkRequest() {} @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateSnapshotSchedulePolicyRequest(); + return new UpdateNetworkRequest(); } @java.lang.Override @@ -52,7 +50,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateSnapshotSchedulePolicyRequest( + private UpdateNetworkRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -72,18 +70,16 @@ private UpdateSnapshotSchedulePolicyRequest( break; case 10: { - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Builder subBuilder = - null; - if (snapshotSchedulePolicy_ != null) { - subBuilder = snapshotSchedulePolicy_.toBuilder(); + com.google.cloud.baremetalsolution.v2.Network.Builder subBuilder = null; + if (network_ != null) { + subBuilder = network_.toBuilder(); } - snapshotSchedulePolicy_ = + network_ = input.readMessage( - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.parser(), - extensionRegistry); + com.google.cloud.baremetalsolution.v2.Network.parser(), extensionRegistry); if (subBuilder != null) { - subBuilder.mergeFrom(snapshotSchedulePolicy_); - snapshotSchedulePolicy_ = subBuilder.buildPartial(); + subBuilder.mergeFrom(network_); + network_ = subBuilder.buildPartial(); } break; @@ -125,83 +121,78 @@ private UpdateSnapshotSchedulePolicyRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_UpdateSnapshotSchedulePolicyRequest_descriptor; + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_UpdateNetworkRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_UpdateSnapshotSchedulePolicyRequest_fieldAccessorTable + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_UpdateNetworkRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest.class, - com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest.Builder - .class); + com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest.class, + com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest.Builder.class); } - public static final int SNAPSHOT_SCHEDULE_POLICY_FIELD_NUMBER = 1; - private com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshotSchedulePolicy_; + public static final int NETWORK_FIELD_NUMBER = 1; + private com.google.cloud.baremetalsolution.v2.Network network_; /** * * *
-   * Required. The snapshot schedule policy to update.
-   * The `name` field is used to identify the snapshot schedule policy to
-   * update. Format:
-   * projects/{project}/locations/global/snapshotSchedulePolicies/{policy}
+   * Required. The network to update.
+   * The `name` field is used to identify the instance to update.
+   * Format: projects/{project}/locations/{location}/networks/{network}
    * 
* * - * .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.baremetalsolution.v2.Network network = 1 [(.google.api.field_behavior) = REQUIRED]; * * - * @return Whether the snapshotSchedulePolicy field is set. + * @return Whether the network field is set. */ @java.lang.Override - public boolean hasSnapshotSchedulePolicy() { - return snapshotSchedulePolicy_ != null; + public boolean hasNetwork() { + return network_ != null; } /** * * *
-   * Required. The snapshot schedule policy to update.
-   * The `name` field is used to identify the snapshot schedule policy to
-   * update. Format:
-   * projects/{project}/locations/global/snapshotSchedulePolicies/{policy}
+   * Required. The network to update.
+   * The `name` field is used to identify the instance to update.
+   * Format: projects/{project}/locations/{location}/networks/{network}
    * 
* * - * .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.baremetalsolution.v2.Network network = 1 [(.google.api.field_behavior) = REQUIRED]; * * - * @return The snapshotSchedulePolicy. + * @return The network. */ @java.lang.Override - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy getSnapshotSchedulePolicy() { - return snapshotSchedulePolicy_ == null - ? com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.getDefaultInstance() - : snapshotSchedulePolicy_; + public com.google.cloud.baremetalsolution.v2.Network getNetwork() { + return network_ == null + ? com.google.cloud.baremetalsolution.v2.Network.getDefaultInstance() + : network_; } /** * * *
-   * Required. The snapshot schedule policy to update.
-   * The `name` field is used to identify the snapshot schedule policy to
-   * update. Format:
-   * projects/{project}/locations/global/snapshotSchedulePolicies/{policy}
+   * Required. The network to update.
+   * The `name` field is used to identify the instance to update.
+   * Format: projects/{project}/locations/{location}/networks/{network}
    * 
* * - * .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.baremetalsolution.v2.Network network = 1 [(.google.api.field_behavior) = REQUIRED]; * */ @java.lang.Override - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicyOrBuilder - getSnapshotSchedulePolicyOrBuilder() { - return getSnapshotSchedulePolicy(); + public com.google.cloud.baremetalsolution.v2.NetworkOrBuilder getNetworkOrBuilder() { + return getNetwork(); } public static final int UPDATE_MASK_FIELD_NUMBER = 2; @@ -210,11 +201,12 @@ public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy getSnapshotS * * *
-   * Required. The list of fields to update.
+   * The list of fields to update.
+   * The only currently supported fields are:
+   *   `labels`, `reservations`
    * 
* - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.FieldMask update_mask = 2; * * @return Whether the updateMask field is set. */ @@ -226,11 +218,12 @@ public boolean hasUpdateMask() { * * *
-   * Required. The list of fields to update.
+   * The list of fields to update.
+   * The only currently supported fields are:
+   *   `labels`, `reservations`
    * 
* - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.FieldMask update_mask = 2; * * @return The updateMask. */ @@ -242,11 +235,12 @@ public com.google.protobuf.FieldMask getUpdateMask() { * * *
-   * Required. The list of fields to update.
+   * The list of fields to update.
+   * The only currently supported fields are:
+   *   `labels`, `reservations`
    * 
* - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.FieldMask update_mask = 2; */ @java.lang.Override public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { @@ -267,8 +261,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (snapshotSchedulePolicy_ != null) { - output.writeMessage(1, getSnapshotSchedulePolicy()); + if (network_ != null) { + output.writeMessage(1, getNetwork()); } if (updateMask_ != null) { output.writeMessage(2, getUpdateMask()); @@ -282,9 +276,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (snapshotSchedulePolicy_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSnapshotSchedulePolicy()); + if (network_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getNetwork()); } if (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); @@ -299,16 +292,15 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj - instanceof com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest)) { + if (!(obj instanceof com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest)) { return super.equals(obj); } - com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest other = - (com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest) obj; + com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest other = + (com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest) obj; - if (hasSnapshotSchedulePolicy() != other.hasSnapshotSchedulePolicy()) return false; - if (hasSnapshotSchedulePolicy()) { - if (!getSnapshotSchedulePolicy().equals(other.getSnapshotSchedulePolicy())) return false; + if (hasNetwork() != other.hasNetwork()) return false; + if (hasNetwork()) { + if (!getNetwork().equals(other.getNetwork())) return false; } if (hasUpdateMask() != other.hasUpdateMask()) return false; if (hasUpdateMask()) { @@ -325,9 +317,9 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSnapshotSchedulePolicy()) { - hash = (37 * hash) + SNAPSHOT_SCHEDULE_POLICY_FIELD_NUMBER; - hash = (53 * hash) + getSnapshotSchedulePolicy().hashCode(); + if (hasNetwork()) { + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); } if (hasUpdateMask()) { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; @@ -338,72 +330,71 @@ public int hashCode() { return hash; } - public static com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + public static com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + public static com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest parseFrom( + public static com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -421,7 +412,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest prototype) { + com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -439,33 +430,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Message for updating a snapshot schedule policy in a project.
+   * Message requesting to updating a network.
    * 
* - * Protobuf type {@code google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest} + * Protobuf type {@code google.cloud.baremetalsolution.v2.UpdateNetworkRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest) - com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.UpdateNetworkRequest) + com.google.cloud.baremetalsolution.v2.UpdateNetworkRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_UpdateSnapshotSchedulePolicyRequest_descriptor; + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_UpdateNetworkRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_UpdateSnapshotSchedulePolicyRequest_fieldAccessorTable + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_UpdateNetworkRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest.class, - com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest.Builder - .class); + com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest.class, + com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest.Builder.class); } - // Construct using - // com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest.newBuilder() + // Construct using com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -482,11 +471,11 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - if (snapshotSchedulePolicyBuilder_ == null) { - snapshotSchedulePolicy_ = null; + if (networkBuilder_ == null) { + network_ = null; } else { - snapshotSchedulePolicy_ = null; - snapshotSchedulePolicyBuilder_ = null; + network_ = null; + networkBuilder_ = null; } if (updateMaskBuilder_ == null) { updateMask_ = null; @@ -499,21 +488,18 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_UpdateSnapshotSchedulePolicyRequest_descriptor; + return com.google.cloud.baremetalsolution.v2.NetworkProto + .internal_static_google_cloud_baremetalsolution_v2_UpdateNetworkRequest_descriptor; } @java.lang.Override - public com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest - getDefaultInstanceForType() { - return com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest - .getDefaultInstance(); + public com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest getDefaultInstanceForType() { + return com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest build() { - com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest result = - buildPartial(); + public com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest build() { + com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -521,14 +507,13 @@ public com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest } @java.lang.Override - public com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest - buildPartial() { - com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest result = - new com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest(this); - if (snapshotSchedulePolicyBuilder_ == null) { - result.snapshotSchedulePolicy_ = snapshotSchedulePolicy_; + public com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest buildPartial() { + com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest result = + new com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest(this); + if (networkBuilder_ == null) { + result.network_ = network_; } else { - result.snapshotSchedulePolicy_ = snapshotSchedulePolicyBuilder_.build(); + result.network_ = networkBuilder_.build(); } if (updateMaskBuilder_ == null) { result.updateMask_ = updateMask_; @@ -574,23 +559,19 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest) { - return mergeFrom( - (com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest) other); + if (other instanceof com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest) { + return mergeFrom((com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom( - com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest other) { - if (other - == com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest - .getDefaultInstance()) return this; - if (other.hasSnapshotSchedulePolicy()) { - mergeSnapshotSchedulePolicy(other.getSnapshotSchedulePolicy()); + public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest other) { + if (other == com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest.getDefaultInstance()) + return this; + if (other.hasNetwork()) { + mergeNetwork(other.getNetwork()); } if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); @@ -610,14 +591,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest parsedMessage = - null; + com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest) - e.getUnfinishedMessage(); + (com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -627,81 +606,76 @@ public Builder mergeFrom( return this; } - private com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshotSchedulePolicy_; + private com.google.cloud.baremetalsolution.v2.Network network_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Builder, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicyOrBuilder> - snapshotSchedulePolicyBuilder_; + com.google.cloud.baremetalsolution.v2.Network, + com.google.cloud.baremetalsolution.v2.Network.Builder, + com.google.cloud.baremetalsolution.v2.NetworkOrBuilder> + networkBuilder_; /** * * *
-     * Required. The snapshot schedule policy to update.
-     * The `name` field is used to identify the snapshot schedule policy to
-     * update. Format:
-     * projects/{project}/locations/global/snapshotSchedulePolicies/{policy}
+     * Required. The network to update.
+     * The `name` field is used to identify the instance to update.
+     * Format: projects/{project}/locations/{location}/networks/{network}
      * 
* * - * .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.baremetalsolution.v2.Network network = 1 [(.google.api.field_behavior) = REQUIRED]; * * - * @return Whether the snapshotSchedulePolicy field is set. + * @return Whether the network field is set. */ - public boolean hasSnapshotSchedulePolicy() { - return snapshotSchedulePolicyBuilder_ != null || snapshotSchedulePolicy_ != null; + public boolean hasNetwork() { + return networkBuilder_ != null || network_ != null; } /** * * *
-     * Required. The snapshot schedule policy to update.
-     * The `name` field is used to identify the snapshot schedule policy to
-     * update. Format:
-     * projects/{project}/locations/global/snapshotSchedulePolicies/{policy}
+     * Required. The network to update.
+     * The `name` field is used to identify the instance to update.
+     * Format: projects/{project}/locations/{location}/networks/{network}
      * 
* * - * .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.baremetalsolution.v2.Network network = 1 [(.google.api.field_behavior) = REQUIRED]; * * - * @return The snapshotSchedulePolicy. + * @return The network. */ - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy - getSnapshotSchedulePolicy() { - if (snapshotSchedulePolicyBuilder_ == null) { - return snapshotSchedulePolicy_ == null - ? com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.getDefaultInstance() - : snapshotSchedulePolicy_; + public com.google.cloud.baremetalsolution.v2.Network getNetwork() { + if (networkBuilder_ == null) { + return network_ == null + ? com.google.cloud.baremetalsolution.v2.Network.getDefaultInstance() + : network_; } else { - return snapshotSchedulePolicyBuilder_.getMessage(); + return networkBuilder_.getMessage(); } } /** * * *
-     * Required. The snapshot schedule policy to update.
-     * The `name` field is used to identify the snapshot schedule policy to
-     * update. Format:
-     * projects/{project}/locations/global/snapshotSchedulePolicies/{policy}
+     * Required. The network to update.
+     * The `name` field is used to identify the instance to update.
+     * Format: projects/{project}/locations/{location}/networks/{network}
      * 
* * - * .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.baremetalsolution.v2.Network network = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - public Builder setSnapshotSchedulePolicy( - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy value) { - if (snapshotSchedulePolicyBuilder_ == null) { + public Builder setNetwork(com.google.cloud.baremetalsolution.v2.Network value) { + if (networkBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - snapshotSchedulePolicy_ = value; + network_ = value; onChanged(); } else { - snapshotSchedulePolicyBuilder_.setMessage(value); + networkBuilder_.setMessage(value); } return this; @@ -710,23 +684,22 @@ public Builder setSnapshotSchedulePolicy( * * *
-     * Required. The snapshot schedule policy to update.
-     * The `name` field is used to identify the snapshot schedule policy to
-     * update. Format:
-     * projects/{project}/locations/global/snapshotSchedulePolicies/{policy}
+     * Required. The network to update.
+     * The `name` field is used to identify the instance to update.
+     * Format: projects/{project}/locations/{location}/networks/{network}
      * 
* * - * .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.baremetalsolution.v2.Network network = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - public Builder setSnapshotSchedulePolicy( - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Builder builderForValue) { - if (snapshotSchedulePolicyBuilder_ == null) { - snapshotSchedulePolicy_ = builderForValue.build(); + public Builder setNetwork( + com.google.cloud.baremetalsolution.v2.Network.Builder builderForValue) { + if (networkBuilder_ == null) { + network_ = builderForValue.build(); onChanged(); } else { - snapshotSchedulePolicyBuilder_.setMessage(builderForValue.build()); + networkBuilder_.setMessage(builderForValue.build()); } return this; @@ -735,31 +708,28 @@ public Builder setSnapshotSchedulePolicy( * * *
-     * Required. The snapshot schedule policy to update.
-     * The `name` field is used to identify the snapshot schedule policy to
-     * update. Format:
-     * projects/{project}/locations/global/snapshotSchedulePolicies/{policy}
+     * Required. The network to update.
+     * The `name` field is used to identify the instance to update.
+     * Format: projects/{project}/locations/{location}/networks/{network}
      * 
* * - * .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.baremetalsolution.v2.Network network = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - public Builder mergeSnapshotSchedulePolicy( - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy value) { - if (snapshotSchedulePolicyBuilder_ == null) { - if (snapshotSchedulePolicy_ != null) { - snapshotSchedulePolicy_ = - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.newBuilder( - snapshotSchedulePolicy_) + public Builder mergeNetwork(com.google.cloud.baremetalsolution.v2.Network value) { + if (networkBuilder_ == null) { + if (network_ != null) { + network_ = + com.google.cloud.baremetalsolution.v2.Network.newBuilder(network_) .mergeFrom(value) .buildPartial(); } else { - snapshotSchedulePolicy_ = value; + network_ = value; } onChanged(); } else { - snapshotSchedulePolicyBuilder_.mergeFrom(value); + networkBuilder_.mergeFrom(value); } return this; @@ -768,23 +738,22 @@ public Builder mergeSnapshotSchedulePolicy( * * *
-     * Required. The snapshot schedule policy to update.
-     * The `name` field is used to identify the snapshot schedule policy to
-     * update. Format:
-     * projects/{project}/locations/global/snapshotSchedulePolicies/{policy}
+     * Required. The network to update.
+     * The `name` field is used to identify the instance to update.
+     * Format: projects/{project}/locations/{location}/networks/{network}
      * 
* * - * .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.baremetalsolution.v2.Network network = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - public Builder clearSnapshotSchedulePolicy() { - if (snapshotSchedulePolicyBuilder_ == null) { - snapshotSchedulePolicy_ = null; + public Builder clearNetwork() { + if (networkBuilder_ == null) { + network_ = null; onChanged(); } else { - snapshotSchedulePolicy_ = null; - snapshotSchedulePolicyBuilder_ = null; + network_ = null; + networkBuilder_ = null; } return this; @@ -793,75 +762,70 @@ public Builder clearSnapshotSchedulePolicy() { * * *
-     * Required. The snapshot schedule policy to update.
-     * The `name` field is used to identify the snapshot schedule policy to
-     * update. Format:
-     * projects/{project}/locations/global/snapshotSchedulePolicies/{policy}
+     * Required. The network to update.
+     * The `name` field is used to identify the instance to update.
+     * Format: projects/{project}/locations/{location}/networks/{network}
      * 
* * - * .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.baremetalsolution.v2.Network network = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Builder - getSnapshotSchedulePolicyBuilder() { + public com.google.cloud.baremetalsolution.v2.Network.Builder getNetworkBuilder() { onChanged(); - return getSnapshotSchedulePolicyFieldBuilder().getBuilder(); + return getNetworkFieldBuilder().getBuilder(); } /** * * *
-     * Required. The snapshot schedule policy to update.
-     * The `name` field is used to identify the snapshot schedule policy to
-     * update. Format:
-     * projects/{project}/locations/global/snapshotSchedulePolicies/{policy}
+     * Required. The network to update.
+     * The `name` field is used to identify the instance to update.
+     * Format: projects/{project}/locations/{location}/networks/{network}
      * 
* * - * .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.baremetalsolution.v2.Network network = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - public com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicyOrBuilder - getSnapshotSchedulePolicyOrBuilder() { - if (snapshotSchedulePolicyBuilder_ != null) { - return snapshotSchedulePolicyBuilder_.getMessageOrBuilder(); + public com.google.cloud.baremetalsolution.v2.NetworkOrBuilder getNetworkOrBuilder() { + if (networkBuilder_ != null) { + return networkBuilder_.getMessageOrBuilder(); } else { - return snapshotSchedulePolicy_ == null - ? com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.getDefaultInstance() - : snapshotSchedulePolicy_; + return network_ == null + ? com.google.cloud.baremetalsolution.v2.Network.getDefaultInstance() + : network_; } } /** * * *
-     * Required. The snapshot schedule policy to update.
-     * The `name` field is used to identify the snapshot schedule policy to
-     * update. Format:
-     * projects/{project}/locations/global/snapshotSchedulePolicies/{policy}
+     * Required. The network to update.
+     * The `name` field is used to identify the instance to update.
+     * Format: projects/{project}/locations/{location}/networks/{network}
      * 
* * - * .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.baremetalsolution.v2.Network network = 1 [(.google.api.field_behavior) = REQUIRED]; * */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Builder, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicyOrBuilder> - getSnapshotSchedulePolicyFieldBuilder() { - if (snapshotSchedulePolicyBuilder_ == null) { - snapshotSchedulePolicyBuilder_ = + com.google.cloud.baremetalsolution.v2.Network, + com.google.cloud.baremetalsolution.v2.Network.Builder, + com.google.cloud.baremetalsolution.v2.NetworkOrBuilder> + getNetworkFieldBuilder() { + if (networkBuilder_ == null) { + networkBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Builder, - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicyOrBuilder>( - getSnapshotSchedulePolicy(), getParentForChildren(), isClean()); - snapshotSchedulePolicy_ = null; + com.google.cloud.baremetalsolution.v2.Network, + com.google.cloud.baremetalsolution.v2.Network.Builder, + com.google.cloud.baremetalsolution.v2.NetworkOrBuilder>( + getNetwork(), getParentForChildren(), isClean()); + network_ = null; } - return snapshotSchedulePolicyBuilder_; + return networkBuilder_; } private com.google.protobuf.FieldMask updateMask_; @@ -874,11 +838,12 @@ public Builder clearSnapshotSchedulePolicy() { * * *
-     * Required. The list of fields to update.
+     * The list of fields to update.
+     * The only currently supported fields are:
+     *   `labels`, `reservations`
      * 
* - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.FieldMask update_mask = 2; * * @return Whether the updateMask field is set. */ @@ -889,11 +854,12 @@ public boolean hasUpdateMask() { * * *
-     * Required. The list of fields to update.
+     * The list of fields to update.
+     * The only currently supported fields are:
+     *   `labels`, `reservations`
      * 
* - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.FieldMask update_mask = 2; * * @return The updateMask. */ @@ -910,11 +876,12 @@ public com.google.protobuf.FieldMask getUpdateMask() { * * *
-     * Required. The list of fields to update.
+     * The list of fields to update.
+     * The only currently supported fields are:
+     *   `labels`, `reservations`
      * 
* - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.FieldMask update_mask = 2; */ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { if (updateMaskBuilder_ == null) { @@ -933,11 +900,12 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { * * *
-     * Required. The list of fields to update.
+     * The list of fields to update.
+     * The only currently supported fields are:
+     *   `labels`, `reservations`
      * 
* - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.FieldMask update_mask = 2; */ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { if (updateMaskBuilder_ == null) { @@ -953,11 +921,12 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal * * *
-     * Required. The list of fields to update.
+     * The list of fields to update.
+     * The only currently supported fields are:
+     *   `labels`, `reservations`
      * 
* - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.FieldMask update_mask = 2; */ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { if (updateMaskBuilder_ == null) { @@ -978,11 +947,12 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { * * *
-     * Required. The list of fields to update.
+     * The list of fields to update.
+     * The only currently supported fields are:
+     *   `labels`, `reservations`
      * 
* - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.FieldMask update_mask = 2; */ public Builder clearUpdateMask() { if (updateMaskBuilder_ == null) { @@ -999,11 +969,12 @@ public Builder clearUpdateMask() { * * *
-     * Required. The list of fields to update.
+     * The list of fields to update.
+     * The only currently supported fields are:
+     *   `labels`, `reservations`
      * 
* - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.FieldMask update_mask = 2; */ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { @@ -1014,11 +985,12 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { * * *
-     * Required. The list of fields to update.
+     * The list of fields to update.
+     * The only currently supported fields are:
+     *   `labels`, `reservations`
      * 
* - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.FieldMask update_mask = 2; */ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { if (updateMaskBuilder_ != null) { @@ -1033,11 +1005,12 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * * *
-     * Required. The list of fields to update.
+     * The list of fields to update.
+     * The only currently supported fields are:
+     *   `labels`, `reservations`
      * 
* - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.FieldMask update_mask = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.FieldMask, @@ -1067,46 +1040,42 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest) + // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.UpdateNetworkRequest) } - // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest) - private static final com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest - DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.UpdateNetworkRequest) + private static final com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = - new com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest(); + DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest(); } - public static com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest - getDefaultInstance() { + public static com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public UpdateSnapshotSchedulePolicyRequest parsePartialFrom( + public UpdateNetworkRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateSnapshotSchedulePolicyRequest(input, extensionRegistry); + return new UpdateNetworkRequest(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest - getDefaultInstanceForType() { + public com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/UpdateNetworkRequestOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/UpdateNetworkRequestOrBuilder.java new file mode 100644 index 000000000000..fa3446437d95 --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/UpdateNetworkRequestOrBuilder.java @@ -0,0 +1,113 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/baremetalsolution/v2/network.proto + +package com.google.cloud.baremetalsolution.v2; + +public interface UpdateNetworkRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.UpdateNetworkRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The network to update.
+   * The `name` field is used to identify the instance to update.
+   * Format: projects/{project}/locations/{location}/networks/{network}
+   * 
+ * + * + * .google.cloud.baremetalsolution.v2.Network network = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the network field is set. + */ + boolean hasNetwork(); + /** + * + * + *
+   * Required. The network to update.
+   * The `name` field is used to identify the instance to update.
+   * Format: projects/{project}/locations/{location}/networks/{network}
+   * 
+ * + * + * .google.cloud.baremetalsolution.v2.Network network = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The network. + */ + com.google.cloud.baremetalsolution.v2.Network getNetwork(); + /** + * + * + *
+   * Required. The network to update.
+   * The `name` field is used to identify the instance to update.
+   * Format: projects/{project}/locations/{location}/networks/{network}
+   * 
+ * + * + * .google.cloud.baremetalsolution.v2.Network network = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.baremetalsolution.v2.NetworkOrBuilder getNetworkOrBuilder(); + + /** + * + * + *
+   * The list of fields to update.
+   * The only currently supported fields are:
+   *   `labels`, `reservations`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * The list of fields to update.
+   * The only currently supported fields are:
+   *   `labels`, `reservations`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * The list of fields to update.
+   * The only currently supported fields are:
+   *   `labels`, `reservations`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/UpdateNfsShareRequest.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/UpdateNfsShareRequest.java new file mode 100644 index 000000000000..eef8a54bab87 --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/UpdateNfsShareRequest.java @@ -0,0 +1,1081 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/baremetalsolution/v2/nfs_share.proto + +package com.google.cloud.baremetalsolution.v2; + +/** + * + * + *
+ * Message requesting to updating a NFS share.
+ * 
+ * + * Protobuf type {@code google.cloud.baremetalsolution.v2.UpdateNfsShareRequest} + */ +public final class UpdateNfsShareRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.UpdateNfsShareRequest) + UpdateNfsShareRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateNfsShareRequest.newBuilder() to construct. + private UpdateNfsShareRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateNfsShareRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateNfsShareRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateNfsShareRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.baremetalsolution.v2.NfsShare.Builder subBuilder = null; + if (nfsShare_ != null) { + subBuilder = nfsShare_.toBuilder(); + } + nfsShare_ = + input.readMessage( + com.google.cloud.baremetalsolution.v2.NfsShare.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(nfsShare_); + nfsShare_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.baremetalsolution.v2.NfsShareProto + .internal_static_google_cloud_baremetalsolution_v2_UpdateNfsShareRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.baremetalsolution.v2.NfsShareProto + .internal_static_google_cloud_baremetalsolution_v2_UpdateNfsShareRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest.class, + com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest.Builder.class); + } + + public static final int NFS_SHARE_FIELD_NUMBER = 1; + private com.google.cloud.baremetalsolution.v2.NfsShare nfsShare_; + /** + * + * + *
+   * Required. The NFS share to update.
+   * The `name` field is used to identify the NFS share to update.
+   * Format: projects/{project}/locations/{location}/nfsShares/{nfs_share}
+   * 
+ * + * + * .google.cloud.baremetalsolution.v2.NfsShare nfs_share = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the nfsShare field is set. + */ + @java.lang.Override + public boolean hasNfsShare() { + return nfsShare_ != null; + } + /** + * + * + *
+   * Required. The NFS share to update.
+   * The `name` field is used to identify the NFS share to update.
+   * Format: projects/{project}/locations/{location}/nfsShares/{nfs_share}
+   * 
+ * + * + * .google.cloud.baremetalsolution.v2.NfsShare nfs_share = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The nfsShare. + */ + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.NfsShare getNfsShare() { + return nfsShare_ == null + ? com.google.cloud.baremetalsolution.v2.NfsShare.getDefaultInstance() + : nfsShare_; + } + /** + * + * + *
+   * Required. The NFS share to update.
+   * The `name` field is used to identify the NFS share to update.
+   * Format: projects/{project}/locations/{location}/nfsShares/{nfs_share}
+   * 
+ * + * + * .google.cloud.baremetalsolution.v2.NfsShare nfs_share = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.NfsShareOrBuilder getNfsShareOrBuilder() { + return getNfsShare(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * The list of fields to update.
+   * The only currently supported fields are:
+   *   `labels`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * The list of fields to update.
+   * The only currently supported fields are:
+   *   `labels`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * The list of fields to update.
+   * The only currently supported fields are:
+   *   `labels`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (nfsShare_ != null) { + output.writeMessage(1, getNfsShare()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (nfsShare_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getNfsShare()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest)) { + return super.equals(obj); + } + com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest other = + (com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest) obj; + + if (hasNfsShare() != other.hasNfsShare()) return false; + if (hasNfsShare()) { + if (!getNfsShare().equals(other.getNfsShare())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasNfsShare()) { + hash = (37 * hash) + NFS_SHARE_FIELD_NUMBER; + hash = (53 * hash) + getNfsShare().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Message requesting to updating a NFS share.
+   * 
+ * + * Protobuf type {@code google.cloud.baremetalsolution.v2.UpdateNfsShareRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.UpdateNfsShareRequest) + com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.baremetalsolution.v2.NfsShareProto + .internal_static_google_cloud_baremetalsolution_v2_UpdateNfsShareRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.baremetalsolution.v2.NfsShareProto + .internal_static_google_cloud_baremetalsolution_v2_UpdateNfsShareRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest.class, + com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest.Builder.class); + } + + // Construct using com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (nfsShareBuilder_ == null) { + nfsShare_ = null; + } else { + nfsShare_ = null; + nfsShareBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.baremetalsolution.v2.NfsShareProto + .internal_static_google_cloud_baremetalsolution_v2_UpdateNfsShareRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest getDefaultInstanceForType() { + return com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest build() { + com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest buildPartial() { + com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest result = + new com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest(this); + if (nfsShareBuilder_ == null) { + result.nfsShare_ = nfsShare_; + } else { + result.nfsShare_ = nfsShareBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest) { + return mergeFrom((com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest other) { + if (other == com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest.getDefaultInstance()) + return this; + if (other.hasNfsShare()) { + mergeNfsShare(other.getNfsShare()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.baremetalsolution.v2.NfsShare nfsShare_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.baremetalsolution.v2.NfsShare, + com.google.cloud.baremetalsolution.v2.NfsShare.Builder, + com.google.cloud.baremetalsolution.v2.NfsShareOrBuilder> + nfsShareBuilder_; + /** + * + * + *
+     * Required. The NFS share to update.
+     * The `name` field is used to identify the NFS share to update.
+     * Format: projects/{project}/locations/{location}/nfsShares/{nfs_share}
+     * 
+ * + * + * .google.cloud.baremetalsolution.v2.NfsShare nfs_share = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the nfsShare field is set. + */ + public boolean hasNfsShare() { + return nfsShareBuilder_ != null || nfsShare_ != null; + } + /** + * + * + *
+     * Required. The NFS share to update.
+     * The `name` field is used to identify the NFS share to update.
+     * Format: projects/{project}/locations/{location}/nfsShares/{nfs_share}
+     * 
+ * + * + * .google.cloud.baremetalsolution.v2.NfsShare nfs_share = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The nfsShare. + */ + public com.google.cloud.baremetalsolution.v2.NfsShare getNfsShare() { + if (nfsShareBuilder_ == null) { + return nfsShare_ == null + ? com.google.cloud.baremetalsolution.v2.NfsShare.getDefaultInstance() + : nfsShare_; + } else { + return nfsShareBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The NFS share to update.
+     * The `name` field is used to identify the NFS share to update.
+     * Format: projects/{project}/locations/{location}/nfsShares/{nfs_share}
+     * 
+ * + * + * .google.cloud.baremetalsolution.v2.NfsShare nfs_share = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNfsShare(com.google.cloud.baremetalsolution.v2.NfsShare value) { + if (nfsShareBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nfsShare_ = value; + onChanged(); + } else { + nfsShareBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The NFS share to update.
+     * The `name` field is used to identify the NFS share to update.
+     * Format: projects/{project}/locations/{location}/nfsShares/{nfs_share}
+     * 
+ * + * + * .google.cloud.baremetalsolution.v2.NfsShare nfs_share = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNfsShare( + com.google.cloud.baremetalsolution.v2.NfsShare.Builder builderForValue) { + if (nfsShareBuilder_ == null) { + nfsShare_ = builderForValue.build(); + onChanged(); + } else { + nfsShareBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The NFS share to update.
+     * The `name` field is used to identify the NFS share to update.
+     * Format: projects/{project}/locations/{location}/nfsShares/{nfs_share}
+     * 
+ * + * + * .google.cloud.baremetalsolution.v2.NfsShare nfs_share = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeNfsShare(com.google.cloud.baremetalsolution.v2.NfsShare value) { + if (nfsShareBuilder_ == null) { + if (nfsShare_ != null) { + nfsShare_ = + com.google.cloud.baremetalsolution.v2.NfsShare.newBuilder(nfsShare_) + .mergeFrom(value) + .buildPartial(); + } else { + nfsShare_ = value; + } + onChanged(); + } else { + nfsShareBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The NFS share to update.
+     * The `name` field is used to identify the NFS share to update.
+     * Format: projects/{project}/locations/{location}/nfsShares/{nfs_share}
+     * 
+ * + * + * .google.cloud.baremetalsolution.v2.NfsShare nfs_share = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearNfsShare() { + if (nfsShareBuilder_ == null) { + nfsShare_ = null; + onChanged(); + } else { + nfsShare_ = null; + nfsShareBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The NFS share to update.
+     * The `name` field is used to identify the NFS share to update.
+     * Format: projects/{project}/locations/{location}/nfsShares/{nfs_share}
+     * 
+ * + * + * .google.cloud.baremetalsolution.v2.NfsShare nfs_share = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.baremetalsolution.v2.NfsShare.Builder getNfsShareBuilder() { + + onChanged(); + return getNfsShareFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The NFS share to update.
+     * The `name` field is used to identify the NFS share to update.
+     * Format: projects/{project}/locations/{location}/nfsShares/{nfs_share}
+     * 
+ * + * + * .google.cloud.baremetalsolution.v2.NfsShare nfs_share = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.baremetalsolution.v2.NfsShareOrBuilder getNfsShareOrBuilder() { + if (nfsShareBuilder_ != null) { + return nfsShareBuilder_.getMessageOrBuilder(); + } else { + return nfsShare_ == null + ? com.google.cloud.baremetalsolution.v2.NfsShare.getDefaultInstance() + : nfsShare_; + } + } + /** + * + * + *
+     * Required. The NFS share to update.
+     * The `name` field is used to identify the NFS share to update.
+     * Format: projects/{project}/locations/{location}/nfsShares/{nfs_share}
+     * 
+ * + * + * .google.cloud.baremetalsolution.v2.NfsShare nfs_share = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.baremetalsolution.v2.NfsShare, + com.google.cloud.baremetalsolution.v2.NfsShare.Builder, + com.google.cloud.baremetalsolution.v2.NfsShareOrBuilder> + getNfsShareFieldBuilder() { + if (nfsShareBuilder_ == null) { + nfsShareBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.baremetalsolution.v2.NfsShare, + com.google.cloud.baremetalsolution.v2.NfsShare.Builder, + com.google.cloud.baremetalsolution.v2.NfsShareOrBuilder>( + getNfsShare(), getParentForChildren(), isClean()); + nfsShare_ = null; + } + return nfsShareBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * The list of fields to update.
+     * The only currently supported fields are:
+     *   `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * The list of fields to update.
+     * The only currently supported fields are:
+     *   `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The list of fields to update.
+     * The only currently supported fields are:
+     *   `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The list of fields to update.
+     * The only currently supported fields are:
+     *   `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The list of fields to update.
+     * The only currently supported fields are:
+     *   `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The list of fields to update.
+     * The only currently supported fields are:
+     *   `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The list of fields to update.
+     * The only currently supported fields are:
+     *   `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The list of fields to update.
+     * The only currently supported fields are:
+     *   `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * The list of fields to update.
+     * The only currently supported fields are:
+     *   `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.UpdateNfsShareRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.UpdateNfsShareRequest) + private static final com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest(); + } + + public static com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateNfsShareRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateNfsShareRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/UpdateNfsShareRequestOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/UpdateNfsShareRequestOrBuilder.java new file mode 100644 index 000000000000..64a6b9980d65 --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/UpdateNfsShareRequestOrBuilder.java @@ -0,0 +1,113 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/baremetalsolution/v2/nfs_share.proto + +package com.google.cloud.baremetalsolution.v2; + +public interface UpdateNfsShareRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.UpdateNfsShareRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The NFS share to update.
+   * The `name` field is used to identify the NFS share to update.
+   * Format: projects/{project}/locations/{location}/nfsShares/{nfs_share}
+   * 
+ * + * + * .google.cloud.baremetalsolution.v2.NfsShare nfs_share = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the nfsShare field is set. + */ + boolean hasNfsShare(); + /** + * + * + *
+   * Required. The NFS share to update.
+   * The `name` field is used to identify the NFS share to update.
+   * Format: projects/{project}/locations/{location}/nfsShares/{nfs_share}
+   * 
+ * + * + * .google.cloud.baremetalsolution.v2.NfsShare nfs_share = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The nfsShare. + */ + com.google.cloud.baremetalsolution.v2.NfsShare getNfsShare(); + /** + * + * + *
+   * Required. The NFS share to update.
+   * The `name` field is used to identify the NFS share to update.
+   * Format: projects/{project}/locations/{location}/nfsShares/{nfs_share}
+   * 
+ * + * + * .google.cloud.baremetalsolution.v2.NfsShare nfs_share = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.baremetalsolution.v2.NfsShareOrBuilder getNfsShareOrBuilder(); + + /** + * + * + *
+   * The list of fields to update.
+   * The only currently supported fields are:
+   *   `labels`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * The list of fields to update.
+   * The only currently supported fields are:
+   *   `labels`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * The list of fields to update.
+   * The only currently supported fields are:
+   *   `labels`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/UpdateSnapshotSchedulePolicyRequestOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/UpdateSnapshotSchedulePolicyRequestOrBuilder.java deleted file mode 100644 index a7e15a519c38..000000000000 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/UpdateSnapshotSchedulePolicyRequestOrBuilder.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto - -package com.google.cloud.baremetalsolution.v2; - -public interface UpdateSnapshotSchedulePolicyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.UpdateSnapshotSchedulePolicyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The snapshot schedule policy to update.
-   * The `name` field is used to identify the snapshot schedule policy to
-   * update. Format:
-   * projects/{project}/locations/global/snapshotSchedulePolicies/{policy}
-   * 
- * - * - * .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the snapshotSchedulePolicy field is set. - */ - boolean hasSnapshotSchedulePolicy(); - /** - * - * - *
-   * Required. The snapshot schedule policy to update.
-   * The `name` field is used to identify the snapshot schedule policy to
-   * update. Format:
-   * projects/{project}/locations/global/snapshotSchedulePolicies/{policy}
-   * 
- * - * - * .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The snapshotSchedulePolicy. - */ - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy getSnapshotSchedulePolicy(); - /** - * - * - *
-   * Required. The snapshot schedule policy to update.
-   * The `name` field is used to identify the snapshot schedule policy to
-   * update. Format:
-   * projects/{project}/locations/global/snapshotSchedulePolicies/{policy}
-   * 
- * - * - * .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy snapshot_schedule_policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.baremetalsolution.v2.SnapshotSchedulePolicyOrBuilder - getSnapshotSchedulePolicyOrBuilder(); - - /** - * - * - *
-   * Required. The list of fields to update.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - * - * - *
-   * Required. The list of fields to update.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - * - * - *
-   * Required. The list of fields to update.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); -} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/UpdateVolumeRequest.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/UpdateVolumeRequest.java index e51a7f621140..38d881fa1ad1 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/UpdateVolumeRequest.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/UpdateVolumeRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/volume.proto package com.google.cloud.baremetalsolution.v2; @@ -121,14 +121,14 @@ private UpdateVolumeRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_UpdateVolumeRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_UpdateVolumeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.UpdateVolumeRequest.class, @@ -205,6 +205,9 @@ public com.google.cloud.baremetalsolution.v2.VolumeOrBuilder getVolumeOrBuilder( * The only currently supported fields are: * `snapshot_auto_delete_behavior` * `snapshot_schedule_policy_name` + * 'labels' + * 'snapshot_enabled' + * 'snapshot_reservation_detail.reserved_space_percent' * * * .google.protobuf.FieldMask update_mask = 2; @@ -223,6 +226,9 @@ public boolean hasUpdateMask() { * The only currently supported fields are: * `snapshot_auto_delete_behavior` * `snapshot_schedule_policy_name` + * 'labels' + * 'snapshot_enabled' + * 'snapshot_reservation_detail.reserved_space_percent' * * * .google.protobuf.FieldMask update_mask = 2; @@ -241,6 +247,9 @@ public com.google.protobuf.FieldMask getUpdateMask() { * The only currently supported fields are: * `snapshot_auto_delete_behavior` * `snapshot_schedule_policy_name` + * 'labels' + * 'snapshot_enabled' + * 'snapshot_reservation_detail.reserved_space_percent' * * * .google.protobuf.FieldMask update_mask = 2; @@ -443,14 +452,14 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.UpdateVolumeRequest) com.google.cloud.baremetalsolution.v2.UpdateVolumeRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_UpdateVolumeRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_UpdateVolumeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.UpdateVolumeRequest.class, @@ -491,7 +500,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_UpdateVolumeRequest_descriptor; } @@ -844,6 +853,9 @@ public com.google.cloud.baremetalsolution.v2.VolumeOrBuilder getVolumeOrBuilder( * The only currently supported fields are: * `snapshot_auto_delete_behavior` * `snapshot_schedule_policy_name` + * 'labels' + * 'snapshot_enabled' + * 'snapshot_reservation_detail.reserved_space_percent' * * * .google.protobuf.FieldMask update_mask = 2; @@ -861,6 +873,9 @@ public boolean hasUpdateMask() { * The only currently supported fields are: * `snapshot_auto_delete_behavior` * `snapshot_schedule_policy_name` + * 'labels' + * 'snapshot_enabled' + * 'snapshot_reservation_detail.reserved_space_percent' * * * .google.protobuf.FieldMask update_mask = 2; @@ -884,6 +899,9 @@ public com.google.protobuf.FieldMask getUpdateMask() { * The only currently supported fields are: * `snapshot_auto_delete_behavior` * `snapshot_schedule_policy_name` + * 'labels' + * 'snapshot_enabled' + * 'snapshot_reservation_detail.reserved_space_percent' * * * .google.protobuf.FieldMask update_mask = 2; @@ -909,6 +927,9 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { * The only currently supported fields are: * `snapshot_auto_delete_behavior` * `snapshot_schedule_policy_name` + * 'labels' + * 'snapshot_enabled' + * 'snapshot_reservation_detail.reserved_space_percent' * * * .google.protobuf.FieldMask update_mask = 2; @@ -931,6 +952,9 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal * The only currently supported fields are: * `snapshot_auto_delete_behavior` * `snapshot_schedule_policy_name` + * 'labels' + * 'snapshot_enabled' + * 'snapshot_reservation_detail.reserved_space_percent' * * * .google.protobuf.FieldMask update_mask = 2; @@ -958,6 +982,9 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { * The only currently supported fields are: * `snapshot_auto_delete_behavior` * `snapshot_schedule_policy_name` + * 'labels' + * 'snapshot_enabled' + * 'snapshot_reservation_detail.reserved_space_percent' * * * .google.protobuf.FieldMask update_mask = 2; @@ -981,6 +1008,9 @@ public Builder clearUpdateMask() { * The only currently supported fields are: * `snapshot_auto_delete_behavior` * `snapshot_schedule_policy_name` + * 'labels' + * 'snapshot_enabled' + * 'snapshot_reservation_detail.reserved_space_percent' * * * .google.protobuf.FieldMask update_mask = 2; @@ -998,6 +1028,9 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { * The only currently supported fields are: * `snapshot_auto_delete_behavior` * `snapshot_schedule_policy_name` + * 'labels' + * 'snapshot_enabled' + * 'snapshot_reservation_detail.reserved_space_percent' * * * .google.protobuf.FieldMask update_mask = 2; @@ -1019,6 +1052,9 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * The only currently supported fields are: * `snapshot_auto_delete_behavior` * `snapshot_schedule_policy_name` + * 'labels' + * 'snapshot_enabled' + * 'snapshot_reservation_detail.reserved_space_percent' * * * .google.protobuf.FieldMask update_mask = 2; diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/UpdateVolumeRequestOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/UpdateVolumeRequestOrBuilder.java index 0b47392d1d54..a1d227127924 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/UpdateVolumeRequestOrBuilder.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/UpdateVolumeRequestOrBuilder.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/volume.proto package com.google.cloud.baremetalsolution.v2; @@ -78,6 +78,9 @@ public interface UpdateVolumeRequestOrBuilder * The only currently supported fields are: * `snapshot_auto_delete_behavior` * `snapshot_schedule_policy_name` + * 'labels' + * 'snapshot_enabled' + * 'snapshot_reservation_detail.reserved_space_percent' * * * .google.protobuf.FieldMask update_mask = 2; @@ -93,6 +96,9 @@ public interface UpdateVolumeRequestOrBuilder * The only currently supported fields are: * `snapshot_auto_delete_behavior` * `snapshot_schedule_policy_name` + * 'labels' + * 'snapshot_enabled' + * 'snapshot_reservation_detail.reserved_space_percent' * * * .google.protobuf.FieldMask update_mask = 2; @@ -108,6 +114,9 @@ public interface UpdateVolumeRequestOrBuilder * The only currently supported fields are: * `snapshot_auto_delete_behavior` * `snapshot_schedule_policy_name` + * 'labels' + * 'snapshot_enabled' + * 'snapshot_reservation_detail.reserved_space_percent' * * * .google.protobuf.FieldMask update_mask = 2; diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/VRF.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/VRF.java index edd19f704ad1..e47ad6184cbd 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/VRF.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/VRF.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/network.proto package com.google.cloud.baremetalsolution.v2; @@ -143,14 +143,14 @@ private VRF( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_VRF_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_VRF_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.VRF.class, @@ -409,14 +409,14 @@ private QosPolicy( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_VRF_QosPolicy_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_VRF_QosPolicy_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.VRF.QosPolicy.class, @@ -621,14 +621,14 @@ public static final class Builder // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.VRF.QosPolicy) com.google.cloud.baremetalsolution.v2.VRF.QosPolicyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_VRF_QosPolicy_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_VRF_QosPolicy_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.VRF.QosPolicy.class, @@ -659,7 +659,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_VRF_QosPolicy_descriptor; } @@ -1033,14 +1033,14 @@ private VlanAttachment( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_VRF_VlanAttachment_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_VRF_VlanAttachment_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.VRF.VlanAttachment.class, @@ -1357,14 +1357,14 @@ public static final class Builder // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.VRF.VlanAttachment) com.google.cloud.baremetalsolution.v2.VRF.VlanAttachmentOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_VRF_VlanAttachment_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_VRF_VlanAttachment_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.VRF.VlanAttachment.class, @@ -1399,7 +1399,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_VRF_VlanAttachment_descriptor; } @@ -2249,14 +2249,14 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.VRF) com.google.cloud.baremetalsolution.v2.VRFOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_VRF_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_VRF_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.VRF.class, @@ -2303,7 +2303,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.NetworkProto .internal_static_google_cloud_baremetalsolution_v2_VRF_descriptor; } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/VRFOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/VRFOrBuilder.java index f8770b70a892..fb8d57d305f8 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/VRFOrBuilder.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/VRFOrBuilder.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/network.proto package com.google.cloud.baremetalsolution.v2; diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/Volume.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/Volume.java index caf32b5383e2..bdd0c0b41985 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/Volume.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/Volume.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/volume.proto package com.google.cloud.baremetalsolution.v2; @@ -39,10 +39,11 @@ private Volume(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Volume() { name_ = ""; + id_ = ""; storageType_ = 0; state_ = 0; snapshotAutoDeleteBehavior_ = 0; - snapshotSchedulePolicy_ = ""; + pod_ = ""; } @java.lang.Override @@ -64,6 +65,7 @@ private Volume( if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } + int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { @@ -141,11 +143,41 @@ private Volume( snapshotAutoDeleteBehavior_ = rawValue; break; } - case 82: + case 90: { java.lang.String s = input.readStringRequireUtf8(); - snapshotSchedulePolicy_ = s; + id_ = s; + break; + } + case 98: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 104: + { + snapshotEnabled_ = input.readBool(); + break; + } + case 112: + { + emergencySizeGib_ = input.readInt64(); + break; + } + case 122: + { + java.lang.String s = input.readStringRequireUtf8(); + + pod_ = s; break; } default: @@ -170,14 +202,25 @@ private Volume( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_Volume_descriptor; } + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 12: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_Volume_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.Volume.class, @@ -752,6 +795,23 @@ public interface SnapshotReservationDetailOrBuilder * @return The reservedSpaceRemainingGib. */ long getReservedSpaceRemainingGib(); + + /** + * + * + *
+     * Percent of the total Volume size reserved for snapshot copies.
+     * Enabling snapshots requires reserving 20% or more of
+     * the storage volume space for snapshots. Maximum reserved space for
+     * snapshots is 40%.
+     * Setting this field will effectively set snapshot_enabled to true.
+     * 
+ * + * int32 reserved_space_percent = 4; + * + * @return The reservedSpacePercent. + */ + int getReservedSpacePercent(); } /** * @@ -818,6 +878,11 @@ private SnapshotReservationDetail( reservedSpaceRemainingGib_ = input.readInt64(); break; } + case 32: + { + reservedSpacePercent_ = input.readInt32(); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -840,14 +905,14 @@ private SnapshotReservationDetail( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_Volume_SnapshotReservationDetail_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_Volume_SnapshotReservationDetail_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail.class, @@ -912,6 +977,28 @@ public long getReservedSpaceRemainingGib() { return reservedSpaceRemainingGib_; } + public static final int RESERVED_SPACE_PERCENT_FIELD_NUMBER = 4; + private int reservedSpacePercent_; + /** + * + * + *
+     * Percent of the total Volume size reserved for snapshot copies.
+     * Enabling snapshots requires reserving 20% or more of
+     * the storage volume space for snapshots. Maximum reserved space for
+     * snapshots is 40%.
+     * Setting this field will effectively set snapshot_enabled to true.
+     * 
+ * + * int32 reserved_space_percent = 4; + * + * @return The reservedSpacePercent. + */ + @java.lang.Override + public int getReservedSpacePercent() { + return reservedSpacePercent_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -935,6 +1022,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (reservedSpaceRemainingGib_ != 0L) { output.writeInt64(3, reservedSpaceRemainingGib_); } + if (reservedSpacePercent_ != 0) { + output.writeInt32(4, reservedSpacePercent_); + } unknownFields.writeTo(output); } @@ -955,6 +1045,9 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, reservedSpaceRemainingGib_); } + if (reservedSpacePercent_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, reservedSpacePercent_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -975,6 +1068,7 @@ public boolean equals(final java.lang.Object obj) { if (getReservedSpaceGib() != other.getReservedSpaceGib()) return false; if (getReservedSpaceUsedPercent() != other.getReservedSpaceUsedPercent()) return false; if (getReservedSpaceRemainingGib() != other.getReservedSpaceRemainingGib()) return false; + if (getReservedSpacePercent() != other.getReservedSpacePercent()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -992,6 +1086,8 @@ public int hashCode() { hash = (53 * hash) + getReservedSpaceUsedPercent(); hash = (37 * hash) + RESERVED_SPACE_REMAINING_GIB_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getReservedSpaceRemainingGib()); + hash = (37 * hash) + RESERVED_SPACE_PERCENT_FIELD_NUMBER; + hash = (53 * hash) + getReservedSpacePercent(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -1110,14 +1206,14 @@ public static final class Builder // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail) com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetailOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_Volume_SnapshotReservationDetail_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_Volume_SnapshotReservationDetail_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail.class, @@ -1149,12 +1245,14 @@ public Builder clear() { reservedSpaceRemainingGib_ = 0L; + reservedSpacePercent_ = 0; + return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_Volume_SnapshotReservationDetail_descriptor; } @@ -1182,6 +1280,7 @@ public com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail bu result.reservedSpaceGib_ = reservedSpaceGib_; result.reservedSpaceUsedPercent_ = reservedSpaceUsedPercent_; result.reservedSpaceRemainingGib_ = reservedSpaceRemainingGib_; + result.reservedSpacePercent_ = reservedSpacePercent_; onBuilt(); return result; } @@ -1247,6 +1346,9 @@ public Builder mergeFrom( if (other.getReservedSpaceRemainingGib() != 0L) { setReservedSpaceRemainingGib(other.getReservedSpaceRemainingGib()); } + if (other.getReservedSpacePercent() != 0) { + setReservedSpacePercent(other.getReservedSpacePercent()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -1446,6 +1548,70 @@ public Builder clearReservedSpaceRemainingGib() { return this; } + private int reservedSpacePercent_; + /** + * + * + *
+       * Percent of the total Volume size reserved for snapshot copies.
+       * Enabling snapshots requires reserving 20% or more of
+       * the storage volume space for snapshots. Maximum reserved space for
+       * snapshots is 40%.
+       * Setting this field will effectively set snapshot_enabled to true.
+       * 
+ * + * int32 reserved_space_percent = 4; + * + * @return The reservedSpacePercent. + */ + @java.lang.Override + public int getReservedSpacePercent() { + return reservedSpacePercent_; + } + /** + * + * + *
+       * Percent of the total Volume size reserved for snapshot copies.
+       * Enabling snapshots requires reserving 20% or more of
+       * the storage volume space for snapshots. Maximum reserved space for
+       * snapshots is 40%.
+       * Setting this field will effectively set snapshot_enabled to true.
+       * 
+ * + * int32 reserved_space_percent = 4; + * + * @param value The reservedSpacePercent to set. + * @return This builder for chaining. + */ + public Builder setReservedSpacePercent(int value) { + + reservedSpacePercent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Percent of the total Volume size reserved for snapshot copies.
+       * Enabling snapshots requires reserving 20% or more of
+       * the storage volume space for snapshots. Maximum reserved space for
+       * snapshots is 40%.
+       * Setting this field will effectively set snapshot_enabled to true.
+       * 
+ * + * int32 reserved_space_percent = 4; + * + * @return This builder for chaining. + */ + public Builder clearReservedSpacePercent() { + + reservedSpacePercent_ = 0; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -1559,6 +1725,55 @@ public com.google.protobuf.ByteString getNameBytes() { } } + public static final int ID_FIELD_NUMBER = 11; + private volatile java.lang.Object id_; + /** + * + * + *
+   * An identifier for the `Volume`, generated by the backend.
+   * 
+ * + * string id = 11; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * + * + *
+   * An identifier for the `Volume`, generated by the backend.
+   * 
+ * + * string id = 11; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int STORAGE_TYPE_FIELD_NUMBER = 2; private int storageType_; /** @@ -1673,6 +1888,25 @@ public long getCurrentSizeGib() { return currentSizeGib_; } + public static final int EMERGENCY_SIZE_GIB_FIELD_NUMBER = 14; + private long emergencySizeGib_; + /** + * + * + *
+   * Additional emergency size that was requested for this Volume, in GiB.
+   * current_size_gib includes this value.
+   * 
+ * + * int64 emergency_size_gib = 14; + * + * @return The emergencySizeGib. + */ + @java.lang.Override + public long getEmergencySizeGib() { + return emergencySizeGib_; + } + public static final int AUTO_GROWN_SIZE_GIB_FIELD_NUMBER = 6; private long autoGrownSizeGib_; /** @@ -1813,28 +2047,144 @@ public int getSnapshotAutoDeleteBehaviorValue() { : result; } - public static final int SNAPSHOT_SCHEDULE_POLICY_FIELD_NUMBER = 10; - private volatile java.lang.Object snapshotSchedulePolicy_; + public static final int LABELS_FIELD_NUMBER = 12; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.baremetalsolution.v2.VolumeProto + .internal_static_google_cloud_baremetalsolution_v2_Volume_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 12; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 12; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 12; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 12; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int SNAPSHOT_ENABLED_FIELD_NUMBER = 13; + private boolean snapshotEnabled_; /** * * *
-   * The name of the snapshot schedule policy in use for this volume, if any.
+   * Whether snapshots are enabled.
    * 
* - * string snapshot_schedule_policy = 10 [(.google.api.resource_reference) = { ... } + * bool snapshot_enabled = 13; * - * @return The snapshotSchedulePolicy. + * @return The snapshotEnabled. */ @java.lang.Override - public java.lang.String getSnapshotSchedulePolicy() { - java.lang.Object ref = snapshotSchedulePolicy_; + public boolean getSnapshotEnabled() { + return snapshotEnabled_; + } + + public static final int POD_FIELD_NUMBER = 15; + private volatile java.lang.Object pod_; + /** + * + * + *
+   * Immutable. Pod name.
+   * 
+ * + * string pod = 15 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The pod. + */ + @java.lang.Override + public java.lang.String getPod() { + java.lang.Object ref = pod_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - snapshotSchedulePolicy_ = s; + pod_ = s; return s; } } @@ -1842,20 +2192,20 @@ public java.lang.String getSnapshotSchedulePolicy() { * * *
-   * The name of the snapshot schedule policy in use for this volume, if any.
+   * Immutable. Pod name.
    * 
* - * string snapshot_schedule_policy = 10 [(.google.api.resource_reference) = { ... } + * string pod = 15 [(.google.api.field_behavior) = IMMUTABLE]; * - * @return The bytes for snapshotSchedulePolicy. + * @return The bytes for pod. */ @java.lang.Override - public com.google.protobuf.ByteString getSnapshotSchedulePolicyBytes() { - java.lang.Object ref = snapshotSchedulePolicy_; + public com.google.protobuf.ByteString getPodBytes() { + java.lang.Object ref = pod_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - snapshotSchedulePolicy_ = b; + pod_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -1909,8 +2259,19 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(9, snapshotAutoDeleteBehavior_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(snapshotSchedulePolicy_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 10, snapshotSchedulePolicy_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, id_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 12); + if (snapshotEnabled_ != false) { + output.writeBool(13, snapshotEnabled_); + } + if (emergencySizeGib_ != 0L) { + output.writeInt64(14, emergencySizeGib_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pod_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 15, pod_); } unknownFields.writeTo(output); } @@ -1956,8 +2317,27 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, snapshotAutoDeleteBehavior_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(snapshotSchedulePolicy_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, snapshotSchedulePolicy_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, id_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, labels__); + } + if (snapshotEnabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(13, snapshotEnabled_); + } + if (emergencySizeGib_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(14, emergencySizeGib_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pod_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, pod_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -1976,10 +2356,12 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.baremetalsolution.v2.Volume) obj; if (!getName().equals(other.getName())) return false; + if (!getId().equals(other.getId())) return false; if (storageType_ != other.storageType_) return false; if (state_ != other.state_) return false; if (getRequestedSizeGib() != other.getRequestedSizeGib()) return false; if (getCurrentSizeGib() != other.getCurrentSizeGib()) return false; + if (getEmergencySizeGib() != other.getEmergencySizeGib()) return false; if (getAutoGrownSizeGib() != other.getAutoGrownSizeGib()) return false; if (getRemainingSpaceGib() != other.getRemainingSpaceGib()) return false; if (hasSnapshotReservationDetail() != other.hasSnapshotReservationDetail()) return false; @@ -1988,7 +2370,9 @@ public boolean equals(final java.lang.Object obj) { return false; } if (snapshotAutoDeleteBehavior_ != other.snapshotAutoDeleteBehavior_) return false; - if (!getSnapshotSchedulePolicy().equals(other.getSnapshotSchedulePolicy())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (getSnapshotEnabled() != other.getSnapshotEnabled()) return false; + if (!getPod().equals(other.getPod())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -2002,6 +2386,8 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); hash = (37 * hash) + STORAGE_TYPE_FIELD_NUMBER; hash = (53 * hash) + storageType_; hash = (37 * hash) + STATE_FIELD_NUMBER; @@ -2010,6 +2396,8 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getRequestedSizeGib()); hash = (37 * hash) + CURRENT_SIZE_GIB_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCurrentSizeGib()); + hash = (37 * hash) + EMERGENCY_SIZE_GIB_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getEmergencySizeGib()); hash = (37 * hash) + AUTO_GROWN_SIZE_GIB_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getAutoGrownSizeGib()); hash = (37 * hash) + REMAINING_SPACE_GIB_FIELD_NUMBER; @@ -2020,8 +2408,14 @@ public int hashCode() { } hash = (37 * hash) + SNAPSHOT_AUTO_DELETE_BEHAVIOR_FIELD_NUMBER; hash = (53 * hash) + snapshotAutoDeleteBehavior_; - hash = (37 * hash) + SNAPSHOT_SCHEDULE_POLICY_FIELD_NUMBER; - hash = (53 * hash) + getSnapshotSchedulePolicy().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + SNAPSHOT_ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSnapshotEnabled()); + hash = (37 * hash) + POD_FIELD_NUMBER; + hash = (53 * hash) + getPod().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -2136,14 +2530,34 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.Volume) com.google.cloud.baremetalsolution.v2.VolumeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_Volume_descriptor; } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 12: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 12: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_Volume_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.Volume.class, @@ -2169,6 +2583,8 @@ public Builder clear() { super.clear(); name_ = ""; + id_ = ""; + storageType_ = 0; state_ = 0; @@ -2177,6 +2593,8 @@ public Builder clear() { currentSizeGib_ = 0L; + emergencySizeGib_ = 0L; + autoGrownSizeGib_ = 0L; remainingSpaceGib_ = 0L; @@ -2189,14 +2607,17 @@ public Builder clear() { } snapshotAutoDeleteBehavior_ = 0; - snapshotSchedulePolicy_ = ""; + internalGetMutableLabels().clear(); + snapshotEnabled_ = false; + + pod_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto + return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_Volume_descriptor; } @@ -2218,11 +2639,14 @@ public com.google.cloud.baremetalsolution.v2.Volume build() { public com.google.cloud.baremetalsolution.v2.Volume buildPartial() { com.google.cloud.baremetalsolution.v2.Volume result = new com.google.cloud.baremetalsolution.v2.Volume(this); + int from_bitField0_ = bitField0_; result.name_ = name_; + result.id_ = id_; result.storageType_ = storageType_; result.state_ = state_; result.requestedSizeGib_ = requestedSizeGib_; result.currentSizeGib_ = currentSizeGib_; + result.emergencySizeGib_ = emergencySizeGib_; result.autoGrownSizeGib_ = autoGrownSizeGib_; result.remainingSpaceGib_ = remainingSpaceGib_; if (snapshotReservationDetailBuilder_ == null) { @@ -2231,7 +2655,10 @@ public com.google.cloud.baremetalsolution.v2.Volume buildPartial() { result.snapshotReservationDetail_ = snapshotReservationDetailBuilder_.build(); } result.snapshotAutoDeleteBehavior_ = snapshotAutoDeleteBehavior_; - result.snapshotSchedulePolicy_ = snapshotSchedulePolicy_; + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + result.snapshotEnabled_ = snapshotEnabled_; + result.pod_ = pod_; onBuilt(); return result; } @@ -2285,6 +2712,10 @@ public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.Volume other) { name_ = other.name_; onChanged(); } + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } if (other.storageType_ != 0) { setStorageTypeValue(other.getStorageTypeValue()); } @@ -2297,6 +2728,9 @@ public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.Volume other) { if (other.getCurrentSizeGib() != 0L) { setCurrentSizeGib(other.getCurrentSizeGib()); } + if (other.getEmergencySizeGib() != 0L) { + setEmergencySizeGib(other.getEmergencySizeGib()); + } if (other.getAutoGrownSizeGib() != 0L) { setAutoGrownSizeGib(other.getAutoGrownSizeGib()); } @@ -2309,8 +2743,12 @@ public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.Volume other) { if (other.snapshotAutoDeleteBehavior_ != 0) { setSnapshotAutoDeleteBehaviorValue(other.getSnapshotAutoDeleteBehaviorValue()); } - if (!other.getSnapshotSchedulePolicy().isEmpty()) { - snapshotSchedulePolicy_ = other.snapshotSchedulePolicy_; + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (other.getSnapshotEnabled() != false) { + setSnapshotEnabled(other.getSnapshotEnabled()); + } + if (!other.getPod().isEmpty()) { + pod_ = other.pod_; onChanged(); } this.mergeUnknownFields(other.unknownFields); @@ -2342,6 +2780,8 @@ public Builder mergeFrom( return this; } + private int bitField0_; + private java.lang.Object name_ = ""; /** * @@ -2468,6 +2908,112 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object id_ = ""; + /** + * + * + *
+     * An identifier for the `Volume`, generated by the backend.
+     * 
+ * + * string id = 11; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * An identifier for the `Volume`, generated by the backend.
+     * 
+ * + * string id = 11; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * An identifier for the `Volume`, generated by the backend.
+     * 
+ * + * string id = 11; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * An identifier for the `Volume`, generated by the backend.
+     * 
+ * + * string id = 11; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * + * + *
+     * An identifier for the `Volume`, generated by the backend.
+     * 
+ * + * string id = 11; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + private int storageType_ = 0; /** * @@ -2764,6 +3310,61 @@ public Builder clearCurrentSizeGib() { return this; } + private long emergencySizeGib_; + /** + * + * + *
+     * Additional emergency size that was requested for this Volume, in GiB.
+     * current_size_gib includes this value.
+     * 
+ * + * int64 emergency_size_gib = 14; + * + * @return The emergencySizeGib. + */ + @java.lang.Override + public long getEmergencySizeGib() { + return emergencySizeGib_; + } + /** + * + * + *
+     * Additional emergency size that was requested for this Volume, in GiB.
+     * current_size_gib includes this value.
+     * 
+ * + * int64 emergency_size_gib = 14; + * + * @param value The emergencySizeGib to set. + * @return This builder for chaining. + */ + public Builder setEmergencySizeGib(long value) { + + emergencySizeGib_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Additional emergency size that was requested for this Volume, in GiB.
+     * current_size_gib includes this value.
+     * 
+ * + * int64 emergency_size_gib = 14; + * + * @return This builder for chaining. + */ + public Builder clearEmergencySizeGib() { + + emergencySizeGib_ = 0L; + onChanged(); + return this; + } + private long autoGrownSizeGib_; /** * @@ -3194,24 +3795,234 @@ public Builder clearSnapshotAutoDeleteBehavior() { return this; } - private java.lang.Object snapshotSchedulePolicy_ = ""; + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 12; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 12; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 12; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 12; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 12; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 12; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 12; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private boolean snapshotEnabled_; + /** + * + * + *
+     * Whether snapshots are enabled.
+     * 
+ * + * bool snapshot_enabled = 13; + * + * @return The snapshotEnabled. + */ + @java.lang.Override + public boolean getSnapshotEnabled() { + return snapshotEnabled_; + } + /** + * + * + *
+     * Whether snapshots are enabled.
+     * 
+ * + * bool snapshot_enabled = 13; + * + * @param value The snapshotEnabled to set. + * @return This builder for chaining. + */ + public Builder setSnapshotEnabled(boolean value) { + + snapshotEnabled_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether snapshots are enabled.
+     * 
+ * + * bool snapshot_enabled = 13; + * + * @return This builder for chaining. + */ + public Builder clearSnapshotEnabled() { + + snapshotEnabled_ = false; + onChanged(); + return this; + } + + private java.lang.Object pod_ = ""; /** * * *
-     * The name of the snapshot schedule policy in use for this volume, if any.
+     * Immutable. Pod name.
      * 
* - * string snapshot_schedule_policy = 10 [(.google.api.resource_reference) = { ... } + * string pod = 15 [(.google.api.field_behavior) = IMMUTABLE]; * - * @return The snapshotSchedulePolicy. + * @return The pod. */ - public java.lang.String getSnapshotSchedulePolicy() { - java.lang.Object ref = snapshotSchedulePolicy_; + public java.lang.String getPod() { + java.lang.Object ref = pod_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - snapshotSchedulePolicy_ = s; + pod_ = s; return s; } else { return (java.lang.String) ref; @@ -3221,19 +4032,19 @@ public java.lang.String getSnapshotSchedulePolicy() { * * *
-     * The name of the snapshot schedule policy in use for this volume, if any.
+     * Immutable. Pod name.
      * 
* - * string snapshot_schedule_policy = 10 [(.google.api.resource_reference) = { ... } + * string pod = 15 [(.google.api.field_behavior) = IMMUTABLE]; * - * @return The bytes for snapshotSchedulePolicy. + * @return The bytes for pod. */ - public com.google.protobuf.ByteString getSnapshotSchedulePolicyBytes() { - java.lang.Object ref = snapshotSchedulePolicy_; + public com.google.protobuf.ByteString getPodBytes() { + java.lang.Object ref = pod_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - snapshotSchedulePolicy_ = b; + pod_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -3243,20 +4054,20 @@ public com.google.protobuf.ByteString getSnapshotSchedulePolicyBytes() { * * *
-     * The name of the snapshot schedule policy in use for this volume, if any.
+     * Immutable. Pod name.
      * 
* - * string snapshot_schedule_policy = 10 [(.google.api.resource_reference) = { ... } + * string pod = 15 [(.google.api.field_behavior) = IMMUTABLE]; * - * @param value The snapshotSchedulePolicy to set. + * @param value The pod to set. * @return This builder for chaining. */ - public Builder setSnapshotSchedulePolicy(java.lang.String value) { + public Builder setPod(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - snapshotSchedulePolicy_ = value; + pod_ = value; onChanged(); return this; } @@ -3264,16 +4075,16 @@ public Builder setSnapshotSchedulePolicy(java.lang.String value) { * * *
-     * The name of the snapshot schedule policy in use for this volume, if any.
+     * Immutable. Pod name.
      * 
* - * string snapshot_schedule_policy = 10 [(.google.api.resource_reference) = { ... } + * string pod = 15 [(.google.api.field_behavior) = IMMUTABLE]; * * @return This builder for chaining. */ - public Builder clearSnapshotSchedulePolicy() { + public Builder clearPod() { - snapshotSchedulePolicy_ = getDefaultInstance().getSnapshotSchedulePolicy(); + pod_ = getDefaultInstance().getPod(); onChanged(); return this; } @@ -3281,21 +4092,21 @@ public Builder clearSnapshotSchedulePolicy() { * * *
-     * The name of the snapshot schedule policy in use for this volume, if any.
+     * Immutable. Pod name.
      * 
* - * string snapshot_schedule_policy = 10 [(.google.api.resource_reference) = { ... } + * string pod = 15 [(.google.api.field_behavior) = IMMUTABLE]; * - * @param value The bytes for snapshotSchedulePolicy to set. + * @param value The bytes for pod to set. * @return This builder for chaining. */ - public Builder setSnapshotSchedulePolicyBytes(com.google.protobuf.ByteString value) { + public Builder setPodBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - snapshotSchedulePolicy_ = value; + pod_ = value; onChanged(); return this; } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/VolumeOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/VolumeOrBuilder.java index 0e8079ec41e1..2946abbce1c5 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/VolumeOrBuilder.java +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/VolumeOrBuilder.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto +// source: google/cloud/baremetalsolution/v2/volume.proto package com.google.cloud.baremetalsolution.v2; @@ -56,6 +56,31 @@ public interface VolumeOrBuilder */ com.google.protobuf.ByteString getNameBytes(); + /** + * + * + *
+   * An identifier for the `Volume`, generated by the backend.
+   * 
+ * + * string id = 11; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * An identifier for the `Volume`, generated by the backend.
+   * 
+ * + * string id = 11; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + /** * * @@ -134,6 +159,20 @@ public interface VolumeOrBuilder */ long getCurrentSizeGib(); + /** + * + * + *
+   * Additional emergency size that was requested for this Volume, in GiB.
+   * current_size_gib includes this value.
+   * 
+ * + * int64 emergency_size_gib = 14; + * + * @return The emergencySizeGib. + */ + long getEmergencySizeGib(); + /** * * @@ -239,24 +278,96 @@ public interface VolumeOrBuilder * * *
-   * The name of the snapshot schedule policy in use for this volume, if any.
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 12; + */ + int getLabelsCount(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 12; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 12; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 12; + */ + + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 12; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Whether snapshots are enabled.
+   * 
+ * + * bool snapshot_enabled = 13; + * + * @return The snapshotEnabled. + */ + boolean getSnapshotEnabled(); + + /** + * + * + *
+   * Immutable. Pod name.
    * 
* - * string snapshot_schedule_policy = 10 [(.google.api.resource_reference) = { ... } + * string pod = 15 [(.google.api.field_behavior) = IMMUTABLE]; * - * @return The snapshotSchedulePolicy. + * @return The pod. */ - java.lang.String getSnapshotSchedulePolicy(); + java.lang.String getPod(); /** * * *
-   * The name of the snapshot schedule policy in use for this volume, if any.
+   * Immutable. Pod name.
    * 
* - * string snapshot_schedule_policy = 10 [(.google.api.resource_reference) = { ... } + * string pod = 15 [(.google.api.field_behavior) = IMMUTABLE]; * - * @return The bytes for snapshotSchedulePolicy. + * @return The bytes for pod. */ - com.google.protobuf.ByteString getSnapshotSchedulePolicyBytes(); + com.google.protobuf.ByteString getPodBytes(); } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/VolumeProto.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/VolumeProto.java new file mode 100644 index 000000000000..0ec60b4a6697 --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/VolumeProto.java @@ -0,0 +1,230 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/baremetalsolution/v2/volume.proto + +package com.google.cloud.baremetalsolution.v2; + +public final class VolumeProto { + private VolumeProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_Volume_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_Volume_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_Volume_SnapshotReservationDetail_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_Volume_SnapshotReservationDetail_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_Volume_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_Volume_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_GetVolumeRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_GetVolumeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_ListVolumesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_ListVolumesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_ListVolumesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_ListVolumesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_UpdateVolumeRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_UpdateVolumeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_baremetalsolution_v2_ResizeVolumeRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_baremetalsolution_v2_ResizeVolumeRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n.google/cloud/baremetalsolution/v2/volu" + + "me.proto\022!google.cloud.baremetalsolution" + + ".v2\032\037google/api/field_behavior.proto\032\031go" + + "ogle/api/resource.proto\032 google/protobuf" + + "/field_mask.proto\"\313\t\n\006Volume\022\021\n\004name\030\001 \001" + + "(\tB\003\340A\003\022\n\n\002id\030\013 \001(\t\022K\n\014storage_type\030\002 \001(" + + "\01625.google.cloud.baremetalsolution.v2.Vo" + + "lume.StorageType\022>\n\005state\030\003 \001(\0162/.google" + + ".cloud.baremetalsolution.v2.Volume.State" + + "\022\032\n\022requested_size_gib\030\004 \001(\003\022\030\n\020current_" + + "size_gib\030\005 \001(\003\022\032\n\022emergency_size_gib\030\016 \001" + + "(\003\022\033\n\023auto_grown_size_gib\030\006 \001(\003\022\033\n\023remai" + + "ning_space_gib\030\007 \001(\003\022h\n\033snapshot_reserva" + + "tion_detail\030\010 \001(\0132C.google.cloud.baremet" + + "alsolution.v2.Volume.SnapshotReservation" + + "Detail\022k\n\035snapshot_auto_delete_behavior\030" + + "\t \001(\0162D.google.cloud.baremetalsolution.v" + + "2.Volume.SnapshotAutoDeleteBehavior\022E\n\006l" + + "abels\030\014 \003(\01325.google.cloud.baremetalsolu" + + "tion.v2.Volume.LabelsEntry\022\030\n\020snapshot_e" + + "nabled\030\r \001(\010\022\020\n\003pod\030\017 \001(\tB\003\340A\005\032\242\001\n\031Snaps" + + "hotReservationDetail\022\032\n\022reserved_space_g" + + "ib\030\001 \001(\003\022#\n\033reserved_space_used_percent\030" + + "\002 \001(\005\022$\n\034reserved_space_remaining_gib\030\003 " + + "\001(\003\022\036\n\026reserved_space_percent\030\004 \001(\005\032-\n\013L" + + "abelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002" + + "8\001\"=\n\013StorageType\022\034\n\030STORAGE_TYPE_UNSPEC" + + "IFIED\020\000\022\007\n\003SSD\020\001\022\007\n\003HDD\020\002\"E\n\005State\022\025\n\021ST" + + "ATE_UNSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\t\n\005READY" + + "\020\002\022\014\n\010DELETING\020\003\"}\n\032SnapshotAutoDeleteBe" + + "havior\022-\n)SNAPSHOT_AUTO_DELETE_BEHAVIOR_" + + "UNSPECIFIED\020\000\022\014\n\010DISABLED\020\001\022\020\n\014OLDEST_FI" + + "RST\020\002\022\020\n\014NEWEST_FIRST\020\003:f\352Ac\n\'baremetals" + + "olution.googleapis.com/Volume\0228projects/" + + "{project}/locations/{location}/volumes/{" + + "volume}\"Q\n\020GetVolumeRequest\022=\n\004name\030\001 \001(" + + "\tB/\340A\002\372A)\n\'baremetalsolution.googleapis." + + "com/Volume\"\206\001\n\022ListVolumesRequest\0229\n\006par" + + "ent\030\001 \001(\tB)\340A\002\372A#\n!locations.googleapis." + + "com/Location\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_" + + "token\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t\"\177\n\023ListVolum" + + "esResponse\022:\n\007volumes\030\001 \003(\0132).google.clo" + + "ud.baremetalsolution.v2.Volume\022\027\n\017next_p" + + "age_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"\206\001\n" + + "\023UpdateVolumeRequest\022>\n\006volume\030\001 \001(\0132).g" + + "oogle.cloud.baremetalsolution.v2.VolumeB" + + "\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032.google.proto" + + "buf.FieldMask\"h\n\023ResizeVolumeRequest\022?\n\006" + + "volume\030\001 \001(\tB/\340A\002\372A)\n\'baremetalsolution." + + "googleapis.com/Volume\022\020\n\010size_gib\030\002 \001(\003B" + + "\371\001\n%com.google.cloud.baremetalsolution.v" + + "2B\013VolumeProtoP\001ZRgoogle.golang.org/genp" + + "roto/googleapis/cloud/baremetalsolution/" + + "v2;baremetalsolution\252\002!Google.Cloud.Bare" + + "MetalSolution.V2\312\002!Google\\Cloud\\BareMeta" + + "lSolution\\V2\352\002$Google::Cloud::BareMetalS" + + "olution::V2b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_cloud_baremetalsolution_v2_Volume_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_baremetalsolution_v2_Volume_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_Volume_descriptor, + new java.lang.String[] { + "Name", + "Id", + "StorageType", + "State", + "RequestedSizeGib", + "CurrentSizeGib", + "EmergencySizeGib", + "AutoGrownSizeGib", + "RemainingSpaceGib", + "SnapshotReservationDetail", + "SnapshotAutoDeleteBehavior", + "Labels", + "SnapshotEnabled", + "Pod", + }); + internal_static_google_cloud_baremetalsolution_v2_Volume_SnapshotReservationDetail_descriptor = + internal_static_google_cloud_baremetalsolution_v2_Volume_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_baremetalsolution_v2_Volume_SnapshotReservationDetail_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_Volume_SnapshotReservationDetail_descriptor, + new java.lang.String[] { + "ReservedSpaceGib", + "ReservedSpaceUsedPercent", + "ReservedSpaceRemainingGib", + "ReservedSpacePercent", + }); + internal_static_google_cloud_baremetalsolution_v2_Volume_LabelsEntry_descriptor = + internal_static_google_cloud_baremetalsolution_v2_Volume_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_baremetalsolution_v2_Volume_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_Volume_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_baremetalsolution_v2_GetVolumeRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_baremetalsolution_v2_GetVolumeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_GetVolumeRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_baremetalsolution_v2_ListVolumesRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_baremetalsolution_v2_ListVolumesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_ListVolumesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", + }); + internal_static_google_cloud_baremetalsolution_v2_ListVolumesResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_baremetalsolution_v2_ListVolumesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_ListVolumesResponse_descriptor, + new java.lang.String[] { + "Volumes", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_baremetalsolution_v2_UpdateVolumeRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_baremetalsolution_v2_UpdateVolumeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_UpdateVolumeRequest_descriptor, + new java.lang.String[] { + "Volume", "UpdateMask", + }); + internal_static_google_cloud_baremetalsolution_v2_ResizeVolumeRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_baremetalsolution_v2_ResizeVolumeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_baremetalsolution_v2_ResizeVolumeRequest_descriptor, + new java.lang.String[] { + "Volume", "SizeGib", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/VolumeSnapshot.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/VolumeSnapshot.java deleted file mode 100644 index 6fc06245e6f8..000000000000 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/VolumeSnapshot.java +++ /dev/null @@ -1,1370 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto - -package com.google.cloud.baremetalsolution.v2; - -/** - * - * - *
- * Snapshot registered for a given storage volume.
- * 
- * - * Protobuf type {@code google.cloud.baremetalsolution.v2.VolumeSnapshot} - */ -public final class VolumeSnapshot extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.VolumeSnapshot) - VolumeSnapshotOrBuilder { - private static final long serialVersionUID = 0L; - // Use VolumeSnapshot.newBuilder() to construct. - private VolumeSnapshot(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private VolumeSnapshot() { - name_ = ""; - description_ = ""; - storageVolume_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new VolumeSnapshot(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private VolumeSnapshot( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 24: - { - sizeBytes_ = input.readInt64(); - break; - } - case 34: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - storageVolume_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_VolumeSnapshot_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_VolumeSnapshot_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.baremetalsolution.v2.VolumeSnapshot.class, - com.google.cloud.baremetalsolution.v2.VolumeSnapshot.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Output only. The name of the storage volume snapshot.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The name of the storage volume snapshot.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 2; - private volatile java.lang.Object description_; - /** - * - * - *
-   * The description of the storage volume snapshot.
-   * 
- * - * string description = 2; - * - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - * - * - *
-   * The description of the storage volume snapshot.
-   * 
- * - * string description = 2; - * - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SIZE_BYTES_FIELD_NUMBER = 3; - private long sizeBytes_; - /** - * - * - *
-   * The size of the storage volume snapshot, in bytes.
-   * 
- * - * int64 size_bytes = 3; - * - * @return The sizeBytes. - */ - @java.lang.Override - public long getSizeBytes() { - return sizeBytes_; - } - - public static final int CREATE_TIME_FIELD_NUMBER = 4; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * Optional. The creation time of the storage volume snapshot.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - * - * - *
-   * Optional. The creation time of the storage volume snapshot.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * Optional. The creation time of the storage volume snapshot.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int STORAGE_VOLUME_FIELD_NUMBER = 5; - private volatile java.lang.Object storageVolume_; - /** - * - * - *
-   * The storage volume this snapshot belongs to.
-   * 
- * - * string storage_volume = 5 [(.google.api.resource_reference) = { ... } - * - * @return The storageVolume. - */ - @java.lang.Override - public java.lang.String getStorageVolume() { - java.lang.Object ref = storageVolume_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - storageVolume_ = s; - return s; - } - } - /** - * - * - *
-   * The storage volume this snapshot belongs to.
-   * 
- * - * string storage_volume = 5 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for storageVolume. - */ - @java.lang.Override - public com.google.protobuf.ByteString getStorageVolumeBytes() { - java.lang.Object ref = storageVolume_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - storageVolume_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); - } - if (sizeBytes_ != 0L) { - output.writeInt64(3, sizeBytes_); - } - if (createTime_ != null) { - output.writeMessage(4, getCreateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(storageVolume_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, storageVolume_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); - } - if (sizeBytes_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, sizeBytes_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(storageVolume_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, storageVolume_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.baremetalsolution.v2.VolumeSnapshot)) { - return super.equals(obj); - } - com.google.cloud.baremetalsolution.v2.VolumeSnapshot other = - (com.google.cloud.baremetalsolution.v2.VolumeSnapshot) obj; - - if (!getName().equals(other.getName())) return false; - if (!getDescription().equals(other.getDescription())) return false; - if (getSizeBytes() != other.getSizeBytes()) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (!getStorageVolume().equals(other.getStorageVolume())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (37 * hash) + SIZE_BYTES_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSizeBytes()); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - hash = (37 * hash) + STORAGE_VOLUME_FIELD_NUMBER; - hash = (53 * hash) + getStorageVolume().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.baremetalsolution.v2.VolumeSnapshot parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.baremetalsolution.v2.VolumeSnapshot parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.VolumeSnapshot parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.baremetalsolution.v2.VolumeSnapshot parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.VolumeSnapshot parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.baremetalsolution.v2.VolumeSnapshot parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.VolumeSnapshot parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.baremetalsolution.v2.VolumeSnapshot parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.VolumeSnapshot parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.baremetalsolution.v2.VolumeSnapshot parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.baremetalsolution.v2.VolumeSnapshot parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.baremetalsolution.v2.VolumeSnapshot parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.baremetalsolution.v2.VolumeSnapshot prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Snapshot registered for a given storage volume.
-   * 
- * - * Protobuf type {@code google.cloud.baremetalsolution.v2.VolumeSnapshot} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.VolumeSnapshot) - com.google.cloud.baremetalsolution.v2.VolumeSnapshotOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_VolumeSnapshot_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_VolumeSnapshot_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.baremetalsolution.v2.VolumeSnapshot.class, - com.google.cloud.baremetalsolution.v2.VolumeSnapshot.Builder.class); - } - - // Construct using com.google.cloud.baremetalsolution.v2.VolumeSnapshot.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - description_ = ""; - - sizeBytes_ = 0L; - - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - storageVolume_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.baremetalsolution.v2.BaremetalsolutionProto - .internal_static_google_cloud_baremetalsolution_v2_VolumeSnapshot_descriptor; - } - - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.VolumeSnapshot getDefaultInstanceForType() { - return com.google.cloud.baremetalsolution.v2.VolumeSnapshot.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.VolumeSnapshot build() { - com.google.cloud.baremetalsolution.v2.VolumeSnapshot result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.VolumeSnapshot buildPartial() { - com.google.cloud.baremetalsolution.v2.VolumeSnapshot result = - new com.google.cloud.baremetalsolution.v2.VolumeSnapshot(this); - result.name_ = name_; - result.description_ = description_; - result.sizeBytes_ = sizeBytes_; - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - result.storageVolume_ = storageVolume_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.baremetalsolution.v2.VolumeSnapshot) { - return mergeFrom((com.google.cloud.baremetalsolution.v2.VolumeSnapshot) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.VolumeSnapshot other) { - if (other == com.google.cloud.baremetalsolution.v2.VolumeSnapshot.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.getSizeBytes() != 0L) { - setSizeBytes(other.getSizeBytes()); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (!other.getStorageVolume().isEmpty()) { - storageVolume_ = other.storageVolume_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.baremetalsolution.v2.VolumeSnapshot parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.baremetalsolution.v2.VolumeSnapshot) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Output only. The name of the storage volume snapshot.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The name of the storage volume snapshot.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The name of the storage volume snapshot.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The name of the storage volume snapshot.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The name of the storage volume snapshot.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - * - * - *
-     * The description of the storage volume snapshot.
-     * 
- * - * string description = 2; - * - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The description of the storage volume snapshot.
-     * 
- * - * string description = 2; - * - * @return The bytes for description. - */ - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The description of the storage volume snapshot.
-     * 
- * - * string description = 2; - * - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The description of the storage volume snapshot.
-     * 
- * - * string description = 2; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * - * - *
-     * The description of the storage volume snapshot.
-     * 
- * - * string description = 2; - * - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private long sizeBytes_; - /** - * - * - *
-     * The size of the storage volume snapshot, in bytes.
-     * 
- * - * int64 size_bytes = 3; - * - * @return The sizeBytes. - */ - @java.lang.Override - public long getSizeBytes() { - return sizeBytes_; - } - /** - * - * - *
-     * The size of the storage volume snapshot, in bytes.
-     * 
- * - * int64 size_bytes = 3; - * - * @param value The sizeBytes to set. - * @return This builder for chaining. - */ - public Builder setSizeBytes(long value) { - - sizeBytes_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The size of the storage volume snapshot, in bytes.
-     * 
- * - * int64 size_bytes = 3; - * - * @return This builder for chaining. - */ - public Builder clearSizeBytes() { - - sizeBytes_ = 0L; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - /** - * - * - *
-     * Optional. The creation time of the storage volume snapshot.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - * - * - *
-     * Optional. The creation time of the storage volume snapshot.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The creation time of the storage volume snapshot.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The creation time of the storage volume snapshot.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. The creation time of the storage volume snapshot.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The creation time of the storage volume snapshot.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. The creation time of the storage volume snapshot.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The creation time of the storage volume snapshot.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } - } - /** - * - * - *
-     * Optional. The creation time of the storage volume snapshot.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private java.lang.Object storageVolume_ = ""; - /** - * - * - *
-     * The storage volume this snapshot belongs to.
-     * 
- * - * string storage_volume = 5 [(.google.api.resource_reference) = { ... } - * - * @return The storageVolume. - */ - public java.lang.String getStorageVolume() { - java.lang.Object ref = storageVolume_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - storageVolume_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The storage volume this snapshot belongs to.
-     * 
- * - * string storage_volume = 5 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for storageVolume. - */ - public com.google.protobuf.ByteString getStorageVolumeBytes() { - java.lang.Object ref = storageVolume_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - storageVolume_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The storage volume this snapshot belongs to.
-     * 
- * - * string storage_volume = 5 [(.google.api.resource_reference) = { ... } - * - * @param value The storageVolume to set. - * @return This builder for chaining. - */ - public Builder setStorageVolume(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - storageVolume_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The storage volume this snapshot belongs to.
-     * 
- * - * string storage_volume = 5 [(.google.api.resource_reference) = { ... } - * - * @return This builder for chaining. - */ - public Builder clearStorageVolume() { - - storageVolume_ = getDefaultInstance().getStorageVolume(); - onChanged(); - return this; - } - /** - * - * - *
-     * The storage volume this snapshot belongs to.
-     * 
- * - * string storage_volume = 5 [(.google.api.resource_reference) = { ... } - * - * @param value The bytes for storageVolume to set. - * @return This builder for chaining. - */ - public Builder setStorageVolumeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - storageVolume_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.VolumeSnapshot) - } - - // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.VolumeSnapshot) - private static final com.google.cloud.baremetalsolution.v2.VolumeSnapshot DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.VolumeSnapshot(); - } - - public static com.google.cloud.baremetalsolution.v2.VolumeSnapshot getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public VolumeSnapshot parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new VolumeSnapshot(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.baremetalsolution.v2.VolumeSnapshot getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/VolumeSnapshotName.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/VolumeSnapshotName.java deleted file mode 100644 index b38797262016..000000000000 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/VolumeSnapshotName.java +++ /dev/null @@ -1,258 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.baremetalsolution.v2; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class VolumeSnapshotName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_VOLUME_SNAPSHOT = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - private final String volume; - private final String snapshot; - - @Deprecated - protected VolumeSnapshotName() { - project = null; - location = null; - volume = null; - snapshot = null; - } - - private VolumeSnapshotName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - volume = Preconditions.checkNotNull(builder.getVolume()); - snapshot = Preconditions.checkNotNull(builder.getSnapshot()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getVolume() { - return volume; - } - - public String getSnapshot() { - return snapshot; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static VolumeSnapshotName of( - String project, String location, String volume, String snapshot) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setVolume(volume) - .setSnapshot(snapshot) - .build(); - } - - public static String format(String project, String location, String volume, String snapshot) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setVolume(volume) - .setSnapshot(snapshot) - .build() - .toString(); - } - - public static VolumeSnapshotName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION_VOLUME_SNAPSHOT.validatedMatch( - formattedString, "VolumeSnapshotName.parse: formattedString not in valid format"); - return of( - matchMap.get("project"), - matchMap.get("location"), - matchMap.get("volume"), - matchMap.get("snapshot")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (VolumeSnapshotName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_VOLUME_SNAPSHOT.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (location != null) { - fieldMapBuilder.put("location", location); - } - if (volume != null) { - fieldMapBuilder.put("volume", volume); - } - if (snapshot != null) { - fieldMapBuilder.put("snapshot", snapshot); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION_VOLUME_SNAPSHOT.instantiate( - "project", project, "location", location, "volume", volume, "snapshot", snapshot); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - VolumeSnapshotName that = ((VolumeSnapshotName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location) - && Objects.equals(this.volume, that.volume) - && Objects.equals(this.snapshot, that.snapshot); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(location); - h *= 1000003; - h ^= Objects.hashCode(volume); - h *= 1000003; - h ^= Objects.hashCode(snapshot); - return h; - } - - /** Builder for projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot}. */ - public static class Builder { - private String project; - private String location; - private String volume; - private String snapshot; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getVolume() { - return volume; - } - - public String getSnapshot() { - return snapshot; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setVolume(String volume) { - this.volume = volume; - return this; - } - - public Builder setSnapshot(String snapshot) { - this.snapshot = snapshot; - return this; - } - - private Builder(VolumeSnapshotName volumeSnapshotName) { - this.project = volumeSnapshotName.project; - this.location = volumeSnapshotName.location; - this.volume = volumeSnapshotName.volume; - this.snapshot = volumeSnapshotName.snapshot; - } - - public VolumeSnapshotName build() { - return new VolumeSnapshotName(this); - } - } -} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/VolumeSnapshotOrBuilder.java b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/VolumeSnapshotOrBuilder.java deleted file mode 100644 index 9d3b8b2366fa..000000000000 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/VolumeSnapshotOrBuilder.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto - -package com.google.cloud.baremetalsolution.v2; - -public interface VolumeSnapshotOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.VolumeSnapshot) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The name of the storage volume snapshot.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Output only. The name of the storage volume snapshot.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * The description of the storage volume snapshot.
-   * 
- * - * string description = 2; - * - * @return The description. - */ - java.lang.String getDescription(); - /** - * - * - *
-   * The description of the storage volume snapshot.
-   * 
- * - * string description = 2; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); - - /** - * - * - *
-   * The size of the storage volume snapshot, in bytes.
-   * 
- * - * int64 size_bytes = 3; - * - * @return The sizeBytes. - */ - long getSizeBytes(); - - /** - * - * - *
-   * Optional. The creation time of the storage volume snapshot.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - * - * - *
-   * Optional. The creation time of the storage volume snapshot.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - * - * - *
-   * Optional. The creation time of the storage volume snapshot.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * The storage volume this snapshot belongs to.
-   * 
- * - * string storage_volume = 5 [(.google.api.resource_reference) = { ... } - * - * @return The storageVolume. - */ - java.lang.String getStorageVolume(); - /** - * - * - *
-   * The storage volume this snapshot belongs to.
-   * 
- * - * string storage_volume = 5 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for storageVolume. - */ - com.google.protobuf.ByteString getStorageVolumeBytes(); -} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/proto/google/cloud/baremetalsolution/v2/baremetalsolution.proto b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/proto/google/cloud/baremetalsolution/v2/baremetalsolution.proto index 5516eaadbe7a..87e0f8d5b3a2 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/proto/google/cloud/baremetalsolution/v2/baremetalsolution.proto +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/proto/google/cloud/baremetalsolution/v2/baremetalsolution.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -19,19 +19,21 @@ package google.cloud.baremetalsolution.v2; import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; +import "google/cloud/baremetalsolution/v2/instance.proto"; +import "google/cloud/baremetalsolution/v2/lun.proto"; +import "google/cloud/baremetalsolution/v2/network.proto"; +import "google/cloud/baremetalsolution/v2/nfs_share.proto"; +import "google/cloud/baremetalsolution/v2/volume.proto"; import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; -option csharp_namespace = "Google.Cloud.BaremetalSolution.V2"; +option csharp_namespace = "Google.Cloud.BareMetalSolution.V2"; option go_package = "google.golang.org/genproto/googleapis/cloud/baremetalsolution/v2;baremetalsolution"; option java_multiple_files = true; -option java_outer_classname = "BaremetalsolutionProto"; +option java_outer_classname = "BareMetalSolutionProto"; option java_package = "com.google.cloud.baremetalsolution.v2"; -option php_namespace = "Google\\Cloud\\BaremetalSolution\\V2"; -option ruby_package = "Google::Cloud::BaremetalSolution::V2"; +option php_namespace = "Google\\Cloud\\BareMetalSolution\\V2"; +option ruby_package = "Google::Cloud::BareMetalSolution::V2"; // Performs management operations on Bare Metal Solution servers. // @@ -61,6 +63,19 @@ service BareMetalSolution { option (google.api.method_signature) = "name"; } + // Update details of a single server. + rpc UpdateInstance(UpdateInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v2/{instance.name=projects/*/locations/*/instances/*}" + body: "instance" + }; + option (google.api.method_signature) = "instance,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "OperationMetadata" + }; + } + // Perform an ungraceful, hard reset on a server. Equivalent to shutting the // power off and then turning it back on. rpc ResetInstance(ResetInstanceRequest) returns (google.longrunning.Operation) { @@ -75,6 +90,45 @@ service BareMetalSolution { }; } + // Starts a server that was shutdown. + rpc StartInstance(StartInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{name=projects/*/locations/*/instances/*}:start" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "StartInstanceResponse" + metadata_type: "OperationMetadata" + }; + } + + // Stop a running server. + rpc StopInstance(StopInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{name=projects/*/locations/*/instances/*}:stop" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "StopInstanceResponse" + metadata_type: "OperationMetadata" + }; + } + + // Detach LUN from Instance. + rpc DetachLun(DetachLunRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{instance=projects/*/locations/*/instances/*}:detachLun" + body: "*" + }; + option (google.api.method_signature) = "instance,lun"; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "OperationMetadata" + }; + } + // List storage volumes in a given project and location. rpc ListVolumes(ListVolumesRequest) returns (ListVolumesResponse) { option (google.api.http) = { @@ -104,110 +158,57 @@ service BareMetalSolution { }; } - // List network in a given project and location. - rpc ListNetworks(ListNetworksRequest) returns (ListNetworksResponse) { + // Emergency Volume resize. + rpc ResizeVolume(ResizeVolumeRequest) returns (google.longrunning.Operation) { option (google.api.http) = { - get: "/v2/{parent=projects/*/locations/*}/networks" + post: "/v2/{volume=projects/*/locations/*/volumes/*}:resize" + body: "*" }; - option (google.api.method_signature) = "parent"; - } - - // Get details of a single network. - rpc GetNetwork(GetNetworkRequest) returns (Network) { - option (google.api.http) = { - get: "/v2/{name=projects/*/locations/*/networks/*}" + option (google.api.method_signature) = "volume,size_gib"; + option (google.longrunning.operation_info) = { + response_type: "Volume" + metadata_type: "OperationMetadata" }; - option (google.api.method_signature) = "name"; } - // List snapshot schedule policies in a given project and location. - rpc ListSnapshotSchedulePolicies(ListSnapshotSchedulePoliciesRequest) returns (ListSnapshotSchedulePoliciesResponse) { + // List network in a given project and location. + rpc ListNetworks(ListNetworksRequest) returns (ListNetworksResponse) { option (google.api.http) = { - get: "/v2/{parent=projects/*/locations/*}/snapshotSchedulePolicies" + get: "/v2/{parent=projects/*/locations/*}/networks" }; option (google.api.method_signature) = "parent"; } - // Get details of a single snapshot schedule policy. - rpc GetSnapshotSchedulePolicy(GetSnapshotSchedulePolicyRequest) returns (SnapshotSchedulePolicy) { - option (google.api.http) = { - get: "/v2/{name=projects/*/locations/*/snapshotSchedulePolicies/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Create a snapshot schedule policy in the specified project. - rpc CreateSnapshotSchedulePolicy(CreateSnapshotSchedulePolicyRequest) returns (SnapshotSchedulePolicy) { + // List all Networks (and used IPs for each Network) in the vendor account + // associated with the specified project. + rpc ListNetworkUsage(ListNetworkUsageRequest) returns (ListNetworkUsageResponse) { option (google.api.http) = { - post: "/v2/{parent=projects/*/locations/*}/snapshotSchedulePolicies" - body: "snapshot_schedule_policy" + get: "/v2/{location=projects/*/locations/*}/networks:listNetworkUsage" }; - option (google.api.method_signature) = "parent,snapshot_schedule_policy,snapshot_schedule_policy_id"; + option (google.api.method_signature) = "location"; } - // Update a snapshot schedule policy in the specified project. - rpc UpdateSnapshotSchedulePolicy(UpdateSnapshotSchedulePolicyRequest) returns (SnapshotSchedulePolicy) { - option (google.api.http) = { - patch: "/v2/{snapshot_schedule_policy.name=projects/*/locations/*/snapshotSchedulePolicies/*}" - body: "snapshot_schedule_policy" - }; - option (google.api.method_signature) = "snapshot_schedule_policy,update_mask"; - } - - // Delete a named snapshot schedule policy. - rpc DeleteSnapshotSchedulePolicy(DeleteSnapshotSchedulePolicyRequest) returns (google.protobuf.Empty) { + // Get details of a single network. + rpc GetNetwork(GetNetworkRequest) returns (Network) { option (google.api.http) = { - delete: "/v2/{name=projects/*/locations/*/snapshotSchedulePolicies/*}" + get: "/v2/{name=projects/*/locations/*/networks/*}" }; option (google.api.method_signature) = "name"; } - // Create a storage volume snapshot in a containing volume. - rpc CreateVolumeSnapshot(CreateVolumeSnapshotRequest) returns (VolumeSnapshot) { - option (google.api.http) = { - post: "/v2/{parent=projects/*/locations/*/volumes/*}/snapshots" - body: "volume_snapshot" - }; - option (google.api.method_signature) = "parent,volume_snapshot"; - } - - // Restore a storage volume snapshot to its containing volume. - rpc RestoreVolumeSnapshot(RestoreVolumeSnapshotRequest) returns (google.longrunning.Operation) { + // Update details of a single network. + rpc UpdateNetwork(UpdateNetworkRequest) returns (google.longrunning.Operation) { option (google.api.http) = { - post: "/v2/{volume_snapshot=projects/*/locations/*/volumes/*/snapshots/*}:restoreVolumeSnapshot" - body: "*" + patch: "/v2/{network.name=projects/*/locations/*/networks/*}" + body: "network" }; - option (google.api.method_signature) = "volume_snapshot"; + option (google.api.method_signature) = "network,update_mask"; option (google.longrunning.operation_info) = { - response_type: "VolumeSnapshot" + response_type: "Network" metadata_type: "OperationMetadata" }; } - // Deletes a storage volume snapshot for a given volume. - rpc DeleteVolumeSnapshot(DeleteVolumeSnapshotRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v2/{name=projects/*/locations/*/volumes/*/snapshots/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Get details of a single storage volume snapshot. - rpc GetVolumeSnapshot(GetVolumeSnapshotRequest) returns (VolumeSnapshot) { - option (google.api.http) = { - get: "/v2/{name=projects/*/locations/*/volumes/*/snapshots/*}" - }; - option (google.api.method_signature) = "name"; - } - - // List storage volume snapshots for given storage volume. - rpc ListVolumeSnapshots(ListVolumeSnapshotsRequest) returns (ListVolumeSnapshotsResponse) { - option (google.api.http) = { - get: "/v2/{parent=projects/*/locations/*/volumes/*}/snapshots" - }; - option (google.api.method_signature) = "parent"; - } - // Get details of a single storage logical unit number(LUN). rpc GetLun(GetLunRequest) returns (Lun) { option (google.api.http) = { @@ -223,566 +224,35 @@ service BareMetalSolution { }; option (google.api.method_signature) = "parent"; } -} - -// A storage volume. -message Volume { - option (google.api.resource) = { - type: "baremetalsolution.googleapis.com/Volume" - pattern: "projects/{project}/locations/{location}/volumes/{volume}" - }; - - // Details about snapshot space reservation and usage on the storage volume. - message SnapshotReservationDetail { - // The space on this storage volume reserved for snapshots, shown in GiB. - int64 reserved_space_gib = 1; - - // The percent of snapshot space on this storage volume actually being used - // by the snapshot copies. This value might be higher than 100% if the - // snapshot copies have overflowed into the data portion of the storage - // volume. - int32 reserved_space_used_percent = 2; - - // The amount, in GiB, of available space in this storage volume's reserved - // snapshot space. - int64 reserved_space_remaining_gib = 3; - } - - // The storage type for a volume. - enum StorageType { - // The storage type for this volume is unknown. - STORAGE_TYPE_UNSPECIFIED = 0; - - // The storage type for this volume is SSD. - SSD = 1; - - // This storage type for this volume is HDD. - HDD = 2; - } - - // The possible states for a storage volume. - enum State { - // The storage volume is in an unknown state. - STATE_UNSPECIFIED = 0; - - // The storage volume is being created. - CREATING = 1; - - // The storage volume is ready for use. - READY = 2; - - // The storage volume has been requested to be deleted. - DELETING = 3; - } - - // The kinds of auto delete behavior to use when snapshot reserved space is - // full. - enum SnapshotAutoDeleteBehavior { - // The unspecified behavior. - SNAPSHOT_AUTO_DELETE_BEHAVIOR_UNSPECIFIED = 0; - - // Don't delete any snapshots. This disables new snapshot creation, as - // long as the snapshot reserved space is full. - DISABLED = 1; - - // Delete the oldest snapshots first. - OLDEST_FIRST = 2; - - // Delete the newest snapshots first. - NEWEST_FIRST = 3; - } - - // Output only. The resource name of this `Volume`. - // Resource names are schemeless URIs that follow the conventions in - // https://cloud.google.com/apis/design/resource_names. - // Format: - // `projects/{project}/locations/{location}/volumes/{volume}` - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The storage type for this volume. - StorageType storage_type = 2; - - // The state of this storage volume. - State state = 3; - - // The requested size of this storage volume, in GiB. - int64 requested_size_gib = 4; - - // The current size of this storage volume, in GiB, including space reserved - // for snapshots. This size might be different than the requested size if the - // storage volume has been configured with auto grow or auto shrink. - int64 current_size_gib = 5; - - // The size, in GiB, that this storage volume has expanded as a result of an - // auto grow policy. In the absence of auto-grow, the value is 0. - int64 auto_grown_size_gib = 6; - - // The space remaining in the storage volume for new LUNs, in GiB, excluding - // space reserved for snapshots. - int64 remaining_space_gib = 7; - - // Details about snapshot space reservation and usage on the storage volume. - SnapshotReservationDetail snapshot_reservation_detail = 8; - - // The behavior to use when snapshot reserved space is full. - SnapshotAutoDeleteBehavior snapshot_auto_delete_behavior = 9; - - // The name of the snapshot schedule policy in use for this volume, if any. - string snapshot_schedule_policy = 10 [(google.api.resource_reference) = { - type: "baremetalsolution.googleapis.com/SnapshotSchedulePolicy" - }]; -} - -// Message for requesting a list of storage volumes. -message ListVolumesRequest { - // Required. Parent value for ListVolumesRequest. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Requested page size. The server might return fewer items than requested. - // If unspecified, server will pick an appropriate default. - int32 page_size = 2; - - // A token identifying a page of results from the server. - string page_token = 3; -} - -// Response message containing the list of storage volumes. -message ListVolumesResponse { - // The list of storage volumes. - repeated Volume volumes = 1; - - // A token identifying a page of results from the server. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// Message for requesting storage volume information. -message GetVolumeRequest { - // Required. Name of the resource. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "baremetalsolution.googleapis.com/Volume" - } - ]; -} - -// A storage volume logical unit number (LUN). -message Lun { - option (google.api.resource) = { - type: "baremetalsolution.googleapis.com/Lun" - pattern: "projects/{project}/locations/{location}/volumes/{volume}/luns/{lun}" - }; - - // The possible states for the LUN. - enum State { - // The LUN is in an unknown state. - STATE_UNSPECIFIED = 0; - - // The LUN is being created. - CREATING = 1; - - // The LUN is being updated. - UPDATING = 2; - - // The LUN is ready for use. - READY = 3; - - // The LUN has been requested to be deleted. - DELETING = 4; - } - - // Display the operating systems present for the LUN multiprotocol type. - enum MultiprotocolType { - // Server has no OS specified. - MULTIPROTOCOL_TYPE_UNSPECIFIED = 0; - - // Server with Linux OS. - LINUX = 1; - } - - // The storage types for a LUN. - enum StorageType { - // The storage type for this LUN is unknown. - STORAGE_TYPE_UNSPECIFIED = 0; - - // This storage type for this LUN is SSD. - SSD = 1; - - // This storage type for this LUN is HDD. - HDD = 2; - } - - // Output only. The name of the LUN. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The state of this storage volume. - State state = 2; - - // The size of this LUN, in gigabytes. - int64 size_gb = 3; - - // The LUN multiprotocol type ensures the characteristics of the LUN are - // optimized for each operating system. - MultiprotocolType multiprotocol_type = 4; - // Display the storage volume for this LUN. - string storage_volume = 5 [(google.api.resource_reference) = { - type: "baremetalsolution.googleapis.com/Volume" - }]; - - // Display if this LUN can be shared between multiple physical servers. - bool shareable = 6; - - // Display if this LUN is a boot LUN. - bool boot_lun = 7; - - // The storage type for this LUN. - StorageType storage_type = 8; - - // The WWID for this LUN. - string wwid = 9; -} - -// A Network. -message Network { - option (google.api.resource) = { - type: "baremetalsolution.googleapis.com/Network" - pattern: "projects/{project}/locations/{location}/networks/{network}" - }; - - // Network type. - enum Type { - // Unspecified value. - TYPE_UNSPECIFIED = 0; - - // Client network, a network peered to a Google Cloud VPC. - CLIENT = 1; - - // Private network, a network local to the Bare Metal Solution environment. - PRIVATE = 2; - } - - // The possible states for this Network. - enum State { - // The Network is in an unknown state. - STATE_UNSPECIFIED = 0; - - // The Network is provisioning. - PROVISIONING = 1; - - // The Network has been provisioned. - PROVISIONED = 2; - } - - // Output only. The resource name of this `Network`. - // Resource names are schemeless URIs that follow the conventions in - // https://cloud.google.com/apis/design/resource_names. - // Format: - // `projects/{project}/locations/{location}/networks/{network}` - // This field will contain the same value as field "network", which will soon - // be deprecated. Please use this field to reference the name of the network - // resource. - string name = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Name of the network. - string network = 1; - - // The type of this network. - Type type = 2; - - // IP address configured. - string ip_address = 3; - - // List of physical interfaces. - repeated string mac_address = 4; - - // The Network state. - State state = 6; - - // The vlan id of the Network. - string vlan_id = 7; - - // The cidr of the Network. - string cidr = 8; - - // The vrf for the Network. - VRF vrf = 9; -} - -// A network VRF. -message VRF { - // QOS policy parameters. - message QosPolicy { - // The bandwidth permitted by the QOS policy, in gbps. - double bandwidth_gbps = 1; - } - - // VLAN attachment details. - message VlanAttachment { - // The peer vlan ID of the attachment. - int64 peer_vlan_id = 1; - - // The peer IP of the attachment. - string peer_ip = 2; - - // The router IP of the attachment. - string router_ip = 3; + // Get details of a single NFS share. + rpc GetNfsShare(GetNfsShareRequest) returns (NfsShare) { + option (google.api.http) = { + get: "/v2/{name=projects/*/locations/*/nfsShares/*}" + }; + option (google.api.method_signature) = "name"; } - // The possible states for this VRF. - enum State { - // The unspecified state. - STATE_UNSPECIFIED = 0; - - // The vrf is provisioning. - PROVISIONING = 1; - - // The vrf is provisioned. - PROVISIONED = 2; + // List NFS shares. + rpc ListNfsShares(ListNfsSharesRequest) returns (ListNfsSharesResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/locations/*}/nfsShares" + }; + option (google.api.method_signature) = "parent"; } - // The name of the VRF. - string name = 1; - - // The possible state of VRF. - State state = 5; - - // The QOS policy applied to this VRF. - QosPolicy qos_policy = 6; - - // The list of VLAN attachments for the VRF. - repeated VlanAttachment vlan_attachments = 7; -} - -// Message for requesting a list of networks. -message ListNetworksRequest { - // Required. Parent value for ListNetworksRequest. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Requested page size. The server might return fewer items than requested. - // If unspecified, server will pick an appropriate default. - int32 page_size = 2; - - // A token identifying a page of results from the server. - string page_token = 3; -} - -// Response message containing the list of networks. -message ListNetworksResponse { - // The list of networks. - repeated Network networks = 1; - - // A token identifying a page of results from the server. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// Message for requesting network information. -message GetNetworkRequest { - // Required. Name of the resource. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "baremetalsolution.googleapis.com/Network" - } - ]; -} - -// Message for requesting snapshot schedule policy information. -message GetSnapshotSchedulePolicyRequest { - // Required. Name of the resource. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "baremetalsolution.googleapis.com/SnapshotSchedulePolicy" - } - ]; -} - -// A server. -message Instance { - option (google.api.resource) = { - type: "baremetalsolution.googleapis.com/Instance" - pattern: "projects/{project}/locations/{location}/instances/{instance}" - }; - - // The possible states for this server. - enum State { - // The server is in an unknown state. - STATE_UNSPECIFIED = 0; - - // The server is being provisioned. - PROVISIONING = 1; - - // The server is running. - RUNNING = 2; - - // The server has been deleted. - DELETED = 3; + // Update details of a single NFS share. + rpc UpdateNfsShare(UpdateNfsShareRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v2/{nfs_share.name=projects/*/locations/*/nfsShares/*}" + body: "nfs_share" + }; + option (google.api.method_signature) = "nfs_share,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "NfsShare" + metadata_type: "OperationMetadata" + }; } - - // Output only. The resource name of this `Instance`. - // Resource names are schemeless URIs that follow the conventions in - // https://cloud.google.com/apis/design/resource_names. - // Format: - // `projects/{project}/locations/{location}/instances/{instance}` - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Create a time stamp. - google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Update a time stamp. - google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The server type. - // [Available server - // types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) - string machine_type = 4; - - // The state of the server. - State state = 5; - - // True if you enable hyperthreading for the server, otherwise false. - // The default value is false. - bool hyperthreading_enabled = 6; - - // Labels as key value pairs. - map labels = 7; - - // List of LUNs associated with this server. - repeated Lun luns = 8; - - // List of networks associated with this server. - repeated Network networks = 9; - - // True if the interactive serial console feature is enabled for the instance, - // false otherwise. - // The default value is false. - bool interactive_serial_console_enabled = 10; -} - -// Message for requesting the list of servers. -message ListInstancesRequest { - // Required. Parent value for ListInstancesRequest. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Requested page size. Server may return fewer items than requested. - // If unspecified, the server will pick an appropriate default. - int32 page_size = 2; - - // A token identifying a page of results from the server. - string page_token = 3; -} - -// Response message for the list of servers. -message ListInstancesResponse { - // The list of servers. - repeated Instance instances = 1; - - // A token identifying a page of results from the server. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// Message for requesting server information. -message GetInstanceRequest { - // Required. Name of the resource. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "baremetalsolution.googleapis.com/Instance" - } - ]; -} - -// Message requesting to reset a server. -message ResetInstanceRequest { - // Required. Name of the resource. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "baremetalsolution.googleapis.com/Instance" - } - ]; -} - -// Response message from resetting a server. -message ResetInstanceResponse { - -} - -// Message for requesting storage volume snapshot information. -message GetVolumeSnapshotRequest { - // Required. Name of the resource. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "baremetalsolution.googleapis.com/VolumeSnapshot" - } - ]; -} - -// Message for requesting a list of storage volume snapshots. -message ListVolumeSnapshotsRequest { - // Required. Parent value for ListVolumesRequest. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "baremetalsolution.googleapis.com/Volume" - } - ]; - - // Requested page size. The server might return fewer items than requested. - // If unspecified, server will pick an appropriate default. - int32 page_size = 2; - - // A token identifying a page of results from the server. - string page_token = 3; -} - -// Response message containing the list of storage volume snapshots. -message ListVolumeSnapshotsResponse { - // The list of storage volumes. - repeated VolumeSnapshot volume_snapshots = 1; - - // A token identifying a page of results from the server. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// Message for deleting named Volume snapshot. -message DeleteVolumeSnapshotRequest { - // Required. The name of the snapshot to delete. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "baremetalsolution.googleapis.com/VolumeSnapshot" - } - ]; } // Represents the metadata from a long-running operation. @@ -814,207 +284,7 @@ message OperationMetadata { string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; } -// Snapshot registered for a given storage volume. -message VolumeSnapshot { - option (google.api.resource) = { - type: "baremetalsolution.googleapis.com/VolumeSnapshot" - pattern: "projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot}" - }; - - // Output only. The name of the storage volume snapshot. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The description of the storage volume snapshot. - string description = 2; - - // The size of the storage volume snapshot, in bytes. - int64 size_bytes = 3; - - // Optional. The creation time of the storage volume snapshot. - google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OPTIONAL]; - - // The storage volume this snapshot belongs to. - string storage_volume = 5 [(google.api.resource_reference) = { - type: "baremetalsolution.googleapis.com/Volume" - }]; -} - -// A snapshot schedule policy. -message SnapshotSchedulePolicy { - option (google.api.resource) = { - type: "baremetalsolution.googleapis.com/SnapshotSchedulePolicy" - pattern: "projects/{project}/locations/{location}/snapshotSchedulePolicies/{snapshot_schedule_policy}" - }; - - // A snapshot schedule. - message Schedule { - // A crontab-like specification that the schedule uses to take - // snapshots. - string crontab_spec = 1; - - // The maximum number of snapshots to retain in this schedule. - int32 retention_count = 2; - - // A list of snapshot names created in this schedule. - string prefix = 3; - } - - // Output only. The name of the snapshot schedule policy. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The description of the snapshot schedule policy. - string description = 2; - - // The snapshot schedules contained in this policy. You can specify a maximum - // of 5 schedules. - repeated Schedule schedules = 3; -} - -// Message for requesting a list of snapshot schedule policies. -message ListSnapshotSchedulePoliciesRequest { - // Required. The parent project containing the Snapshot Schedule Policies. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // The maximum number of items to return. - int32 page_size = 2; - - // The next_page_token value returned from a previous List request, if any. - string page_token = 3; -} - -// Response message containing the list of snapshot schedule policies. -message ListSnapshotSchedulePoliciesResponse { - // The snapshot schedule policies registered in this project. - repeated SnapshotSchedulePolicy snapshot_schedule_policies = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; -} - -// Message for creating a snapshot schedule policy in a project. -message CreateSnapshotSchedulePolicyRequest { - // Required. The parent project and location containing the SnapshotSchedulePolicy. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. The SnapshotSchedulePolicy to create. - SnapshotSchedulePolicy snapshot_schedule_policy = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. Snapshot policy ID - string snapshot_schedule_policy_id = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Message for updating a snapshot schedule policy in a project. -message UpdateSnapshotSchedulePolicyRequest { - // Required. The snapshot schedule policy to update. - // - // The `name` field is used to identify the snapshot schedule policy to - // update. Format: - // projects/{project}/locations/global/snapshotSchedulePolicies/{policy} - SnapshotSchedulePolicy snapshot_schedule_policy = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The list of fields to update. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Message for deleting a snapshot schedule policy in a project. -message DeleteSnapshotSchedulePolicyRequest { - // Required. The name of the snapshot schedule policy to delete. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "baremetalsolution.googleapis.com/SnapshotSchedulePolicy" - } - ]; -} - -// Message for updating a volume. -message UpdateVolumeRequest { - // Required. The volume to update. - // - // The `name` field is used to identify the volume to update. - // Format: projects/{project}/locations/{location}/volumes/{volume} - Volume volume = 1 [(google.api.field_behavior) = REQUIRED]; - - // The list of fields to update. - // The only currently supported fields are: - // `snapshot_auto_delete_behavior` - // `snapshot_schedule_policy_name` - google.protobuf.FieldMask update_mask = 2; -} - -// Message for requesting storage lun information. -message GetLunRequest { - // Required. Name of the resource. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "baremetalsolution.googleapis.com/Lun" - } - ]; -} - -// Message for requesting a list of storage volume luns. -message ListLunsRequest { - // Required. Parent value for ListLunsRequest. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "baremetalsolution.googleapis.com/Volume" - } - ]; - - // Requested page size. The server might return fewer items than requested. - // If unspecified, server will pick an appropriate default. - int32 page_size = 2; - - // A token identifying a page of results from the server. - string page_token = 3; -} - -// Response message containing the list of storage volume luns. -message ListLunsResponse { - // The list of luns. - repeated Lun luns = 1; - - // A token identifying a page of results from the server. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// Message for creating a volume snapshot. -message CreateVolumeSnapshotRequest { - // Required. The volume to snapshot. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "baremetalsolution.googleapis.com/Volume" - } - ]; - - // Required. The volume snapshot to create. Only the description field may be specified. - VolumeSnapshot volume_snapshot = 2 [(google.api.field_behavior) = REQUIRED]; -} +// Response message from resetting a server. +message ResetInstanceResponse { -// Message for restoring a volume snapshot. -message RestoreVolumeSnapshotRequest { - // Required. Name of the resource. - string volume_snapshot = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "baremetalsolution.googleapis.com/VolumeSnapshot" - } - ]; } diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/proto/google/cloud/baremetalsolution/v2/instance.proto b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/proto/google/cloud/baremetalsolution/v2/instance.proto new file mode 100644 index 000000000000..49105bd8ca14 --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/proto/google/cloud/baremetalsolution/v2/instance.proto @@ -0,0 +1,288 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.baremetalsolution.v2; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/baremetalsolution/v2/lun.proto"; +import "google/cloud/baremetalsolution/v2/network.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.BareMetalSolution.V2"; +option go_package = "google.golang.org/genproto/googleapis/cloud/baremetalsolution/v2;baremetalsolution"; +option java_multiple_files = true; +option java_outer_classname = "InstanceProto"; +option java_package = "com.google.cloud.baremetalsolution.v2"; +option php_namespace = "Google\\Cloud\\BareMetalSolution\\V2"; +option ruby_package = "Google::Cloud::BareMetalSolution::V2"; + +// A server. +message Instance { + option (google.api.resource) = { + type: "baremetalsolution.googleapis.com/Instance" + pattern: "projects/{project}/locations/{location}/instances/{instance}" + }; + + // The possible states for this server. + enum State { + // The server is in an unknown state. + STATE_UNSPECIFIED = 0; + + // The server is being provisioned. + PROVISIONING = 1; + + // The server is running. + RUNNING = 2; + + // The server has been deleted. + DELETED = 3; + } + + // Output only. The resource name of this `Instance`. + // Resource names are schemeless URIs that follow the conventions in + // https://cloud.google.com/apis/design/resource_names. + // Format: + // `projects/{project}/locations/{location}/instances/{instance}` + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // An identifier for the `Instance`, generated by the backend. + string id = 11; + + // Output only. Create a time stamp. + google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Update a time stamp. + google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The server type. + // [Available server + // types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) + string machine_type = 4; + + // The state of the server. + State state = 5; + + // True if you enable hyperthreading for the server, otherwise false. + // The default value is false. + bool hyperthreading_enabled = 6; + + // Labels as key value pairs. + map labels = 7; + + // List of LUNs associated with this server. + repeated Lun luns = 8; + + // List of networks associated with this server. + repeated Network networks = 9; + + // True if the interactive serial console feature is enabled for the instance, + // false otherwise. + // The default value is false. + bool interactive_serial_console_enabled = 10; + + // The OS image currently installed on the server. + string os_image = 12; + + // Immutable. Pod name. + // Pod is an independent part of infrastructure. + // Instance can be connected to the assets (networks, volumes) allocated + // in the same pod only. + string pod = 13 [(google.api.field_behavior) = IMMUTABLE]; + + // Instance network template name. For eg, bondaa-bondaa, bondab-nic, etc. + // Generally, the template name follows the syntax of + // "bond" or "nic". + string network_template = 14 [(google.api.resource_reference) = { + type: "baremetalsolution.googleapis.com/ServerNetworkTemplate" + }]; + + // List of logical interfaces for the instance. The number of logical + // interfaces will be the same as number of hardware bond/nic on the chosen + // network template. For the non-multivlan configurations (for eg, existing + // servers) that use existing default network template (bondaa-bondaa), both + // the Instance.networks field and the Instance.logical_interfaces fields will + // be filled to ensure backward compatibility. For the others, only + // Instance.logical_interfaces will be filled. + repeated LogicalInterface logical_interfaces = 15; +} + +// Message for requesting server information. +message GetInstanceRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "baremetalsolution.googleapis.com/Instance" + } + ]; +} + +// Message for requesting the list of servers. +message ListInstancesRequest { + // Required. Parent value for ListInstancesRequest. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Requested page size. Server may return fewer items than requested. + // If unspecified, the server will pick an appropriate default. + int32 page_size = 2; + + // A token identifying a page of results from the server. + string page_token = 3; + + // List filter. + string filter = 4; +} + +// Response message for the list of servers. +message ListInstancesResponse { + // The list of servers. + repeated Instance instances = 1; + + // A token identifying a page of results from the server. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Message requesting to updating a server. +message UpdateInstanceRequest { + // Required. The server to update. + // + // The `name` field is used to identify the instance to update. + // Format: projects/{project}/locations/{location}/instances/{instance} + Instance instance = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to update. + // The currently supported fields are: + // `labels` + // `hyperthreading_enabled` + // `os_image` + google.protobuf.FieldMask update_mask = 2; +} + +// Message requesting to reset a server. +message ResetInstanceRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "baremetalsolution.googleapis.com/Instance" + } + ]; +} + +// Message requesting to start a server. +message StartInstanceRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "baremetalsolution.googleapis.com/Instance" + } + ]; +} + +// Message requesting to stop a server. +message StopInstanceRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "baremetalsolution.googleapis.com/Instance" + } + ]; +} + +// Message for detach specific LUN from an Instance. +message DetachLunRequest { + // Required. Name of the instance. + string instance = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "baremetalsolution.googleapis.com/Instance" + } + ]; + + // Required. Name of the Lun to detach. + string lun = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "baremetalsolution.googleapis.com/Lun" + } + ]; +} + +// Network template. +message ServerNetworkTemplate { + option (google.api.resource) = { + type: "baremetalsolution.googleapis.com/ServerNetworkTemplate" + pattern: "projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}" + }; + + // Logical interface. + message LogicalInterface { + // Interface type. + enum InterfaceType { + // Unspecified value. + INTERFACE_TYPE_UNSPECIFIED = 0; + + // Bond interface type. + BOND = 1; + + // NIC interface type. + NIC = 2; + } + + // Interface name. + // This is not a globally unique identifier. + // Name is unique only inside the ServerNetworkTemplate. This is of syntax + // or + // and forms part of the network template name. + string name = 1; + + // Interface type. + InterfaceType type = 2; + + // If true, interface must have network connected. + bool required = 3; + } + + // Output only. Template's unique name. The full resource name follows the pattern: + // `projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}` + // Generally, the {server_network_template} follows the syntax of + // "bond" or "nic". + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Instance types this template is applicable to. + repeated string applicable_instance_types = 2; + + // Logical interfaces. + repeated LogicalInterface logical_interfaces = 3; +} + +// Response message from starting a server. +message StartInstanceResponse {} + +// Response message from stopping a server. +message StopInstanceResponse {} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/proto/google/cloud/baremetalsolution/v2/lun.proto b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/proto/google/cloud/baremetalsolution/v2/lun.proto new file mode 100644 index 000000000000..c165a5030812 --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/proto/google/cloud/baremetalsolution/v2/lun.proto @@ -0,0 +1,149 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.baremetalsolution.v2; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Cloud.BareMetalSolution.V2"; +option go_package = "google.golang.org/genproto/googleapis/cloud/baremetalsolution/v2;baremetalsolution"; +option java_multiple_files = true; +option java_outer_classname = "LunProto"; +option java_package = "com.google.cloud.baremetalsolution.v2"; +option php_namespace = "Google\\Cloud\\BareMetalSolution\\V2"; +option ruby_package = "Google::Cloud::BareMetalSolution::V2"; + +// A storage volume logical unit number (LUN). +message Lun { + option (google.api.resource) = { + type: "baremetalsolution.googleapis.com/Lun" + pattern: "projects/{project}/locations/{location}/volumes/{volume}/luns/{lun}" + }; + + // The possible states for the LUN. + enum State { + // The LUN is in an unknown state. + STATE_UNSPECIFIED = 0; + + // The LUN is being created. + CREATING = 1; + + // The LUN is being updated. + UPDATING = 2; + + // The LUN is ready for use. + READY = 3; + + // The LUN has been requested to be deleted. + DELETING = 4; + } + + // Display the operating systems present for the LUN multiprotocol type. + enum MultiprotocolType { + // Server has no OS specified. + MULTIPROTOCOL_TYPE_UNSPECIFIED = 0; + + // Server with Linux OS. + LINUX = 1; + } + + // The storage types for a LUN. + enum StorageType { + // The storage type for this LUN is unknown. + STORAGE_TYPE_UNSPECIFIED = 0; + + // This storage type for this LUN is SSD. + SSD = 1; + + // This storage type for this LUN is HDD. + HDD = 2; + } + + // Output only. The name of the LUN. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // An identifier for the LUN, generated by the backend. + string id = 10; + + // The state of this storage volume. + State state = 2; + + // The size of this LUN, in gigabytes. + int64 size_gb = 3; + + // The LUN multiprotocol type ensures the characteristics of the LUN are + // optimized for each operating system. + MultiprotocolType multiprotocol_type = 4; + + // Display the storage volume for this LUN. + string storage_volume = 5 [(google.api.resource_reference) = { + type: "baremetalsolution.googleapis.com/Volume" + }]; + + // Display if this LUN can be shared between multiple physical servers. + bool shareable = 6; + + // Display if this LUN is a boot LUN. + bool boot_lun = 7; + + // The storage type for this LUN. + StorageType storage_type = 8; + + // The WWID for this LUN. + string wwid = 9; +} + +// Message for requesting storage lun information. +message GetLunRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "baremetalsolution.googleapis.com/Lun" + } + ]; +} + +// Message for requesting a list of storage volume luns. +message ListLunsRequest { + // Required. Parent value for ListLunsRequest. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "baremetalsolution.googleapis.com/Volume" + } + ]; + + // Requested page size. The server might return fewer items than requested. + // If unspecified, server will pick an appropriate default. + int32 page_size = 2; + + // A token identifying a page of results from the server. + string page_token = 3; +} + +// Response message containing the list of storage volume luns. +message ListLunsResponse { + // The list of luns. + repeated Lun luns = 1; + + // A token identifying a page of results from the server. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/proto/google/cloud/baremetalsolution/v2/network.proto b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/proto/google/cloud/baremetalsolution/v2/network.proto new file mode 100644 index 000000000000..3f240de01ba2 --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/proto/google/cloud/baremetalsolution/v2/network.proto @@ -0,0 +1,284 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.baremetalsolution.v2; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.BareMetalSolution.V2"; +option go_package = "google.golang.org/genproto/googleapis/cloud/baremetalsolution/v2;baremetalsolution"; +option java_multiple_files = true; +option java_outer_classname = "NetworkProto"; +option java_package = "com.google.cloud.baremetalsolution.v2"; +option php_namespace = "Google\\Cloud\\BareMetalSolution\\V2"; +option ruby_package = "Google::Cloud::BareMetalSolution::V2"; + +// A Network. +message Network { + option (google.api.resource) = { + type: "baremetalsolution.googleapis.com/Network" + pattern: "projects/{project}/locations/{location}/networks/{network}" + }; + + // Network type. + enum Type { + // Unspecified value. + TYPE_UNSPECIFIED = 0; + + // Client network, a network peered to a Google Cloud VPC. + CLIENT = 1; + + // Private network, a network local to the Bare Metal Solution environment. + PRIVATE = 2; + } + + // The possible states for this Network. + enum State { + // The Network is in an unknown state. + STATE_UNSPECIFIED = 0; + + // The Network is provisioning. + PROVISIONING = 1; + + // The Network has been provisioned. + PROVISIONED = 2; + } + + // Output only. The resource name of this `Network`. + // Resource names are schemeless URIs that follow the conventions in + // https://cloud.google.com/apis/design/resource_names. + // Format: + // `projects/{project}/locations/{location}/networks/{network}` + string name = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // An identifier for the `Network`, generated by the backend. + string id = 10; + + // The type of this network. + Type type = 2; + + // IP address configured. + string ip_address = 3; + + // List of physical interfaces. + repeated string mac_address = 4; + + // The Network state. + State state = 6; + + // The vlan id of the Network. + string vlan_id = 7; + + // The cidr of the Network. + string cidr = 8; + + // The vrf for the Network. + VRF vrf = 9; + + // Labels as key value pairs. + map labels = 11; + + // IP range for reserved for services (e.g. NFS). + string services_cidr = 12; + + // List of IP address reservations in this network. + // When updating this field, an error will be generated if a reservation + // conflicts with an IP address already allocated to a physical server. + repeated NetworkAddressReservation reservations = 13; +} + +// A reservation of one or more addresses in a network. +message NetworkAddressReservation { + // The first address of this reservation block. + // Must be specified as a single IPv4 address, e.g. 10.1.2.2. + string start_address = 1; + + // The last address of this reservation block, inclusive. I.e., for cases when + // reservations are only single addresses, end_address and start_address will + // be the same. + // Must be specified as a single IPv4 address, e.g. 10.1.2.2. + string end_address = 2; + + // A note about this reservation, intended for human consumption. + string note = 3; +} + +// A network VRF. +message VRF { + // The possible states for this VRF. + enum State { + // The unspecified state. + STATE_UNSPECIFIED = 0; + + // The vrf is provisioning. + PROVISIONING = 1; + + // The vrf is provisioned. + PROVISIONED = 2; + } + + // QOS policy parameters. + message QosPolicy { + // The bandwidth permitted by the QOS policy, in gbps. + double bandwidth_gbps = 1; + } + + // VLAN attachment details. + message VlanAttachment { + // The peer vlan ID of the attachment. + int64 peer_vlan_id = 1; + + // The peer IP of the attachment. + string peer_ip = 2; + + // The router IP of the attachment. + string router_ip = 3; + } + + // The name of the VRF. + string name = 1; + + // The possible state of VRF. + State state = 5; + + // The QOS policy applied to this VRF. + QosPolicy qos_policy = 6; + + // The list of VLAN attachments for the VRF. + repeated VlanAttachment vlan_attachments = 7; +} + +// Each logical interface represents a logical abstraction of the underlying +// physical interface (for eg. bond, nic) of the instance. Each logical +// interface can effectively map to multiple network-IP pairs and still be +// mapped to one underlying physical interface. +message LogicalInterface { + // Each logical network interface is effectively a network and IP pair. + message LogicalNetworkInterface { + // Name of the network + string network = 1; + + // IP address in the network + string ip_address = 2; + + // Whether this interface is the default gateway for the instance. Only + // one interface can be the default gateway for the instance. + bool default_gateway = 3; + + // Type of network. + Network.Type network_type = 4; + + // An identifier for the `Network`, generated by the backend. + string id = 5; + } + + // List of logical network interfaces within a logical interface. + repeated LogicalNetworkInterface logical_network_interfaces = 1; + + // Interface name. This is of syntax or and + // forms part of the network template name. + string name = 2; + + // The index of the logical interface mapping to the index of the hardware + // bond or nic on the chosen network template. + int32 interface_index = 3; +} + +// Message for requesting network information. +message GetNetworkRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "baremetalsolution.googleapis.com/Network" + } + ]; +} + +// Message for requesting a list of networks. +message ListNetworksRequest { + // Required. Parent value for ListNetworksRequest. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Requested page size. The server might return fewer items than requested. + // If unspecified, server will pick an appropriate default. + int32 page_size = 2; + + // A token identifying a page of results from the server. + string page_token = 3; + + // List filter. + string filter = 4; +} + +// Response message containing the list of networks. +message ListNetworksResponse { + // The list of networks. + repeated Network networks = 1; + + // A token identifying a page of results from the server. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Message requesting to updating a network. +message UpdateNetworkRequest { + // Required. The network to update. + // + // The `name` field is used to identify the instance to update. + // Format: projects/{project}/locations/{location}/networks/{network} + Network network = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to update. + // The only currently supported fields are: + // `labels`, `reservations` + google.protobuf.FieldMask update_mask = 2; +} + +// Network with all used IP addresses. +message NetworkUsage { + // Network. + Network network = 1; + + // All used IP addresses in this network. + repeated string used_ips = 2; +} + +// Request to get networks with IPs. +message ListNetworkUsageRequest { + // Required. Parent value (project and location). + string location = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; +} + +// Response with Networks with IPs +message ListNetworkUsageResponse { + // Networks with IPs. + repeated NetworkUsage networks = 1; +} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/proto/google/cloud/baremetalsolution/v2/nfs_share.proto b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/proto/google/cloud/baremetalsolution/v2/nfs_share.proto new file mode 100644 index 000000000000..29d2a808dddf --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/proto/google/cloud/baremetalsolution/v2/nfs_share.proto @@ -0,0 +1,164 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.baremetalsolution.v2; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.BareMetalSolution.V2"; +option go_package = "google.golang.org/genproto/googleapis/cloud/baremetalsolution/v2;baremetalsolution"; +option java_multiple_files = true; +option java_outer_classname = "NfsShareProto"; +option java_package = "com.google.cloud.baremetalsolution.v2"; +option php_namespace = "Google\\Cloud\\BareMetalSolution\\V2"; +option ruby_package = "Google::Cloud::BareMetalSolution::V2"; + +// An NFS share. +message NfsShare { + option (google.api.resource) = { + type: "baremetalsolution.googleapis.com/NFSShare" + pattern: "projects/{project}/locations/{location}/nfsShares/{nfs_share}" + }; + + // The possible states for this NFS share. + enum State { + // The share is in an unknown state. + STATE_UNSPECIFIED = 0; + + // The share has been provisioned. + PROVISIONED = 1; + } + + // The possible mount permissions. + enum MountPermissions { + // Permissions were not specified. + MOUNT_PERMISSIONS_UNSPECIFIED = 0; + + // NFS share can be mount with read-only permissions. + READ = 1; + + // NFS share can be mount with read-write permissions. + READ_WRITE = 2; + } + + // Represents an 'access point' for the share. + message AllowedClient { + // The network the access point sits on. + string network = 1 [(google.api.resource_reference) = { + type: "baremetalsolution.googleapis.com/Network" + }]; + + // The IP address of the share on this network. + string share_ip = 2; + + // The subnet of IP addresses permitted to access the share. + string allowed_clients_cidr = 3; + + // Mount permissions. + MountPermissions mount_permissions = 4; + + // Allow dev flag. Which controls whether to allow creation of devices. + bool allow_dev = 5; + + // Allow the setuid flag. + bool allow_suid = 6; + + // Disable root squashing, which is a feature of NFS. + // Root squash is a special mapping of the remote superuser (root) identity + // when using identity authentication. + bool no_root_squash = 7; + } + + // Output only. The name of the NFS share. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. An identifier for the NFS share, generated by the backend. + string nfs_share_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The state of the NFS share. + State state = 3; + + // The volume containing the share. + string volume = 4 [(google.api.resource_reference) = { + type: "baremetalsolution.googleapis.com/Volume" + }]; + + // List of allowed access points. + repeated AllowedClient allowed_clients = 5; + + // Labels as key value pairs. + map labels = 6; +} + +// Message for requesting NFS share information. +message GetNfsShareRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "baremetalsolution.googleapis.com/NFSShare" + } + ]; +} + +// Message for requesting a list of NFS shares. +message ListNfsSharesRequest { + // Required. Parent value for ListNfsSharesRequest. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Requested page size. The server might return fewer items than requested. + // If unspecified, server will pick an appropriate default. + int32 page_size = 2; + + // A token identifying a page of results from the server. + string page_token = 3; + + // List filter. + string filter = 4; +} + +// Response message containing the list of NFS shares. +message ListNfsSharesResponse { + // The list of NFS shares. + repeated NfsShare nfs_shares = 1; + + // A token identifying a page of results from the server. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Message requesting to updating a NFS share. +message UpdateNfsShareRequest { + // Required. The NFS share to update. + // + // The `name` field is used to identify the NFS share to update. + // Format: projects/{project}/locations/{location}/nfsShares/{nfs_share} + NfsShare nfs_share = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to update. + // The only currently supported fields are: + // `labels` + google.protobuf.FieldMask update_mask = 2; +} diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/proto/google/cloud/baremetalsolution/v2/volume.proto b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/proto/google/cloud/baremetalsolution/v2/volume.proto new file mode 100644 index 000000000000..39d66f9ceed8 --- /dev/null +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/proto/google/cloud/baremetalsolution/v2/volume.proto @@ -0,0 +1,231 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.baremetalsolution.v2; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.BareMetalSolution.V2"; +option go_package = "google.golang.org/genproto/googleapis/cloud/baremetalsolution/v2;baremetalsolution"; +option java_multiple_files = true; +option java_outer_classname = "VolumeProto"; +option java_package = "com.google.cloud.baremetalsolution.v2"; +option php_namespace = "Google\\Cloud\\BareMetalSolution\\V2"; +option ruby_package = "Google::Cloud::BareMetalSolution::V2"; + +// A storage volume. +message Volume { + option (google.api.resource) = { + type: "baremetalsolution.googleapis.com/Volume" + pattern: "projects/{project}/locations/{location}/volumes/{volume}" + }; + + // The storage type for a volume. + enum StorageType { + // The storage type for this volume is unknown. + STORAGE_TYPE_UNSPECIFIED = 0; + + // The storage type for this volume is SSD. + SSD = 1; + + // This storage type for this volume is HDD. + HDD = 2; + } + + // The possible states for a storage volume. + enum State { + // The storage volume is in an unknown state. + STATE_UNSPECIFIED = 0; + + // The storage volume is being created. + CREATING = 1; + + // The storage volume is ready for use. + READY = 2; + + // The storage volume has been requested to be deleted. + DELETING = 3; + } + + // Details about snapshot space reservation and usage on the storage volume. + message SnapshotReservationDetail { + // The space on this storage volume reserved for snapshots, shown in GiB. + int64 reserved_space_gib = 1; + + // The percent of snapshot space on this storage volume actually being used + // by the snapshot copies. This value might be higher than 100% if the + // snapshot copies have overflowed into the data portion of the storage + // volume. + int32 reserved_space_used_percent = 2; + + // The amount, in GiB, of available space in this storage volume's reserved + // snapshot space. + int64 reserved_space_remaining_gib = 3; + + // Percent of the total Volume size reserved for snapshot copies. + // Enabling snapshots requires reserving 20% or more of + // the storage volume space for snapshots. Maximum reserved space for + // snapshots is 40%. + // Setting this field will effectively set snapshot_enabled to true. + int32 reserved_space_percent = 4; + } + + // The kinds of auto delete behavior to use when snapshot reserved space is + // full. + enum SnapshotAutoDeleteBehavior { + // The unspecified behavior. + SNAPSHOT_AUTO_DELETE_BEHAVIOR_UNSPECIFIED = 0; + + // Don't delete any snapshots. This disables new snapshot creation, as + // long as the snapshot reserved space is full. + DISABLED = 1; + + // Delete the oldest snapshots first. + OLDEST_FIRST = 2; + + // Delete the newest snapshots first. + NEWEST_FIRST = 3; + } + + // Output only. The resource name of this `Volume`. + // Resource names are schemeless URIs that follow the conventions in + // https://cloud.google.com/apis/design/resource_names. + // Format: + // `projects/{project}/locations/{location}/volumes/{volume}` + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // An identifier for the `Volume`, generated by the backend. + string id = 11; + + // The storage type for this volume. + StorageType storage_type = 2; + + // The state of this storage volume. + State state = 3; + + // The requested size of this storage volume, in GiB. + int64 requested_size_gib = 4; + + // The current size of this storage volume, in GiB, including space reserved + // for snapshots. This size might be different than the requested size if the + // storage volume has been configured with auto grow or auto shrink. + int64 current_size_gib = 5; + + // Additional emergency size that was requested for this Volume, in GiB. + // current_size_gib includes this value. + int64 emergency_size_gib = 14; + + // The size, in GiB, that this storage volume has expanded as a result of an + // auto grow policy. In the absence of auto-grow, the value is 0. + int64 auto_grown_size_gib = 6; + + // The space remaining in the storage volume for new LUNs, in GiB, excluding + // space reserved for snapshots. + int64 remaining_space_gib = 7; + + // Details about snapshot space reservation and usage on the storage volume. + SnapshotReservationDetail snapshot_reservation_detail = 8; + + // The behavior to use when snapshot reserved space is full. + SnapshotAutoDeleteBehavior snapshot_auto_delete_behavior = 9; + + // Labels as key value pairs. + map labels = 12; + + // Whether snapshots are enabled. + bool snapshot_enabled = 13; + + // Immutable. Pod name. + string pod = 15 [(google.api.field_behavior) = IMMUTABLE]; +} + +// Message for requesting storage volume information. +message GetVolumeRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "baremetalsolution.googleapis.com/Volume" + } + ]; +} + +// Message for requesting a list of storage volumes. +message ListVolumesRequest { + // Required. Parent value for ListVolumesRequest. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Requested page size. The server might return fewer items than requested. + // If unspecified, server will pick an appropriate default. + int32 page_size = 2; + + // A token identifying a page of results from the server. + string page_token = 3; + + // List filter. + string filter = 4; +} + +// Response message containing the list of storage volumes. +message ListVolumesResponse { + // The list of storage volumes. + repeated Volume volumes = 1; + + // A token identifying a page of results from the server. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Message for updating a volume. +message UpdateVolumeRequest { + // Required. The volume to update. + // + // The `name` field is used to identify the volume to update. + // Format: projects/{project}/locations/{location}/volumes/{volume} + Volume volume = 1 [(google.api.field_behavior) = REQUIRED]; + + // 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' + google.protobuf.FieldMask update_mask = 2; +} + +// Request for emergency resize Volume. +message ResizeVolumeRequest { + // Required. Volume to resize. + string volume = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "baremetalsolution.googleapis.com/Volume" + } + ]; + + // New Volume size, in GiB. + int64 size_gib = 2; +} diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/create/SyncCreateSetCredentialsProvider.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..a3a87297b183 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_create_setcredentialsprovider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionSettings; +import com.google.cloud.baremetalsolution.v2.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + BareMetalSolutionSettings bareMetalSolutionSettings = + BareMetalSolutionSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + BareMetalSolutionClient bareMetalSolutionClient = + BareMetalSolutionClient.create(bareMetalSolutionSettings); + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_create_setcredentialsprovider_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/create/SyncCreateSetCredentialsProvider1.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..9b387080fde5 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START +// baremetalsolution_v2_generated_baremetalsolutionclient_create_setcredentialsprovider1_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // 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); + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_create_setcredentialsprovider1_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/create/SyncCreateSetEndpoint.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..875f49cca737 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/create/SyncCreateSetEndpoint.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_create_setendpoint_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionSettings; +import com.google.cloud.baremetalsolution.v2.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + BareMetalSolutionSettings bareMetalSolutionSettings = + BareMetalSolutionSettings.newBuilder().setEndpoint(myEndpoint).build(); + BareMetalSolutionClient bareMetalSolutionClient = + BareMetalSolutionClient.create(bareMetalSolutionSettings); + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_create_setendpoint_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/detachlun/AsyncDetachLun.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/detachlun/AsyncDetachLun.java new file mode 100644 index 000000000000..71244dd3984d --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/detachlun/AsyncDetachLun.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_detachlun_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.DetachLunRequest; +import com.google.cloud.baremetalsolution.v2.InstanceName; +import com.google.cloud.baremetalsolution.v2.LunName; +import com.google.longrunning.Operation; + +public class AsyncDetachLun { + + public static void main(String[] args) throws Exception { + asyncDetachLun(); + } + + public static void asyncDetachLun() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + DetachLunRequest request = + DetachLunRequest.newBuilder() + .setInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setLun(LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString()) + .build(); + ApiFuture future = bareMetalSolutionClient.detachLunCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_detachlun_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/detachlun/AsyncDetachLunLRO.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/detachlun/AsyncDetachLunLRO.java new file mode 100644 index 000000000000..86555e685603 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/detachlun/AsyncDetachLunLRO.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_detachlun_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.DetachLunRequest; +import com.google.cloud.baremetalsolution.v2.Instance; +import com.google.cloud.baremetalsolution.v2.InstanceName; +import com.google.cloud.baremetalsolution.v2.LunName; +import com.google.cloud.baremetalsolution.v2.OperationMetadata; + +public class AsyncDetachLunLRO { + + public static void main(String[] args) throws Exception { + asyncDetachLunLRO(); + } + + public static void asyncDetachLunLRO() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + DetachLunRequest request = + DetachLunRequest.newBuilder() + .setInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setLun(LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString()) + .build(); + OperationFuture future = + bareMetalSolutionClient.detachLunOperationCallable().futureCall(request); + // Do something. + Instance response = future.get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_detachlun_lro_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/detachlun/SyncDetachLun.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/detachlun/SyncDetachLun.java new file mode 100644 index 000000000000..d789e2ce6f9f --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/detachlun/SyncDetachLun.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_detachlun_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.DetachLunRequest; +import com.google.cloud.baremetalsolution.v2.Instance; +import com.google.cloud.baremetalsolution.v2.InstanceName; +import com.google.cloud.baremetalsolution.v2.LunName; + +public class SyncDetachLun { + + public static void main(String[] args) throws Exception { + syncDetachLun(); + } + + public static void syncDetachLun() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + DetachLunRequest request = + DetachLunRequest.newBuilder() + .setInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setLun(LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString()) + .build(); + Instance response = bareMetalSolutionClient.detachLunAsync(request).get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_detachlun_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/detachlun/SyncDetachLunInstancenameLunname.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/detachlun/SyncDetachLunInstancenameLunname.java new file mode 100644 index 000000000000..35c72e450b01 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/detachlun/SyncDetachLunInstancenameLunname.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_detachlun_instancenamelunname_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.Instance; +import com.google.cloud.baremetalsolution.v2.InstanceName; +import com.google.cloud.baremetalsolution.v2.LunName; + +public class SyncDetachLunInstancenameLunname { + + public static void main(String[] args) throws Exception { + syncDetachLunInstancenameLunname(); + } + + public static void syncDetachLunInstancenameLunname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + InstanceName instance = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + LunName lun = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]"); + Instance response = bareMetalSolutionClient.detachLunAsync(instance, lun).get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_detachlun_instancenamelunname_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/detachlun/SyncDetachLunInstancenameString.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/detachlun/SyncDetachLunInstancenameString.java new file mode 100644 index 000000000000..768a009d308d --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/detachlun/SyncDetachLunInstancenameString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_detachlun_instancenamestring_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.Instance; +import com.google.cloud.baremetalsolution.v2.InstanceName; +import com.google.cloud.baremetalsolution.v2.LunName; + +public class SyncDetachLunInstancenameString { + + public static void main(String[] args) throws Exception { + syncDetachLunInstancenameString(); + } + + public static void syncDetachLunInstancenameString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + InstanceName instance = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + String lun = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString(); + Instance response = bareMetalSolutionClient.detachLunAsync(instance, lun).get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_detachlun_instancenamestring_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/detachlun/SyncDetachLunStringLunname.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/detachlun/SyncDetachLunStringLunname.java new file mode 100644 index 000000000000..59b2861216d9 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/detachlun/SyncDetachLunStringLunname.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_detachlun_stringlunname_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.Instance; +import com.google.cloud.baremetalsolution.v2.InstanceName; +import com.google.cloud.baremetalsolution.v2.LunName; + +public class SyncDetachLunStringLunname { + + public static void main(String[] args) throws Exception { + syncDetachLunStringLunname(); + } + + public static void syncDetachLunStringLunname() throws Exception { + // 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 instance = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString(); + LunName lun = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]"); + Instance response = bareMetalSolutionClient.detachLunAsync(instance, lun).get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_detachlun_stringlunname_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/detachlun/SyncDetachLunStringString.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/detachlun/SyncDetachLunStringString.java new file mode 100644 index 000000000000..22ee2a02d5e1 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/detachlun/SyncDetachLunStringString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_detachlun_stringstring_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.Instance; +import com.google.cloud.baremetalsolution.v2.InstanceName; +import com.google.cloud.baremetalsolution.v2.LunName; + +public class SyncDetachLunStringString { + + public static void main(String[] args) throws Exception { + syncDetachLunStringString(); + } + + public static void syncDetachLunStringString() throws Exception { + // 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 instance = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString(); + String lun = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString(); + Instance response = bareMetalSolutionClient.detachLunAsync(instance, lun).get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_detachlun_stringstring_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getinstance/AsyncGetInstance.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getinstance/AsyncGetInstance.java new file mode 100644 index 000000000000..a3945d0d8ca8 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getinstance/AsyncGetInstance.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_getinstance_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.GetInstanceRequest; +import com.google.cloud.baremetalsolution.v2.Instance; +import com.google.cloud.baremetalsolution.v2.InstanceName; + +public class AsyncGetInstance { + + public static void main(String[] args) throws Exception { + asyncGetInstance(); + } + + public static void asyncGetInstance() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + GetInstanceRequest request = + GetInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .build(); + ApiFuture future = + bareMetalSolutionClient.getInstanceCallable().futureCall(request); + // Do something. + Instance response = future.get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_getinstance_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getinstance/SyncGetInstance.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getinstance/SyncGetInstance.java new file mode 100644 index 000000000000..cc3f53c39d93 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getinstance/SyncGetInstance.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_getinstance_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.GetInstanceRequest; +import com.google.cloud.baremetalsolution.v2.Instance; +import com.google.cloud.baremetalsolution.v2.InstanceName; + +public class SyncGetInstance { + + public static void main(String[] args) throws Exception { + syncGetInstance(); + } + + public static void syncGetInstance() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + GetInstanceRequest request = + GetInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .build(); + Instance response = bareMetalSolutionClient.getInstance(request); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_getinstance_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getinstance/SyncGetInstanceInstancename.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getinstance/SyncGetInstanceInstancename.java new file mode 100644 index 000000000000..f0a4992a33c0 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getinstance/SyncGetInstanceInstancename.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_getinstance_instancename_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.Instance; +import com.google.cloud.baremetalsolution.v2.InstanceName; + +public class SyncGetInstanceInstancename { + + public static void main(String[] args) throws Exception { + syncGetInstanceInstancename(); + } + + public static void syncGetInstanceInstancename() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + Instance response = bareMetalSolutionClient.getInstance(name); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_getinstance_instancename_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getinstance/SyncGetInstanceString.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getinstance/SyncGetInstanceString.java new file mode 100644 index 000000000000..c1bf2c32e251 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getinstance/SyncGetInstanceString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_getinstance_string_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.Instance; +import com.google.cloud.baremetalsolution.v2.InstanceName; + +public class SyncGetInstanceString { + + public static void main(String[] args) throws Exception { + syncGetInstanceString(); + } + + public static void syncGetInstanceString() throws Exception { + // 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 = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString(); + Instance response = bareMetalSolutionClient.getInstance(name); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_getinstance_string_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getlun/AsyncGetLun.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getlun/AsyncGetLun.java new file mode 100644 index 000000000000..f0ac71ba10da --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getlun/AsyncGetLun.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_getlun_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.GetLunRequest; +import com.google.cloud.baremetalsolution.v2.Lun; +import com.google.cloud.baremetalsolution.v2.LunName; + +public class AsyncGetLun { + + public static void main(String[] args) throws Exception { + asyncGetLun(); + } + + public static void asyncGetLun() throws Exception { + // 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()) + .build(); + ApiFuture future = bareMetalSolutionClient.getLunCallable().futureCall(request); + // Do something. + Lun response = future.get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_getlun_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getlun/SyncGetLun.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getlun/SyncGetLun.java new file mode 100644 index 000000000000..7e1ea7f79393 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getlun/SyncGetLun.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_getlun_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.GetLunRequest; +import com.google.cloud.baremetalsolution.v2.Lun; +import com.google.cloud.baremetalsolution.v2.LunName; + +public class SyncGetLun { + + public static void main(String[] args) throws Exception { + syncGetLun(); + } + + public static void syncGetLun() throws Exception { + // 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()) + .build(); + Lun response = bareMetalSolutionClient.getLun(request); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_getlun_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getlun/SyncGetLunLunname.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getlun/SyncGetLunLunname.java new file mode 100644 index 000000000000..bf5634e3667e --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getlun/SyncGetLunLunname.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_getlun_lunname_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.Lun; +import com.google.cloud.baremetalsolution.v2.LunName; + +public class SyncGetLunLunname { + + public static void main(String[] args) throws Exception { + syncGetLunLunname(); + } + + public static void syncGetLunLunname() throws Exception { + // 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); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_getlun_lunname_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getlun/SyncGetLunString.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getlun/SyncGetLunString.java new file mode 100644 index 000000000000..960ffadf58bd --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getlun/SyncGetLunString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_getlun_string_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.Lun; +import com.google.cloud.baremetalsolution.v2.LunName; + +public class SyncGetLunString { + + public static void main(String[] args) throws Exception { + syncGetLunString(); + } + + public static void syncGetLunString() throws Exception { + // 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); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_getlun_string_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getnetwork/AsyncGetNetwork.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getnetwork/AsyncGetNetwork.java new file mode 100644 index 000000000000..f1e0402a1616 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getnetwork/AsyncGetNetwork.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_getnetwork_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.GetNetworkRequest; +import com.google.cloud.baremetalsolution.v2.Network; +import com.google.cloud.baremetalsolution.v2.NetworkName; + +public class AsyncGetNetwork { + + public static void main(String[] args) throws Exception { + asyncGetNetwork(); + } + + public static void asyncGetNetwork() throws Exception { + // 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()) + .build(); + ApiFuture future = bareMetalSolutionClient.getNetworkCallable().futureCall(request); + // Do something. + Network response = future.get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_getnetwork_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getnetwork/SyncGetNetwork.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getnetwork/SyncGetNetwork.java new file mode 100644 index 000000000000..e9965414d00e --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getnetwork/SyncGetNetwork.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_getnetwork_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.GetNetworkRequest; +import com.google.cloud.baremetalsolution.v2.Network; +import com.google.cloud.baremetalsolution.v2.NetworkName; + +public class SyncGetNetwork { + + public static void main(String[] args) throws Exception { + syncGetNetwork(); + } + + public static void syncGetNetwork() throws Exception { + // 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()) + .build(); + Network response = bareMetalSolutionClient.getNetwork(request); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_getnetwork_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getnetwork/SyncGetNetworkNetworkname.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getnetwork/SyncGetNetworkNetworkname.java new file mode 100644 index 000000000000..76671c6164b6 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getnetwork/SyncGetNetworkNetworkname.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_getnetwork_networkname_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.Network; +import com.google.cloud.baremetalsolution.v2.NetworkName; + +public class SyncGetNetworkNetworkname { + + public static void main(String[] args) throws Exception { + syncGetNetworkNetworkname(); + } + + public static void syncGetNetworkNetworkname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + NetworkName name = NetworkName.of("[PROJECT]", "[LOCATION]", "[NETWORK]"); + Network response = bareMetalSolutionClient.getNetwork(name); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_getnetwork_networkname_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getnetwork/SyncGetNetworkString.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getnetwork/SyncGetNetworkString.java new file mode 100644 index 000000000000..06954a26d1df --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getnetwork/SyncGetNetworkString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_getnetwork_string_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.Network; +import com.google.cloud.baremetalsolution.v2.NetworkName; + +public class SyncGetNetworkString { + + public static void main(String[] args) throws Exception { + syncGetNetworkString(); + } + + public static void syncGetNetworkString() throws Exception { + // 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); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_getnetwork_string_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getnfsshare/AsyncGetNfsShare.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getnfsshare/AsyncGetNfsShare.java new file mode 100644 index 000000000000..162584bdc153 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getnfsshare/AsyncGetNfsShare.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_getnfsshare_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.GetNfsShareRequest; +import com.google.cloud.baremetalsolution.v2.NFSShareName; +import com.google.cloud.baremetalsolution.v2.NfsShare; + +public class AsyncGetNfsShare { + + public static void main(String[] args) throws Exception { + asyncGetNfsShare(); + } + + public static void asyncGetNfsShare() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + GetNfsShareRequest request = + GetNfsShareRequest.newBuilder() + .setName(NFSShareName.of("[PROJECT]", "[LOCATION]", "[NFS_SHARE]").toString()) + .build(); + ApiFuture future = + bareMetalSolutionClient.getNfsShareCallable().futureCall(request); + // Do something. + NfsShare response = future.get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_getnfsshare_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getnfsshare/SyncGetNfsShare.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getnfsshare/SyncGetNfsShare.java new file mode 100644 index 000000000000..020b9765265d --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getnfsshare/SyncGetNfsShare.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_getnfsshare_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.GetNfsShareRequest; +import com.google.cloud.baremetalsolution.v2.NFSShareName; +import com.google.cloud.baremetalsolution.v2.NfsShare; + +public class SyncGetNfsShare { + + public static void main(String[] args) throws Exception { + syncGetNfsShare(); + } + + public static void syncGetNfsShare() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + GetNfsShareRequest request = + GetNfsShareRequest.newBuilder() + .setName(NFSShareName.of("[PROJECT]", "[LOCATION]", "[NFS_SHARE]").toString()) + .build(); + NfsShare response = bareMetalSolutionClient.getNfsShare(request); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_getnfsshare_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getnfsshare/SyncGetNfsShareNfssharename.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getnfsshare/SyncGetNfsShareNfssharename.java new file mode 100644 index 000000000000..a155120c65ca --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getnfsshare/SyncGetNfsShareNfssharename.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_getnfsshare_nfssharename_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.NFSShareName; +import com.google.cloud.baremetalsolution.v2.NfsShare; + +public class SyncGetNfsShareNfssharename { + + public static void main(String[] args) throws Exception { + syncGetNfsShareNfssharename(); + } + + public static void syncGetNfsShareNfssharename() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + NFSShareName name = NFSShareName.of("[PROJECT]", "[LOCATION]", "[NFS_SHARE]"); + NfsShare response = bareMetalSolutionClient.getNfsShare(name); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_getnfsshare_nfssharename_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getnfsshare/SyncGetNfsShareString.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getnfsshare/SyncGetNfsShareString.java new file mode 100644 index 000000000000..39f118029f4c --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getnfsshare/SyncGetNfsShareString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_getnfsshare_string_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.NFSShareName; +import com.google.cloud.baremetalsolution.v2.NfsShare; + +public class SyncGetNfsShareString { + + public static void main(String[] args) throws Exception { + syncGetNfsShareString(); + } + + public static void syncGetNfsShareString() throws Exception { + // 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 = NFSShareName.of("[PROJECT]", "[LOCATION]", "[NFS_SHARE]").toString(); + NfsShare response = bareMetalSolutionClient.getNfsShare(name); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_getnfsshare_string_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getvolume/AsyncGetVolume.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getvolume/AsyncGetVolume.java new file mode 100644 index 000000000000..5f72baf622ea --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getvolume/AsyncGetVolume.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_getvolume_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.GetVolumeRequest; +import com.google.cloud.baremetalsolution.v2.Volume; +import com.google.cloud.baremetalsolution.v2.VolumeName; + +public class AsyncGetVolume { + + public static void main(String[] args) throws Exception { + asyncGetVolume(); + } + + public static void asyncGetVolume() throws Exception { + // 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()) + .build(); + ApiFuture future = bareMetalSolutionClient.getVolumeCallable().futureCall(request); + // Do something. + Volume response = future.get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_getvolume_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getvolume/SyncGetVolume.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getvolume/SyncGetVolume.java new file mode 100644 index 000000000000..a0ee9636e808 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getvolume/SyncGetVolume.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_getvolume_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.GetVolumeRequest; +import com.google.cloud.baremetalsolution.v2.Volume; +import com.google.cloud.baremetalsolution.v2.VolumeName; + +public class SyncGetVolume { + + public static void main(String[] args) throws Exception { + syncGetVolume(); + } + + public static void syncGetVolume() throws Exception { + // 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()) + .build(); + Volume response = bareMetalSolutionClient.getVolume(request); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_getvolume_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getvolume/SyncGetVolumeString.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getvolume/SyncGetVolumeString.java new file mode 100644 index 000000000000..c83bd2257dcd --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getvolume/SyncGetVolumeString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_getvolume_string_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.Volume; +import com.google.cloud.baremetalsolution.v2.VolumeName; + +public class SyncGetVolumeString { + + public static void main(String[] args) throws Exception { + syncGetVolumeString(); + } + + public static void syncGetVolumeString() throws Exception { + // 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); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_getvolume_string_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getvolume/SyncGetVolumeVolumename.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getvolume/SyncGetVolumeVolumename.java new file mode 100644 index 000000000000..074a0bcdb7dc --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/getvolume/SyncGetVolumeVolumename.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_getvolume_volumename_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.Volume; +import com.google.cloud.baremetalsolution.v2.VolumeName; + +public class SyncGetVolumeVolumename { + + public static void main(String[] args) throws Exception { + syncGetVolumeVolumename(); + } + + public static void syncGetVolumeVolumename() throws Exception { + // 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 name = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]"); + Volume response = bareMetalSolutionClient.getVolume(name); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_getvolume_volumename_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listinstances/AsyncListInstances.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listinstances/AsyncListInstances.java new file mode 100644 index 000000000000..c4750dd008a4 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listinstances/AsyncListInstances.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_listinstances_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.Instance; +import com.google.cloud.baremetalsolution.v2.ListInstancesRequest; +import com.google.cloud.baremetalsolution.v2.LocationName; + +public class AsyncListInstances { + + public static void main(String[] args) throws Exception { + asyncListInstances(); + } + + public static void asyncListInstances() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + ListInstancesRequest request = + ListInstancesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + ApiFuture future = + bareMetalSolutionClient.listInstancesPagedCallable().futureCall(request); + // Do something. + for (Instance element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_listinstances_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listinstances/AsyncListInstancesPaged.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listinstances/AsyncListInstancesPaged.java new file mode 100644 index 000000000000..9eccd225880e --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listinstances/AsyncListInstancesPaged.java @@ -0,0 +1,60 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_listinstances_paged_async] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.Instance; +import com.google.cloud.baremetalsolution.v2.ListInstancesRequest; +import com.google.cloud.baremetalsolution.v2.ListInstancesResponse; +import com.google.cloud.baremetalsolution.v2.LocationName; +import com.google.common.base.Strings; + +public class AsyncListInstancesPaged { + + public static void main(String[] args) throws Exception { + asyncListInstancesPaged(); + } + + public static void asyncListInstancesPaged() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + ListInstancesRequest request = + ListInstancesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + while (true) { + ListInstancesResponse response = + bareMetalSolutionClient.listInstancesCallable().call(request); + for (Instance element : response.getInstancesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_listinstances_paged_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listinstances/SyncListInstances.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listinstances/SyncListInstances.java new file mode 100644 index 000000000000..35af1bed2e71 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listinstances/SyncListInstances.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_listinstances_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.Instance; +import com.google.cloud.baremetalsolution.v2.ListInstancesRequest; +import com.google.cloud.baremetalsolution.v2.LocationName; + +public class SyncListInstances { + + public static void main(String[] args) throws Exception { + syncListInstances(); + } + + public static void syncListInstances() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + ListInstancesRequest request = + ListInstancesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + for (Instance element : bareMetalSolutionClient.listInstances(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_listinstances_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listinstances/SyncListInstancesLocationname.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listinstances/SyncListInstancesLocationname.java new file mode 100644 index 000000000000..05ed3460ba9d --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listinstances/SyncListInstancesLocationname.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_listinstances_locationname_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.Instance; +import com.google.cloud.baremetalsolution.v2.LocationName; + +public class SyncListInstancesLocationname { + + public static void main(String[] args) throws Exception { + syncListInstancesLocationname(); + } + + public static void syncListInstancesLocationname() throws Exception { + // 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 (Instance element : bareMetalSolutionClient.listInstances(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_listinstances_locationname_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listinstances/SyncListInstancesString.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listinstances/SyncListInstancesString.java new file mode 100644 index 000000000000..8dfa2e8c4047 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listinstances/SyncListInstancesString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_listinstances_string_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.Instance; +import com.google.cloud.baremetalsolution.v2.LocationName; + +public class SyncListInstancesString { + + public static void main(String[] args) throws Exception { + syncListInstancesString(); + } + + public static void syncListInstancesString() throws Exception { + // 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 (Instance element : bareMetalSolutionClient.listInstances(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_listinstances_string_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listluns/AsyncListLuns.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listluns/AsyncListLuns.java new file mode 100644 index 000000000000..69dbb669933b --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listluns/AsyncListLuns.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_listluns_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.ListLunsRequest; +import com.google.cloud.baremetalsolution.v2.Lun; +import com.google.cloud.baremetalsolution.v2.VolumeName; + +public class AsyncListLuns { + + public static void main(String[] args) throws Exception { + asyncListLuns(); + } + + public static void asyncListLuns() throws Exception { + // 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()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = bareMetalSolutionClient.listLunsPagedCallable().futureCall(request); + // Do something. + for (Lun element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_listluns_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listluns/AsyncListLunsPaged.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listluns/AsyncListLunsPaged.java new file mode 100644 index 000000000000..ac2fd3f6b727 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listluns/AsyncListLunsPaged.java @@ -0,0 +1,58 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_listluns_paged_async] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.ListLunsRequest; +import com.google.cloud.baremetalsolution.v2.ListLunsResponse; +import com.google.cloud.baremetalsolution.v2.Lun; +import com.google.cloud.baremetalsolution.v2.VolumeName; +import com.google.common.base.Strings; + +public class AsyncListLunsPaged { + + public static void main(String[] args) throws Exception { + asyncListLunsPaged(); + } + + public static void asyncListLunsPaged() throws Exception { + // 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()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLunsResponse response = bareMetalSolutionClient.listLunsCallable().call(request); + for (Lun element : response.getLunsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_listluns_paged_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listluns/SyncListLuns.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listluns/SyncListLuns.java new file mode 100644 index 000000000000..08db5facff0d --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listluns/SyncListLuns.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_listluns_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.ListLunsRequest; +import com.google.cloud.baremetalsolution.v2.Lun; +import com.google.cloud.baremetalsolution.v2.VolumeName; + +public class SyncListLuns { + + public static void main(String[] args) throws Exception { + syncListLuns(); + } + + public static void syncListLuns() throws Exception { + // 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()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Lun element : bareMetalSolutionClient.listLuns(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_listluns_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listluns/SyncListLunsString.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listluns/SyncListLunsString.java new file mode 100644 index 000000000000..9aabcec986ee --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listluns/SyncListLunsString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_listluns_string_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.Lun; +import com.google.cloud.baremetalsolution.v2.VolumeName; + +public class SyncListLunsString { + + public static void main(String[] args) throws Exception { + syncListLunsString(); + } + + public static void syncListLunsString() throws Exception { + // 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()) { + // doThingsWith(element); + } + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_listluns_string_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listluns/SyncListLunsVolumename.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listluns/SyncListLunsVolumename.java new file mode 100644 index 000000000000..9b61c7d67ced --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listluns/SyncListLunsVolumename.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_listluns_volumename_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.Lun; +import com.google.cloud.baremetalsolution.v2.VolumeName; + +public class SyncListLunsVolumename { + + public static void main(String[] args) throws Exception { + syncListLunsVolumename(); + } + + public static void syncListLunsVolumename() throws Exception { + // 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]"); + for (Lun element : bareMetalSolutionClient.listLuns(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_listluns_volumename_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnetworks/AsyncListNetworks.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnetworks/AsyncListNetworks.java new file mode 100644 index 000000000000..74c2b5ec805f --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnetworks/AsyncListNetworks.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_listnetworks_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.ListNetworksRequest; +import com.google.cloud.baremetalsolution.v2.LocationName; +import com.google.cloud.baremetalsolution.v2.Network; + +public class AsyncListNetworks { + + public static void main(String[] args) throws Exception { + asyncListNetworks(); + } + + public static void asyncListNetworks() throws Exception { + // 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") + .setFilter("filter-1274492040") + .build(); + ApiFuture future = + bareMetalSolutionClient.listNetworksPagedCallable().futureCall(request); + // Do something. + for (Network element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_listnetworks_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnetworks/AsyncListNetworksPaged.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnetworks/AsyncListNetworksPaged.java new file mode 100644 index 000000000000..7effaae3822c --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnetworks/AsyncListNetworksPaged.java @@ -0,0 +1,60 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_listnetworks_paged_async] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.ListNetworksRequest; +import com.google.cloud.baremetalsolution.v2.ListNetworksResponse; +import com.google.cloud.baremetalsolution.v2.LocationName; +import com.google.cloud.baremetalsolution.v2.Network; +import com.google.common.base.Strings; + +public class AsyncListNetworksPaged { + + public static void main(String[] args) throws Exception { + asyncListNetworksPaged(); + } + + public static void asyncListNetworksPaged() throws Exception { + // 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") + .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; + } + } + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_listnetworks_paged_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnetworks/SyncListNetworks.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnetworks/SyncListNetworks.java new file mode 100644 index 000000000000..c7b6162538ac --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnetworks/SyncListNetworks.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_listnetworks_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.ListNetworksRequest; +import com.google.cloud.baremetalsolution.v2.LocationName; +import com.google.cloud.baremetalsolution.v2.Network; + +public class SyncListNetworks { + + public static void main(String[] args) throws Exception { + syncListNetworks(); + } + + public static void syncListNetworks() throws Exception { + // 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") + .setFilter("filter-1274492040") + .build(); + for (Network element : bareMetalSolutionClient.listNetworks(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_listnetworks_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnetworks/SyncListNetworksLocationname.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnetworks/SyncListNetworksLocationname.java new file mode 100644 index 000000000000..5c59e1995ef9 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnetworks/SyncListNetworksLocationname.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_listnetworks_locationname_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.LocationName; +import com.google.cloud.baremetalsolution.v2.Network; + +public class SyncListNetworksLocationname { + + public static void main(String[] args) throws Exception { + syncListNetworksLocationname(); + } + + public static void syncListNetworksLocationname() throws Exception { + // 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); + } + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_listnetworks_locationname_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnetworks/SyncListNetworksString.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnetworks/SyncListNetworksString.java new file mode 100644 index 000000000000..a909ba34e051 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnetworks/SyncListNetworksString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_listnetworks_string_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.LocationName; +import com.google.cloud.baremetalsolution.v2.Network; + +public class SyncListNetworksString { + + public static void main(String[] args) throws Exception { + syncListNetworksString(); + } + + public static void syncListNetworksString() throws Exception { + // 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); + } + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_listnetworks_string_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnetworkusage/AsyncListNetworkUsage.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnetworkusage/AsyncListNetworkUsage.java new file mode 100644 index 000000000000..9d087074ef78 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnetworkusage/AsyncListNetworkUsage.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_listnetworkusage_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest; +import com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse; +import com.google.cloud.baremetalsolution.v2.LocationName; + +public class AsyncListNetworkUsage { + + public static void main(String[] args) throws Exception { + asyncListNetworkUsage(); + } + + public static void asyncListNetworkUsage() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + ListNetworkUsageRequest request = + ListNetworkUsageRequest.newBuilder() + .setLocation(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .build(); + ApiFuture future = + bareMetalSolutionClient.listNetworkUsageCallable().futureCall(request); + // Do something. + ListNetworkUsageResponse response = future.get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_listnetworkusage_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnetworkusage/SyncListNetworkUsage.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnetworkusage/SyncListNetworkUsage.java new file mode 100644 index 000000000000..1f8147c05438 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnetworkusage/SyncListNetworkUsage.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_listnetworkusage_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest; +import com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse; +import com.google.cloud.baremetalsolution.v2.LocationName; + +public class SyncListNetworkUsage { + + public static void main(String[] args) throws Exception { + syncListNetworkUsage(); + } + + public static void syncListNetworkUsage() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + ListNetworkUsageRequest request = + ListNetworkUsageRequest.newBuilder() + .setLocation(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .build(); + ListNetworkUsageResponse response = bareMetalSolutionClient.listNetworkUsage(request); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_listnetworkusage_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnetworkusage/SyncListNetworkUsageLocationname.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnetworkusage/SyncListNetworkUsageLocationname.java new file mode 100644 index 000000000000..ca5edbb24f90 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnetworkusage/SyncListNetworkUsageLocationname.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_listnetworkusage_locationname_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse; +import com.google.cloud.baremetalsolution.v2.LocationName; + +public class SyncListNetworkUsageLocationname { + + public static void main(String[] args) throws Exception { + syncListNetworkUsageLocationname(); + } + + public static void syncListNetworkUsageLocationname() throws Exception { + // 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 location = LocationName.of("[PROJECT]", "[LOCATION]"); + ListNetworkUsageResponse response = bareMetalSolutionClient.listNetworkUsage(location); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_listnetworkusage_locationname_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnetworkusage/SyncListNetworkUsageString.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnetworkusage/SyncListNetworkUsageString.java new file mode 100644 index 000000000000..c2fe15b22b20 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnetworkusage/SyncListNetworkUsageString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_listnetworkusage_string_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.ListNetworkUsageResponse; +import com.google.cloud.baremetalsolution.v2.LocationName; + +public class SyncListNetworkUsageString { + + public static void main(String[] args) throws Exception { + syncListNetworkUsageString(); + } + + public static void syncListNetworkUsageString() throws Exception { + // 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 location = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + ListNetworkUsageResponse response = bareMetalSolutionClient.listNetworkUsage(location); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_listnetworkusage_string_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnfsshares/AsyncListNfsShares.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnfsshares/AsyncListNfsShares.java new file mode 100644 index 000000000000..1897424cbeba --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnfsshares/AsyncListNfsShares.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_listnfsshares_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest; +import com.google.cloud.baremetalsolution.v2.LocationName; +import com.google.cloud.baremetalsolution.v2.NfsShare; + +public class AsyncListNfsShares { + + public static void main(String[] args) throws Exception { + asyncListNfsShares(); + } + + public static void asyncListNfsShares() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + ListNfsSharesRequest request = + ListNfsSharesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + ApiFuture future = + bareMetalSolutionClient.listNfsSharesPagedCallable().futureCall(request); + // Do something. + for (NfsShare element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_listnfsshares_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnfsshares/AsyncListNfsSharesPaged.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnfsshares/AsyncListNfsSharesPaged.java new file mode 100644 index 000000000000..ed4ee13b222c --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnfsshares/AsyncListNfsSharesPaged.java @@ -0,0 +1,60 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_listnfsshares_paged_async] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest; +import com.google.cloud.baremetalsolution.v2.ListNfsSharesResponse; +import com.google.cloud.baremetalsolution.v2.LocationName; +import com.google.cloud.baremetalsolution.v2.NfsShare; +import com.google.common.base.Strings; + +public class AsyncListNfsSharesPaged { + + public static void main(String[] args) throws Exception { + asyncListNfsSharesPaged(); + } + + public static void asyncListNfsSharesPaged() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + ListNfsSharesRequest request = + ListNfsSharesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + while (true) { + ListNfsSharesResponse response = + bareMetalSolutionClient.listNfsSharesCallable().call(request); + for (NfsShare element : response.getNfsSharesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_listnfsshares_paged_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnfsshares/SyncListNfsShares.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnfsshares/SyncListNfsShares.java new file mode 100644 index 000000000000..a921557dc43a --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnfsshares/SyncListNfsShares.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_listnfsshares_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.ListNfsSharesRequest; +import com.google.cloud.baremetalsolution.v2.LocationName; +import com.google.cloud.baremetalsolution.v2.NfsShare; + +public class SyncListNfsShares { + + public static void main(String[] args) throws Exception { + syncListNfsShares(); + } + + public static void syncListNfsShares() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + ListNfsSharesRequest request = + ListNfsSharesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + for (NfsShare element : bareMetalSolutionClient.listNfsShares(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_listnfsshares_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnfsshares/SyncListNfsSharesLocationname.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnfsshares/SyncListNfsSharesLocationname.java new file mode 100644 index 000000000000..ff457973f5ae --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnfsshares/SyncListNfsSharesLocationname.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_listnfsshares_locationname_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.LocationName; +import com.google.cloud.baremetalsolution.v2.NfsShare; + +public class SyncListNfsSharesLocationname { + + public static void main(String[] args) throws Exception { + syncListNfsSharesLocationname(); + } + + public static void syncListNfsSharesLocationname() throws Exception { + // 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 (NfsShare element : bareMetalSolutionClient.listNfsShares(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_listnfsshares_locationname_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnfsshares/SyncListNfsSharesString.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnfsshares/SyncListNfsSharesString.java new file mode 100644 index 000000000000..b8404fe0425b --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listnfsshares/SyncListNfsSharesString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_listnfsshares_string_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.LocationName; +import com.google.cloud.baremetalsolution.v2.NfsShare; + +public class SyncListNfsSharesString { + + public static void main(String[] args) throws Exception { + syncListNfsSharesString(); + } + + public static void syncListNfsSharesString() throws Exception { + // 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 (NfsShare element : bareMetalSolutionClient.listNfsShares(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_listnfsshares_string_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listvolumes/AsyncListVolumes.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listvolumes/AsyncListVolumes.java new file mode 100644 index 000000000000..ed7f526ed826 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listvolumes/AsyncListVolumes.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_listvolumes_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.ListVolumesRequest; +import com.google.cloud.baremetalsolution.v2.LocationName; +import com.google.cloud.baremetalsolution.v2.Volume; + +public class AsyncListVolumes { + + public static void main(String[] args) throws Exception { + asyncListVolumes(); + } + + public static void asyncListVolumes() throws Exception { + // 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") + .setFilter("filter-1274492040") + .build(); + ApiFuture future = + bareMetalSolutionClient.listVolumesPagedCallable().futureCall(request); + // Do something. + for (Volume element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_listvolumes_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listvolumes/AsyncListVolumesPaged.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listvolumes/AsyncListVolumesPaged.java new file mode 100644 index 000000000000..4a713d04b775 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listvolumes/AsyncListVolumesPaged.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_listvolumes_paged_async] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.ListVolumesRequest; +import com.google.cloud.baremetalsolution.v2.ListVolumesResponse; +import com.google.cloud.baremetalsolution.v2.LocationName; +import com.google.cloud.baremetalsolution.v2.Volume; +import com.google.common.base.Strings; + +public class AsyncListVolumesPaged { + + public static void main(String[] args) throws Exception { + asyncListVolumesPaged(); + } + + public static void asyncListVolumesPaged() throws Exception { + // 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") + .setFilter("filter-1274492040") + .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; + } + } + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_listvolumes_paged_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listvolumes/SyncListVolumes.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listvolumes/SyncListVolumes.java new file mode 100644 index 000000000000..f9bc042ea109 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listvolumes/SyncListVolumes.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_listvolumes_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.ListVolumesRequest; +import com.google.cloud.baremetalsolution.v2.LocationName; +import com.google.cloud.baremetalsolution.v2.Volume; + +public class SyncListVolumes { + + public static void main(String[] args) throws Exception { + syncListVolumes(); + } + + public static void syncListVolumes() throws Exception { + // 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") + .setFilter("filter-1274492040") + .build(); + for (Volume element : bareMetalSolutionClient.listVolumes(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_listvolumes_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listvolumes/SyncListVolumesLocationname.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listvolumes/SyncListVolumesLocationname.java new file mode 100644 index 000000000000..b348d64cc997 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listvolumes/SyncListVolumesLocationname.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_listvolumes_locationname_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.LocationName; +import com.google.cloud.baremetalsolution.v2.Volume; + +public class SyncListVolumesLocationname { + + public static void main(String[] args) throws Exception { + syncListVolumesLocationname(); + } + + public static void syncListVolumesLocationname() throws Exception { + // 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 (Volume element : bareMetalSolutionClient.listVolumes(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_listvolumes_locationname_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listvolumes/SyncListVolumesString.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listvolumes/SyncListVolumesString.java new file mode 100644 index 000000000000..b95bdddf4e25 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/listvolumes/SyncListVolumesString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_listvolumes_string_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.LocationName; +import com.google.cloud.baremetalsolution.v2.Volume; + +public class SyncListVolumesString { + + public static void main(String[] args) throws Exception { + syncListVolumesString(); + } + + public static void syncListVolumesString() throws Exception { + // 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); + } + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_listvolumes_string_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/resetinstance/AsyncResetInstance.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/resetinstance/AsyncResetInstance.java new file mode 100644 index 000000000000..b1efbfdf1ef5 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/resetinstance/AsyncResetInstance.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_resetinstance_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.InstanceName; +import com.google.cloud.baremetalsolution.v2.ResetInstanceRequest; +import com.google.longrunning.Operation; + +public class AsyncResetInstance { + + public static void main(String[] args) throws Exception { + asyncResetInstance(); + } + + public static void asyncResetInstance() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + ResetInstanceRequest request = + ResetInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .build(); + ApiFuture future = + bareMetalSolutionClient.resetInstanceCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_resetinstance_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/resetinstance/AsyncResetInstanceLRO.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/resetinstance/AsyncResetInstanceLRO.java new file mode 100644 index 000000000000..0d73bc0f1005 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/resetinstance/AsyncResetInstanceLRO.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_resetinstance_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.InstanceName; +import com.google.cloud.baremetalsolution.v2.OperationMetadata; +import com.google.cloud.baremetalsolution.v2.ResetInstanceRequest; +import com.google.cloud.baremetalsolution.v2.ResetInstanceResponse; + +public class AsyncResetInstanceLRO { + + public static void main(String[] args) throws Exception { + asyncResetInstanceLRO(); + } + + public static void asyncResetInstanceLRO() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + ResetInstanceRequest request = + ResetInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .build(); + OperationFuture future = + bareMetalSolutionClient.resetInstanceOperationCallable().futureCall(request); + // Do something. + ResetInstanceResponse response = future.get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_resetinstance_lro_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/resetinstance/SyncResetInstance.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/resetinstance/SyncResetInstance.java new file mode 100644 index 000000000000..63e585ae2530 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/resetinstance/SyncResetInstance.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_resetinstance_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.InstanceName; +import com.google.cloud.baremetalsolution.v2.ResetInstanceRequest; +import com.google.cloud.baremetalsolution.v2.ResetInstanceResponse; + +public class SyncResetInstance { + + public static void main(String[] args) throws Exception { + syncResetInstance(); + } + + public static void syncResetInstance() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + ResetInstanceRequest request = + ResetInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .build(); + ResetInstanceResponse response = bareMetalSolutionClient.resetInstanceAsync(request).get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_resetinstance_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/resetinstance/SyncResetInstanceInstancename.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/resetinstance/SyncResetInstanceInstancename.java new file mode 100644 index 000000000000..b3db96749c6b --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/resetinstance/SyncResetInstanceInstancename.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_resetinstance_instancename_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.InstanceName; +import com.google.cloud.baremetalsolution.v2.ResetInstanceResponse; + +public class SyncResetInstanceInstancename { + + public static void main(String[] args) throws Exception { + syncResetInstanceInstancename(); + } + + public static void syncResetInstanceInstancename() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + ResetInstanceResponse response = bareMetalSolutionClient.resetInstanceAsync(name).get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_resetinstance_instancename_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/resetinstance/SyncResetInstanceString.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/resetinstance/SyncResetInstanceString.java new file mode 100644 index 000000000000..90671ff06a19 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/resetinstance/SyncResetInstanceString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_resetinstance_string_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.InstanceName; +import com.google.cloud.baremetalsolution.v2.ResetInstanceResponse; + +public class SyncResetInstanceString { + + public static void main(String[] args) throws Exception { + syncResetInstanceString(); + } + + public static void syncResetInstanceString() throws Exception { + // 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 = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString(); + ResetInstanceResponse response = bareMetalSolutionClient.resetInstanceAsync(name).get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_resetinstance_string_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/resizevolume/AsyncResizeVolume.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/resizevolume/AsyncResizeVolume.java new file mode 100644 index 000000000000..245f8baa8a13 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/resizevolume/AsyncResizeVolume.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_resizevolume_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest; +import com.google.cloud.baremetalsolution.v2.VolumeName; +import com.google.longrunning.Operation; + +public class AsyncResizeVolume { + + public static void main(String[] args) throws Exception { + asyncResizeVolume(); + } + + public static void asyncResizeVolume() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + ResizeVolumeRequest request = + ResizeVolumeRequest.newBuilder() + .setVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .setSizeGib(847296130) + .build(); + ApiFuture future = + bareMetalSolutionClient.resizeVolumeCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_resizevolume_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/resizevolume/AsyncResizeVolumeLRO.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/resizevolume/AsyncResizeVolumeLRO.java new file mode 100644 index 000000000000..9a6a36075415 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/resizevolume/AsyncResizeVolumeLRO.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_resizevolume_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.OperationMetadata; +import com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest; +import com.google.cloud.baremetalsolution.v2.Volume; +import com.google.cloud.baremetalsolution.v2.VolumeName; + +public class AsyncResizeVolumeLRO { + + public static void main(String[] args) throws Exception { + asyncResizeVolumeLRO(); + } + + public static void asyncResizeVolumeLRO() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + ResizeVolumeRequest request = + ResizeVolumeRequest.newBuilder() + .setVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .setSizeGib(847296130) + .build(); + OperationFuture future = + bareMetalSolutionClient.resizeVolumeOperationCallable().futureCall(request); + // Do something. + Volume response = future.get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_resizevolume_lro_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/resizevolume/SyncResizeVolume.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/resizevolume/SyncResizeVolume.java new file mode 100644 index 000000000000..4dfd66ec2ded --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/resizevolume/SyncResizeVolume.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_resizevolume_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.ResizeVolumeRequest; +import com.google.cloud.baremetalsolution.v2.Volume; +import com.google.cloud.baremetalsolution.v2.VolumeName; + +public class SyncResizeVolume { + + public static void main(String[] args) throws Exception { + syncResizeVolume(); + } + + public static void syncResizeVolume() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + ResizeVolumeRequest request = + ResizeVolumeRequest.newBuilder() + .setVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .setSizeGib(847296130) + .build(); + Volume response = bareMetalSolutionClient.resizeVolumeAsync(request).get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_resizevolume_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/resizevolume/SyncResizeVolumeStringLong.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/resizevolume/SyncResizeVolumeStringLong.java new file mode 100644 index 000000000000..68eff39cd181 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/resizevolume/SyncResizeVolumeStringLong.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_resizevolume_stringlong_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.Volume; +import com.google.cloud.baremetalsolution.v2.VolumeName; + +public class SyncResizeVolumeStringLong { + + public static void main(String[] args) throws Exception { + syncResizeVolumeStringLong(); + } + + public static void syncResizeVolumeStringLong() throws Exception { + // 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 volume = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString(); + long sizeGib = 847296130; + Volume response = bareMetalSolutionClient.resizeVolumeAsync(volume, sizeGib).get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_resizevolume_stringlong_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/resizevolume/SyncResizeVolumeVolumenameLong.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/resizevolume/SyncResizeVolumeVolumenameLong.java new file mode 100644 index 000000000000..40bb32cbcb68 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/resizevolume/SyncResizeVolumeVolumenameLong.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_resizevolume_volumenamelong_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.Volume; +import com.google.cloud.baremetalsolution.v2.VolumeName; + +public class SyncResizeVolumeVolumenameLong { + + public static void main(String[] args) throws Exception { + syncResizeVolumeVolumenameLong(); + } + + public static void syncResizeVolumeVolumenameLong() throws Exception { + // 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 volume = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]"); + long sizeGib = 847296130; + Volume response = bareMetalSolutionClient.resizeVolumeAsync(volume, sizeGib).get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_resizevolume_volumenamelong_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/startinstance/AsyncStartInstance.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/startinstance/AsyncStartInstance.java new file mode 100644 index 000000000000..fc3b15780948 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/startinstance/AsyncStartInstance.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_startinstance_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.InstanceName; +import com.google.cloud.baremetalsolution.v2.StartInstanceRequest; +import com.google.longrunning.Operation; + +public class AsyncStartInstance { + + public static void main(String[] args) throws Exception { + asyncStartInstance(); + } + + public static void asyncStartInstance() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + StartInstanceRequest request = + StartInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .build(); + ApiFuture future = + bareMetalSolutionClient.startInstanceCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_startinstance_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/startinstance/AsyncStartInstanceLRO.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/startinstance/AsyncStartInstanceLRO.java new file mode 100644 index 000000000000..9b99f8f9026b --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/startinstance/AsyncStartInstanceLRO.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_startinstance_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.InstanceName; +import com.google.cloud.baremetalsolution.v2.OperationMetadata; +import com.google.cloud.baremetalsolution.v2.StartInstanceRequest; +import com.google.cloud.baremetalsolution.v2.StartInstanceResponse; + +public class AsyncStartInstanceLRO { + + public static void main(String[] args) throws Exception { + asyncStartInstanceLRO(); + } + + public static void asyncStartInstanceLRO() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + StartInstanceRequest request = + StartInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .build(); + OperationFuture future = + bareMetalSolutionClient.startInstanceOperationCallable().futureCall(request); + // Do something. + StartInstanceResponse response = future.get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_startinstance_lro_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/startinstance/SyncStartInstance.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/startinstance/SyncStartInstance.java new file mode 100644 index 000000000000..765066825964 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/startinstance/SyncStartInstance.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_startinstance_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.InstanceName; +import com.google.cloud.baremetalsolution.v2.StartInstanceRequest; +import com.google.cloud.baremetalsolution.v2.StartInstanceResponse; + +public class SyncStartInstance { + + public static void main(String[] args) throws Exception { + syncStartInstance(); + } + + public static void syncStartInstance() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + StartInstanceRequest request = + StartInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .build(); + StartInstanceResponse response = bareMetalSolutionClient.startInstanceAsync(request).get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_startinstance_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/startinstance/SyncStartInstanceInstancename.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/startinstance/SyncStartInstanceInstancename.java new file mode 100644 index 000000000000..566811ce28f7 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/startinstance/SyncStartInstanceInstancename.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_startinstance_instancename_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.InstanceName; +import com.google.cloud.baremetalsolution.v2.StartInstanceResponse; + +public class SyncStartInstanceInstancename { + + public static void main(String[] args) throws Exception { + syncStartInstanceInstancename(); + } + + public static void syncStartInstanceInstancename() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + StartInstanceResponse response = bareMetalSolutionClient.startInstanceAsync(name).get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_startinstance_instancename_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/startinstance/SyncStartInstanceString.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/startinstance/SyncStartInstanceString.java new file mode 100644 index 000000000000..545c79a25ce0 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/startinstance/SyncStartInstanceString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_startinstance_string_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.InstanceName; +import com.google.cloud.baremetalsolution.v2.StartInstanceResponse; + +public class SyncStartInstanceString { + + public static void main(String[] args) throws Exception { + syncStartInstanceString(); + } + + public static void syncStartInstanceString() throws Exception { + // 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 = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString(); + StartInstanceResponse response = bareMetalSolutionClient.startInstanceAsync(name).get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_startinstance_string_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/stopinstance/AsyncStopInstance.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/stopinstance/AsyncStopInstance.java new file mode 100644 index 000000000000..c76d56b5dc16 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/stopinstance/AsyncStopInstance.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_stopinstance_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.InstanceName; +import com.google.cloud.baremetalsolution.v2.StopInstanceRequest; +import com.google.longrunning.Operation; + +public class AsyncStopInstance { + + public static void main(String[] args) throws Exception { + asyncStopInstance(); + } + + public static void asyncStopInstance() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + StopInstanceRequest request = + StopInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .build(); + ApiFuture future = + bareMetalSolutionClient.stopInstanceCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_stopinstance_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/stopinstance/AsyncStopInstanceLRO.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/stopinstance/AsyncStopInstanceLRO.java new file mode 100644 index 000000000000..355cc84476a8 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/stopinstance/AsyncStopInstanceLRO.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_stopinstance_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.InstanceName; +import com.google.cloud.baremetalsolution.v2.OperationMetadata; +import com.google.cloud.baremetalsolution.v2.StopInstanceRequest; +import com.google.cloud.baremetalsolution.v2.StopInstanceResponse; + +public class AsyncStopInstanceLRO { + + public static void main(String[] args) throws Exception { + asyncStopInstanceLRO(); + } + + public static void asyncStopInstanceLRO() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + StopInstanceRequest request = + StopInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .build(); + OperationFuture future = + bareMetalSolutionClient.stopInstanceOperationCallable().futureCall(request); + // Do something. + StopInstanceResponse response = future.get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_stopinstance_lro_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/stopinstance/SyncStopInstance.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/stopinstance/SyncStopInstance.java new file mode 100644 index 000000000000..7e58a56dc03d --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/stopinstance/SyncStopInstance.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_stopinstance_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.InstanceName; +import com.google.cloud.baremetalsolution.v2.StopInstanceRequest; +import com.google.cloud.baremetalsolution.v2.StopInstanceResponse; + +public class SyncStopInstance { + + public static void main(String[] args) throws Exception { + syncStopInstance(); + } + + public static void syncStopInstance() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + StopInstanceRequest request = + StopInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .build(); + StopInstanceResponse response = bareMetalSolutionClient.stopInstanceAsync(request).get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_stopinstance_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/stopinstance/SyncStopInstanceInstancename.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/stopinstance/SyncStopInstanceInstancename.java new file mode 100644 index 000000000000..3da06d6b8d84 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/stopinstance/SyncStopInstanceInstancename.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_stopinstance_instancename_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.InstanceName; +import com.google.cloud.baremetalsolution.v2.StopInstanceResponse; + +public class SyncStopInstanceInstancename { + + public static void main(String[] args) throws Exception { + syncStopInstanceInstancename(); + } + + public static void syncStopInstanceInstancename() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + StopInstanceResponse response = bareMetalSolutionClient.stopInstanceAsync(name).get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_stopinstance_instancename_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/stopinstance/SyncStopInstanceString.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/stopinstance/SyncStopInstanceString.java new file mode 100644 index 000000000000..8f2b522e73ff --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/stopinstance/SyncStopInstanceString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_stopinstance_string_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.InstanceName; +import com.google.cloud.baremetalsolution.v2.StopInstanceResponse; + +public class SyncStopInstanceString { + + public static void main(String[] args) throws Exception { + syncStopInstanceString(); + } + + public static void syncStopInstanceString() throws Exception { + // 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 = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString(); + StopInstanceResponse response = bareMetalSolutionClient.stopInstanceAsync(name).get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_stopinstance_string_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updateinstance/AsyncUpdateInstance.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updateinstance/AsyncUpdateInstance.java new file mode 100644 index 000000000000..0572427e6ba5 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updateinstance/AsyncUpdateInstance.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_updateinstance_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.Instance; +import com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateInstance { + + public static void main(String[] args) throws Exception { + asyncUpdateInstance(); + } + + public static void asyncUpdateInstance() throws Exception { + // 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 future = + bareMetalSolutionClient.updateInstanceCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_updateinstance_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updateinstance/AsyncUpdateInstanceLRO.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updateinstance/AsyncUpdateInstanceLRO.java new file mode 100644 index 000000000000..2cdcca217ffb --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updateinstance/AsyncUpdateInstanceLRO.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_updateinstance_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.Instance; +import com.google.cloud.baremetalsolution.v2.OperationMetadata; +import com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateInstanceLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateInstanceLRO(); + } + + public static void asyncUpdateInstanceLRO() throws Exception { + // 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 future = + bareMetalSolutionClient.updateInstanceOperationCallable().futureCall(request); + // Do something. + Instance response = future.get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_updateinstance_lro_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updateinstance/SyncUpdateInstance.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updateinstance/SyncUpdateInstance.java new file mode 100644 index 000000000000..0f38ed61a12f --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updateinstance/SyncUpdateInstance.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_updateinstance_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.Instance; +import com.google.cloud.baremetalsolution.v2.UpdateInstanceRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateInstance { + + public static void main(String[] args) throws Exception { + syncUpdateInstance(); + } + + public static void syncUpdateInstance() throws Exception { + // 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(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_updateinstance_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updateinstance/SyncUpdateInstanceInstanceFieldmask.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updateinstance/SyncUpdateInstanceInstanceFieldmask.java new file mode 100644 index 000000000000..0935bcf5d04f --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updateinstance/SyncUpdateInstanceInstanceFieldmask.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START +// baremetalsolution_v2_generated_baremetalsolutionclient_updateinstance_instancefieldmask_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.Instance; +import com.google.protobuf.FieldMask; + +public class SyncUpdateInstanceInstanceFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateInstanceInstanceFieldmask(); + } + + public static void syncUpdateInstanceInstanceFieldmask() throws Exception { + // 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(); + } + } +} +// [END +// baremetalsolution_v2_generated_baremetalsolutionclient_updateinstance_instancefieldmask_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatenetwork/AsyncUpdateNetwork.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatenetwork/AsyncUpdateNetwork.java new file mode 100644 index 000000000000..34b1d0865dca --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatenetwork/AsyncUpdateNetwork.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_updatenetwork_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.Network; +import com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateNetwork { + + public static void main(String[] args) throws Exception { + asyncUpdateNetwork(); + } + + public static void asyncUpdateNetwork() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + UpdateNetworkRequest request = + UpdateNetworkRequest.newBuilder() + .setNetwork(Network.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + bareMetalSolutionClient.updateNetworkCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_updatenetwork_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatenetwork/AsyncUpdateNetworkLRO.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatenetwork/AsyncUpdateNetworkLRO.java new file mode 100644 index 000000000000..f6aa5e1f503f --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatenetwork/AsyncUpdateNetworkLRO.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_updatenetwork_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.Network; +import com.google.cloud.baremetalsolution.v2.OperationMetadata; +import com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateNetworkLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateNetworkLRO(); + } + + public static void asyncUpdateNetworkLRO() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + UpdateNetworkRequest request = + UpdateNetworkRequest.newBuilder() + .setNetwork(Network.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + OperationFuture future = + bareMetalSolutionClient.updateNetworkOperationCallable().futureCall(request); + // Do something. + Network response = future.get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_updatenetwork_lro_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatenetwork/SyncUpdateNetwork.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatenetwork/SyncUpdateNetwork.java new file mode 100644 index 000000000000..953e671ae19b --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatenetwork/SyncUpdateNetwork.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_updatenetwork_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.Network; +import com.google.cloud.baremetalsolution.v2.UpdateNetworkRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateNetwork { + + public static void main(String[] args) throws Exception { + syncUpdateNetwork(); + } + + public static void syncUpdateNetwork() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + UpdateNetworkRequest request = + UpdateNetworkRequest.newBuilder() + .setNetwork(Network.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Network response = bareMetalSolutionClient.updateNetworkAsync(request).get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_updatenetwork_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatenetwork/SyncUpdateNetworkNetworkFieldmask.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatenetwork/SyncUpdateNetworkNetworkFieldmask.java new file mode 100644 index 000000000000..9747c601dc4c --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatenetwork/SyncUpdateNetworkNetworkFieldmask.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START +// baremetalsolution_v2_generated_baremetalsolutionclient_updatenetwork_networkfieldmask_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.Network; +import com.google.protobuf.FieldMask; + +public class SyncUpdateNetworkNetworkFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateNetworkNetworkFieldmask(); + } + + public static void syncUpdateNetworkNetworkFieldmask() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + Network network = Network.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Network response = bareMetalSolutionClient.updateNetworkAsync(network, updateMask).get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_updatenetwork_networkfieldmask_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatenfsshare/AsyncUpdateNfsShare.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatenfsshare/AsyncUpdateNfsShare.java new file mode 100644 index 000000000000..2aa998723d4a --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatenfsshare/AsyncUpdateNfsShare.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_updatenfsshare_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.NfsShare; +import com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateNfsShare { + + public static void main(String[] args) throws Exception { + asyncUpdateNfsShare(); + } + + public static void asyncUpdateNfsShare() throws Exception { + // 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 future = + bareMetalSolutionClient.updateNfsShareCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_updatenfsshare_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatenfsshare/AsyncUpdateNfsShareLRO.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatenfsshare/AsyncUpdateNfsShareLRO.java new file mode 100644 index 000000000000..cc15c8a99b4c --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatenfsshare/AsyncUpdateNfsShareLRO.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_updatenfsshare_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.NfsShare; +import com.google.cloud.baremetalsolution.v2.OperationMetadata; +import com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateNfsShareLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateNfsShareLRO(); + } + + public static void asyncUpdateNfsShareLRO() throws Exception { + // 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 future = + bareMetalSolutionClient.updateNfsShareOperationCallable().futureCall(request); + // Do something. + NfsShare response = future.get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_updatenfsshare_lro_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatenfsshare/SyncUpdateNfsShare.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatenfsshare/SyncUpdateNfsShare.java new file mode 100644 index 000000000000..7b520913a34c --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatenfsshare/SyncUpdateNfsShare.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_updatenfsshare_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.NfsShare; +import com.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateNfsShare { + + public static void main(String[] args) throws Exception { + syncUpdateNfsShare(); + } + + public static void syncUpdateNfsShare() throws Exception { + // 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(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_updatenfsshare_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatenfsshare/SyncUpdateNfsShareNfsshareFieldmask.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatenfsshare/SyncUpdateNfsShareNfsshareFieldmask.java new file mode 100644 index 000000000000..f7da42b4ec48 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatenfsshare/SyncUpdateNfsShareNfsshareFieldmask.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START +// baremetalsolution_v2_generated_baremetalsolutionclient_updatenfsshare_nfssharefieldmask_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.NfsShare; +import com.google.protobuf.FieldMask; + +public class SyncUpdateNfsShareNfsshareFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateNfsShareNfsshareFieldmask(); + } + + public static void syncUpdateNfsShareNfsshareFieldmask() throws Exception { + // 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(); + } + } +} +// [END +// baremetalsolution_v2_generated_baremetalsolutionclient_updatenfsshare_nfssharefieldmask_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatevolume/AsyncUpdateVolume.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatevolume/AsyncUpdateVolume.java new file mode 100644 index 000000000000..bb556a294f40 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatevolume/AsyncUpdateVolume.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_updatevolume_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.UpdateVolumeRequest; +import com.google.cloud.baremetalsolution.v2.Volume; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateVolume { + + public static void main(String[] args) throws Exception { + asyncUpdateVolume(); + } + + public static void asyncUpdateVolume() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + UpdateVolumeRequest request = + UpdateVolumeRequest.newBuilder() + .setVolume(Volume.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + bareMetalSolutionClient.updateVolumeCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_updatevolume_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatevolume/AsyncUpdateVolumeLRO.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatevolume/AsyncUpdateVolumeLRO.java new file mode 100644 index 000000000000..928cdc928461 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatevolume/AsyncUpdateVolumeLRO.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_updatevolume_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.OperationMetadata; +import com.google.cloud.baremetalsolution.v2.UpdateVolumeRequest; +import com.google.cloud.baremetalsolution.v2.Volume; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateVolumeLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateVolumeLRO(); + } + + public static void asyncUpdateVolumeLRO() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + UpdateVolumeRequest request = + UpdateVolumeRequest.newBuilder() + .setVolume(Volume.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + OperationFuture future = + bareMetalSolutionClient.updateVolumeOperationCallable().futureCall(request); + // Do something. + Volume response = future.get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_updatevolume_lro_async] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatevolume/SyncUpdateVolume.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatevolume/SyncUpdateVolume.java new file mode 100644 index 000000000000..31fd59721aa8 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatevolume/SyncUpdateVolume.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_updatevolume_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.UpdateVolumeRequest; +import com.google.cloud.baremetalsolution.v2.Volume; +import com.google.protobuf.FieldMask; + +public class SyncUpdateVolume { + + public static void main(String[] args) throws Exception { + syncUpdateVolume(); + } + + public static void syncUpdateVolume() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + UpdateVolumeRequest request = + UpdateVolumeRequest.newBuilder() + .setVolume(Volume.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Volume response = bareMetalSolutionClient.updateVolumeAsync(request).get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_updatevolume_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatevolume/SyncUpdateVolumeVolumeFieldmask.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatevolume/SyncUpdateVolumeVolumeFieldmask.java new file mode 100644 index 000000000000..85d9b895bc75 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionclient/updatevolume/SyncUpdateVolumeVolumeFieldmask.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionclient_updatevolume_volumefieldmask_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionClient; +import com.google.cloud.baremetalsolution.v2.Volume; +import com.google.protobuf.FieldMask; + +public class SyncUpdateVolumeVolumeFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateVolumeVolumeFieldmask(); + } + + public static void syncUpdateVolumeVolumeFieldmask() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) { + Volume volume = Volume.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Volume response = bareMetalSolutionClient.updateVolumeAsync(volume, updateMask).get(); + } + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionclient_updatevolume_volumefieldmask_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionsettings/getinstance/SyncGetInstance.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionsettings/getinstance/SyncGetInstance.java new file mode 100644 index 000000000000..3ecb44fc7928 --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/baremetalsolutionsettings/getinstance/SyncGetInstance.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionsettings_getinstance_sync] +import com.google.cloud.baremetalsolution.v2.BareMetalSolutionSettings; +import java.time.Duration; + +public class SyncGetInstance { + + public static void main(String[] args) throws Exception { + syncGetInstance(); + } + + public static void syncGetInstance() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + BareMetalSolutionSettings.Builder bareMetalSolutionSettingsBuilder = + BareMetalSolutionSettings.newBuilder(); + bareMetalSolutionSettingsBuilder + .getInstanceSettings() + .setRetrySettings( + bareMetalSolutionSettingsBuilder + .getInstanceSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + BareMetalSolutionSettings bareMetalSolutionSettings = bareMetalSolutionSettingsBuilder.build(); + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionsettings_getinstance_sync] diff --git a/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/stub/baremetalsolutionstubsettings/getinstance/SyncGetInstance.java b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/stub/baremetalsolutionstubsettings/getinstance/SyncGetInstance.java new file mode 100644 index 000000000000..503f9e10065a --- /dev/null +++ b/java-bare-metal-solution/samples/snippets/generated/com/google/cloud/baremetalsolution/v2/stub/baremetalsolutionstubsettings/getinstance/SyncGetInstance.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.baremetalsolution.v2.stub.samples; + +// [START baremetalsolution_v2_generated_baremetalsolutionstubsettings_getinstance_sync] +import com.google.cloud.baremetalsolution.v2.stub.BareMetalSolutionStubSettings; +import java.time.Duration; + +public class SyncGetInstance { + + public static void main(String[] args) throws Exception { + syncGetInstance(); + } + + public static void syncGetInstance() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + BareMetalSolutionStubSettings.Builder bareMetalSolutionSettingsBuilder = + BareMetalSolutionStubSettings.newBuilder(); + bareMetalSolutionSettingsBuilder + .getInstanceSettings() + .setRetrySettings( + bareMetalSolutionSettingsBuilder + .getInstanceSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + BareMetalSolutionStubSettings bareMetalSolutionSettings = + bareMetalSolutionSettingsBuilder.build(); + } +} +// [END baremetalsolution_v2_generated_baremetalsolutionstubsettings_getinstance_sync]